/* Interactive theatre demo — matches guest app live wall + theatre mode */

.theatre-demo__intro {
  margin: 0 auto 1.25rem;
  max-width: 46rem;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.theatre-demo__intro strong {
  color: var(--ink);
  font-weight: 500;
}

.td-live-wall__slides {
  position: absolute;
  inset: 0;
}

.td-live-wall__stage.is-paused .td-live-wall__progress-bar {
  transition: none;
}

.theatre-demo__steps {
  margin: 0 auto 1.15rem;
  max-width: 32rem;
  text-align: center;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.theatre-demo__steps strong {
  color: var(--ink);
  font-weight: 500;
}

.theatre-demo {
  width: 100%;
}

/* Venue laptop / projector display mock */
.theatre-demo__display {
  width: min(100%, 44rem);
  margin-inline: auto;
}

.display-mock__bezel {
  position: relative;
  border-radius: 14px 14px 4px 4px;
  padding: 0.55rem 0.55rem 0.45rem;
  background: linear-gradient(165deg, #3a444c 0%, #252d34 42%, #1a2228 100%);
  box-shadow:
    var(--shadow-lg),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35);
}

.display-mock__camera {
  position: absolute;
  top: 0.28rem;
  left: 50%;
  transform: translateX(-50%);
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: #12171c;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.display-mock__screen {
  border-radius: 6px;
  overflow: hidden;
  background: #0e1216;
  min-height: clamp(15rem, 42vw, 19rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.85rem, 2.5vw, 1.35rem);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.display-mock__stand {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.display-mock__neck {
  width: 4.5rem;
  height: 2.1rem;
  background: linear-gradient(180deg, #2a3238, #1e252b);
  clip-path: polygon(18% 0, 82% 0, 100% 100%, 0 100%);
}

.display-mock__base {
  width: 7.5rem;
  height: 0.42rem;
  margin-top: -0.05rem;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(180deg, #323c44, #1a2228);
  box-shadow: 0 6px 16px rgba(26, 34, 40, 0.22);
}

.theatre-demo__display-label {
  margin: 0.7rem 0 0;
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.display-mock__screen .theatre-demo__wall {
  width: min(100%, 22rem);
  max-width: 22rem;
  margin: 0;
  padding: 0.95rem 0.9rem 0.85rem;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.theatre-demo__wall {
  width: min(100%, 420px);
  max-width: 420px;
  margin-inline: auto;
  padding: 1.15rem 1.1rem 1rem;
  box-sizing: border-box;
}

.td-live-wall__header {
  text-align: center;
  margin-bottom: 0.65rem;
}

.td-live-wall__header-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.td-live-wall__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
}

.td-live-wall__sub {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
  font-weight: 300;
}

.td-live-wall__theatre-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.4rem 0.85rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s var(--ease);
  animation: td-theatre-pulse 2.8s ease-in-out infinite;
}

@keyframes td-theatre-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(154, 139, 110, 0);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(154, 139, 110, 0.28);
  }
}

.td-live-wall__theatre-btn:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(61, 83, 99, 0.28);
  transform: translateY(-1px);
}

.td-live-wall__stage {
  position: relative;
  width: 100%;
  margin-inline: auto;
  border-radius: 14px;
  overflow: hidden;
  background: #12171c;
  aspect-ratio: 4 / 5;
  touch-action: pan-y;
  user-select: none;
}

.td-live-wall__slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  margin: 0;
  opacity: 0;
  transition: opacity 0.7s var(--ease);
}

.td-live-wall__slide.is-active {
  opacity: 1;
}

.td-live-wall__frame {
  flex: 1;
  min-height: 0;
  position: relative;
}

.td-live-wall__ph {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.td-slide--1 {
  background-image: linear-gradient(135deg, #c4b5a0, #8a9aa6 50%, #5a6a76);
}

.td-slide--2 {
  background-image: linear-gradient(135deg, #dfe8ef, #9aabb8 45%, #4a5a66);
}

.td-slide--3 {
  background-image: linear-gradient(135deg, #e8dfd0, #b8a890 40%, #6a7a86);
}

.td-live-wall__caption {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.7rem;
  font-size: 0.78rem;
  color: rgba(247, 250, 252, 0.92);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
}

.td-live-wall__chrome {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.td-live-wall__nav {
  pointer-events: auto;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.42);
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.td-live-wall__nav--prev {
  left: 0.45rem;
}

.td-live-wall__nav--next {
  right: 0.45rem;
}

.td-live-wall__progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
}

.td-live-wall__progress-bar {
  height: 100%;
  width: 0%;
  background: rgba(247, 250, 252, 0.75);
  transition: width 0.1s linear;
}

.td-live-wall__hint {
  margin: 0.55rem 0 0;
  text-align: center;
  font-size: 0.74rem;
  color: var(--ink-muted);
}

.theatre-demo__note {
  max-width: 44rem;
  margin: 0.85rem auto 0;
  text-align: center;
  font-size: 0.72rem;
  color: var(--ink-muted);
}

.theatre-demo__footer {
  display: flex;
  justify-content: center;
  margin-top: 1.15rem;
}

/* Full-screen theatre overlay (same structure as guest app) */
.td-theatre {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding:
    max(0.75rem, env(safe-area-inset-top))
    max(0.75rem, env(safe-area-inset-right))
    max(0.75rem, env(safe-area-inset-bottom))
    max(0.75rem, env(safe-area-inset-left));
}

.td-theatre[hidden] {
  display: none !important;
}

.td-theatre__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(70, 82, 94, 0.28), transparent 55%),
    linear-gradient(180deg, #161c22 0%, #12171c 55%, #0e1216 100%);
}

.td-theatre__shell {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 0;
}

.td-theatre__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.td-theatre__brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3vw, 1.7rem);
  font-weight: 500;
  color: rgba(247, 250, 252, 0.92);
}

.td-theatre__exit {
  border: 1px solid rgba(247, 250, 252, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(247, 250, 252, 0.92);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
}

.td-theatre__exit:hover {
  background: rgba(255, 255, 255, 0.16);
}

.td-theatre__stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  background: #12171c;
  outline: none;
  touch-action: pan-y;
  user-select: none;
}

.td-theatre__hero {
  margin: 0;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  transition: opacity 0.6s ease-in-out;
}

.td-theatre__hero.is-fading {
  opacity: 0.35;
}

.td-theatre__frame {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.td-theatre__bg {
  position: absolute;
  inset: -8%;
  width: 116%;
  height: 116%;
  object-fit: cover;
  filter: blur(28px) brightness(0.55) saturate(1.1);
  transform: scale(1.08);
  opacity: 0.85;
}

.td-theatre__bg[hidden] {
  display: none !important;
}

.td-theatre__ph {
  position: absolute;
  left: 4%;
  right: 4%;
  top: 2%;
  bottom: 14%;
  border-radius: 4px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.td-theatre__frame.is-ken .td-theatre__ph {
  animation: td-ken-img 9s linear forwards;
}

.td-theatre__frame.is-ken--alt .td-theatre__ph {
  animation-name: td-ken-img-alt;
}

.td-theatre__frame.is-ken .td-theatre__bg {
  animation: td-ken-bg 9s linear forwards;
}

.td-theatre__stage.is-paused .td-theatre__frame.is-ken .td-theatre__ph,
.td-theatre__stage.is-paused .td-theatre__frame.is-ken .td-theatre__bg {
  animation-play-state: paused;
}

@keyframes td-ken-img {
  from {
    transform: scale(1.02);
  }
  to {
    transform: scale(1.1);
  }
}

@keyframes td-ken-img-alt {
  from {
    transform: scale(1.1) translate(-1%, 0);
  }
  to {
    transform: scale(1.02) translate(1%, 0);
  }
}

@keyframes td-ken-bg {
  from {
    transform: scale(1.12);
  }
  to {
    transform: scale(1.22);
  }
}

.td-theatre__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 2rem 1rem 0.85rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
  color: #fff;
  font-size: 0.82rem;
}

.td-theatre__guest {
  font-weight: 500;
}

.td-theatre__when {
  opacity: 0.85;
}

.td-theatre__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.35rem;
  height: 2.35rem;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 1.35rem;
  cursor: pointer;
  z-index: 3;
}

.td-theatre__nav:focus {
  outline: none;
}

.td-theatre__nav:focus-visible {
  box-shadow: 0 0 0 2px rgba(247, 250, 252, 0.85);
}

.td-theatre__nav--prev {
  left: 0.55rem;
}

.td-theatre__nav--next {
  right: 0.55rem;
}

.td-theatre__progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  z-index: 2;
}

.td-theatre__progress-bar {
  height: 100%;
  width: 0%;
  background: rgba(247, 250, 252, 0.8);
}

.td-theatre__strip {
  display: flex;
  gap: 0.45rem;
  justify-content: center;
  overflow-x: auto;
  padding: 0.15rem 0.1rem 0.35rem;
  flex: 0 0 auto;
}

.td-theatre__thumb {
  flex: 0 0 auto;
  width: 3.25rem;
  height: 3.25rem;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: #2a3238;
  transition: border-color 0.2s ease, transform 0.2s var(--ease);
}

.td-theatre__thumb:focus {
  outline: none;
}

.td-theatre__thumb:focus-visible {
  border-color: rgba(247, 250, 252, 0.85);
}

.td-theatre__thumb.is-current {
  border-color: rgba(247, 250, 252, 0.85);
  transform: translateY(-2px);
}

.td-theatre__thumb-ph {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

.td-theatre__hint {
  margin: 0;
  text-align: center;
  font-size: 0.72rem;
  color: rgba(247, 250, 252, 0.55);
}

body.td-theatre-open {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .td-live-wall__theatre-btn {
    animation: none;
  }

  .td-theatre__frame.is-ken .td-theatre__ph,
  .td-theatre__frame.is-ken .td-theatre__bg {
    animation: none !important;
  }

  .td-live-wall__slide {
    transition: none;
  }
}
