/* Touchbud Play × ChatGPT – step-by-step slideshow.
 *
 * Tokens follow the Touchbud product sections already on touchbud.com
 * (Stream Player, RemoteDroid): Open Sans, accent #e2171d, dark #15161b.
 * Everything is scoped under .tb-gpt so nothing leaks into Divi's styles.
 */

.tb-gpt {
  --rot: #e2171d;
  --dunkel: #15161b;
  --text: #5b5f6a;
  --grau: #9a9da6;
  --linie: #e3e5ea;
  --flaeche: #f5f6f8;

  font-family: "Open Sans", Arial, sans-serif;
  color: var(--dunkel);
  background: var(--flaeche);
  border-radius: 20px;
  padding: 56px 56px 48px;
  box-sizing: border-box;
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 38fr) minmax(0, 62fr);
  grid-template-areas:
    "intro  buehne"
    "liste  buehne";
  column-gap: 56px;
  row-gap: 0;
  -webkit-font-smoothing: antialiased;
}
.tb-gpt .gpt-intro  { grid-area: intro;  align-self: end; }
.tb-gpt .gpt-liste  { grid-area: liste;  align-self: start; }
.tb-gpt .gpt-buehne { grid-area: buehne; align-self: center; }
.tb-gpt *, .tb-gpt *::before, .tb-gpt *::after { box-sizing: border-box; }

/* ---------- Left column ---------- */

.tb-gpt .gpt-kicker {
  color: var(--rot);
  font-weight: 800;
  font-size: 12.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin: 0 0 12px;
}
.tb-gpt .gpt-titel {
  font-size: 32px;
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--dunkel);
  margin: 0 0 12px;
  padding: 0;
}
.tb-gpt .gpt-lead {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--text);
  margin: 0 0 32px;
}

/* The step list is a vertical timeline: a grey rail links the numbers, the
   finished part of the rail turns red. */
.tb-gpt .gpt-schritte {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.tb-gpt .gpt-schritt { position: relative; margin: 0; padding: 0; }

.tb-gpt .gpt-schritt + .gpt-schritt { margin-top: 6px; }

/* rail segment below each number, except the last */
.tb-gpt .gpt-schritt:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 44px;
  bottom: -6px;
  width: 2px;
  background: var(--linie);
  transition: background .35s ease;
}
.tb-gpt .gpt-schritt.ist-fertig:not(:last-child)::before { background: var(--rot); }

.tb-gpt .gpt-knopf {
  all: unset;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 40px 1fr;
  column-gap: 16px;
  width: 100%;
  padding: 2px 0 14px;
  cursor: pointer;
  border-radius: 10px;
}
.tb-gpt .gpt-knopf:focus-visible {
  outline: 2px solid var(--rot);
  outline-offset: 4px;
}

.tb-gpt .gpt-nummer {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 15px;
  color: var(--grau);
  background: #fff;
  border: 2px solid var(--linie);
  transition: background .3s ease, border-color .3s ease, color .3s ease, transform .3s ease;
  position: relative;
  z-index: 1;
}
.tb-gpt .ist-fertig .gpt-nummer {
  border-color: var(--rot);
  color: var(--rot);
}
.tb-gpt .ist-aktiv .gpt-nummer {
  background: var(--rot);
  border-color: var(--rot);
  color: #fff;
  transform: scale(1.06);
  box-shadow: 0 6px 16px rgba(226, 23, 29, .28);
}

.tb-gpt .gpt-kopf {
  display: block;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--grau);
  padding-top: 8px;
  transition: color .3s ease;
}
.tb-gpt .ist-fertig .gpt-kopf { color: var(--dunkel); }
.tb-gpt .ist-aktiv .gpt-kopf { color: var(--dunkel); }
.tb-gpt .gpt-knopf:hover .gpt-kopf { color: var(--dunkel); }

/* Description: only the active step shows it, the others fold away. */
.tb-gpt .gpt-text {
  grid-column: 2;
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .35s ease;
}
.tb-gpt .ist-aktiv .gpt-text { grid-template-rows: 1fr; }
.tb-gpt .gpt-text > span {
  overflow: hidden;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
}
.tb-gpt .ist-aktiv .gpt-text > span { padding-top: 6px; }

/* Time left on the current image */
.tb-gpt .gpt-fortschritt {
  grid-column: 2;
  height: 3px;
  border-radius: 3px;
  background: var(--linie);
  margin-top: 12px;
  overflow: hidden;
  display: none;
}
.tb-gpt .ist-aktiv .gpt-fortschritt { display: block; }
/* Width and timing are set by the script, so the bar can freeze mid-way
   when the slideshow pauses and resume from the same spot. */
.tb-gpt .gpt-fortschritt > i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--rot);
}

/* ---------- Right column ---------- */

.tb-gpt .gpt-buehne { min-width: 0; }

/* Two frames share the same spot and cross-fade: a chat window for the
   ChatGPT screenshots, a display for the finished poster. */
.tb-gpt .gpt-rahmen-stapel { position: relative; }

.tb-gpt .gpt-fenster {
  background: #fff;
  border: 1px solid var(--linie);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 22px 56px rgba(21, 22, 27, .12), 0 2px 6px rgba(21, 22, 27, .05);
  transition: opacity .45s ease, transform .45s ease;
}
.tb-gpt .gpt-leiste {
  height: 36px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  background: #fafbfc;
  border-bottom: 1px solid var(--linie);
}
.tb-gpt .gpt-leiste i {
  width: 10px; height: 10px; border-radius: 50%;
  background: #dcdee4;
}
.tb-gpt .gpt-leiste span {
  margin-left: 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--grau);
}

.tb-gpt .gpt-bilder {
  position: relative;
  aspect-ratio: 894 / 712;
  background: #fff;
}
.tb-gpt .gpt-bilder img,
.tb-gpt .gpt-anzeige img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .5s ease;
  display: block;
}
.tb-gpt .gpt-bilder img.ist-sichtbar,
.tb-gpt .gpt-anzeige img.ist-sichtbar { opacity: 1; }

/* The display: dark bezel, a small stand, the name of the screen below. */
.tb-gpt .gpt-bildschirm {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transform: scale(.97);
  pointer-events: none;
  transition: opacity .45s ease, transform .45s ease;
}
.tb-gpt .gpt-rahmen { position: relative; }
.tb-gpt.zeigt-bildschirm .gpt-fenster { opacity: 0; transform: scale(.97); }
.tb-gpt.zeigt-bildschirm .gpt-bildschirm { opacity: 1; transform: none; }

.tb-gpt .gpt-geraet {
  width: 100%;
  background: var(--dunkel);
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 26px 60px rgba(21, 22, 27, .28);
}
.tb-gpt .gpt-anzeige {
  position: relative;
  aspect-ratio: 1080 / 608;
  border-radius: 4px;
  overflow: hidden;
  background: #000;
}
.tb-gpt .gpt-fuss {
  width: 18%;
  height: 12px;
  background: linear-gradient(#2a2b31, #15161b);
  border-radius: 0 0 6px 6px;
}
.tb-gpt .gpt-sockel {
  width: 30%;
  height: 5px;
  background: #2a2b31;
  border-radius: 3px;
}
.tb-gpt .gpt-geraet-name {
  margin-top: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.tb-gpt .gpt-geraet-name::before {
  content: "";
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--rot);
}

/* Caption and sub-image dots under the frame */
.tb-gpt .gpt-unterzeile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  min-height: 24px;
}
.tb-gpt .gpt-beschriftung {
  font-size: 14px;
  color: var(--text);
  margin: 0;
}
.tb-gpt .gpt-steuerung { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.tb-gpt .gpt-punkte { display: flex; gap: 8px; }
.tb-gpt .gpt-pause {
  all: unset;
  box-sizing: border-box;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--dunkel);
  background: #fff;
  border: 1px solid var(--linie);
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease;
}
.tb-gpt .gpt-pause:hover { border-color: var(--rot); color: var(--rot); }
.tb-gpt .gpt-pause:focus-visible { outline: 2px solid var(--rot); outline-offset: 3px; }
.tb-gpt .gpt-punkt {
  all: unset;
  width: 8px; height: 8px; border-radius: 50%;
  background: #d3d6dd;
  cursor: pointer;
  transition: background .25s ease, width .25s ease;
}
.tb-gpt .gpt-punkt.ist-aktiv { background: var(--rot); width: 22px; border-radius: 4px; }
.tb-gpt .gpt-punkt:focus-visible { outline: 2px solid var(--rot); outline-offset: 3px; }

/* ---------- Narrow screens ---------- */

@media (max-width: 900px) {
  /* Heading, then the picture, then the steps: on a phone the image should
     come before the list, not after five folded steps. */
  .tb-gpt {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "intro" "buehne" "liste";
    row-gap: 26px;
    padding: 32px 20px 28px;
    /* On a phone the card runs edge to edge, so rounded corners would leave
       small white wedges at the screen edge. */
    border-radius: 0;
  }
  .tb-gpt .gpt-titel { font-size: 25px; }
  .tb-gpt .gpt-lead { margin-bottom: 0; font-size: 15px; }
  .tb-gpt .gpt-kopf { font-size: 16.5px; }
}

/* No motion for people who asked for none: no auto-advance (handled in the
   script), no fades, no scaling. */
@media (prefers-reduced-motion: reduce) {
  .tb-gpt *, .tb-gpt *::before, .tb-gpt *::after {
    transition: none !important;
  }
  .tb-gpt .gpt-fortschritt { display: none !important; }
}
