/* Wave M2 — Private Spy stage + premium Wait Lounge */

.sl-spy-stage {
  position: absolute;
  inset: 0;
  /* Above Ticket Show (z-index 46) when Private owns the main live window */
  z-index: 48;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  overflow: hidden;
  box-sizing: border-box;
}
.sl-spy-stage[hidden] { display: none !important; }
.sl-spy-stage.is-open { pointer-events: auto; }

/*
 * Stripchat-parity Private Show gate:
 * Keep the LIVE video visible under a heavy blur (not a solid empty gradient,
 * not a full-bleed “Invite” panel). The modal sits on the stage only; chat stays.
 */
body.sl-spy-stage-active #streamerVideo,
body.sl-spy-stage-active .sl-room-video-host video {
  opacity: 1 !important;
  visibility: visible !important;
  filter: blur(26px) saturate(0.75) brightness(0.42);
  transform: scale(1.08);
  transition: filter 0.25s ease, transform 0.25s ease;
}
/* Optional lounge is a subtle tint UNDER the modal — never replaces the cam */
body.sl-spy-stage-active.sl-spy-wait-lounge-on .sl-spy-stage__wait {
  opacity: 0.38;
  mix-blend-mode: soft-light;
}
body.sl-spy-stage-active.sl-spy-previewing #streamerVideo,
body.sl-spy-stage-active.sl-spy-previewing .sl-room-video-host video {
  opacity: 1 !important;
  visibility: visible !important;
  filter: blur(0) saturate(1) brightness(1);
  transform: none;
}

.sl-spy-stage__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: transparent;
  pointer-events: none;
}
.sl-spy-stage:not(:has(.sl-spy-wait-theme)):not(:has(.sl-spy-stage__wait-media)) .sl-spy-stage__veil {
  background: radial-gradient(120% 90% at 50% 40%, rgba(15, 23, 42, 0.35), rgba(2, 6, 23, 0.78));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

/* Premium wait lounge — full-bleed, unmistakably animated */
.sl-spy-stage__wait {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: #04070f;
}
.sl-spy-stage__wait-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sl-spy-stage__wait-caption {
  /* Stripchat gate uses the modal copy — hide lounge caption noise */
  display: none !important;
}

.sl-spy-wait-theme {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 15% 25%, rgba(251, 191, 36, 0.55), transparent 60%),
    radial-gradient(ellipse 65% 55% at 85% 75%, rgba(168, 85, 247, 0.55), transparent 55%),
    radial-gradient(ellipse 80% 60% at 50% 110%, rgba(56, 189, 248, 0.35), transparent 50%),
    linear-gradient(160deg, #0a0f1f 0%, #1a1030 45%, #0c1224 100%);
  animation: slSpyAuroraShift 8s ease-in-out infinite alternate;
}
.sl-spy-wait-theme .sl-spy-wait-stars {
  position: absolute;
  inset: -20%;
  background-image:
    radial-gradient(2px 2px at 10% 20%, #fff 40%, transparent 50%),
    radial-gradient(2px 2px at 30% 60%, #fde68a 40%, transparent 50%),
    radial-gradient(2.5px 2.5px at 55% 15%, #fff 40%, transparent 50%),
    radial-gradient(2px 2px at 75% 45%, #c4b5fd 40%, transparent 50%),
    radial-gradient(2.5px 2.5px at 90% 80%, #fff 40%, transparent 50%),
    radial-gradient(2px 2px at 20% 85%, #7dd3fc 40%, transparent 50%),
    radial-gradient(2px 2px at 48% 72%, #fbbf24 40%, transparent 50%),
    radial-gradient(2px 2px at 65% 30%, #fff 40%, transparent 50%);
  animation: slSpyDrift 12s linear infinite;
  opacity: 0.95;
}
.sl-spy-wait-theme::before,
.sl-spy-wait-theme::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(8px);
  mix-blend-mode: screen;
}
.sl-spy-wait-theme::before {
  width: min(55vw, 420px);
  height: min(55vw, 420px);
  left: -8%;
  top: 10%;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.85) 0%, rgba(251, 146, 60, 0.15) 55%, transparent 70%);
  animation: slSpyOrbA 6s ease-in-out infinite alternate;
}
.sl-spy-wait-theme::after {
  width: min(60vw, 480px);
  height: min(60vw, 480px);
  right: -10%;
  bottom: 0;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.9) 0%, rgba(56, 189, 248, 0.2) 50%, transparent 70%);
  animation: slSpyOrbB 7s ease-in-out infinite alternate;
}
/* Concentric rings — obvious premium motion even in a still frame */
.sl-spy-wait-rings {
  position: absolute;
  left: 50%;
  top: 48%;
  width: min(90vw, 560px);
  height: min(90vw, 560px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
}
.sl-spy-wait-rings span {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid rgba(253, 230, 138, 0.55);
  box-shadow: 0 0 28px rgba(251, 191, 36, 0.45), inset 0 0 28px rgba(167, 139, 250, 0.2);
  animation: slSpyRing 4.5s ease-out infinite;
}
.sl-spy-wait-rings span:nth-child(1) {
  animation: none;
  opacity: 0.7;
  transform: scale(0.92);
}
.sl-spy-wait-rings span:nth-child(2) {
  inset: 12%;
  border-color: rgba(167, 139, 250, 0.55);
  animation-delay: 0.75s;
}
.sl-spy-wait-rings span:nth-child(3) {
  inset: 24%;
  border-color: rgba(56, 189, 248, 0.5);
  animation-delay: 1.5s;
}
.sl-spy-wait-rings span:nth-child(4) {
  inset: 36%;
  border-color: rgba(251, 146, 60, 0.55);
  animation-delay: 2.25s;
}
.sl-spy-wait-shine {
  position: absolute;
  inset: -40% -20%;
  background: linear-gradient(
    115deg,
    transparent 35%,
    rgba(255, 255, 255, 0.12) 48%,
    rgba(253, 230, 138, 0.22) 50%,
    rgba(255, 255, 255, 0.1) 52%,
    transparent 65%
  );
  animation: slSpyShine 5.5s ease-in-out infinite;
  pointer-events: none;
}

.sl-spy-wait-theme--particles {
  background: radial-gradient(ellipse at center, #141b33 0%, #050814 70%);
}
.sl-spy-wait-theme--cinema {
  background: linear-gradient(125deg, #111827, #312e81 40%, #7c2d12 100%);
  background-size: 200% 200%;
  animation: slSpyCinema 10s linear infinite;
}
.sl-spy-wait-theme--pulse {
  background: #0b1020;
  animation: slSpyPulse 2.4s ease-in-out infinite;
}

@keyframes slSpyAuroraShift {
  0% { filter: hue-rotate(0deg) saturate(1.1) brightness(1); }
  100% { filter: hue-rotate(35deg) saturate(1.35) brightness(1.12); }
}
@keyframes slSpyOrbA {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(18%, 12%) scale(1.2); }
}
@keyframes slSpyOrbB {
  0% { transform: translate(0, 0) scale(1.05); }
  100% { transform: translate(-14%, -10%) scale(1.25); }
}
@keyframes slSpyDrift {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-6%, -4%, 0); }
}
@keyframes slSpyRing {
  0% { transform: scale(0.72); opacity: 0.85; }
  70% { opacity: 0.35; }
  100% { transform: scale(1.15); opacity: 0; }
}
@keyframes slSpyShine {
  0% { transform: translateX(-30%) rotate(8deg); }
  100% { transform: translateX(30%) rotate(8deg); }
}
@keyframes slSpyCinema {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}
@keyframes slSpyPulse {
  0%, 100% { box-shadow: inset 0 0 60px rgba(251, 191, 36, 0.2); }
  50% { box-shadow: inset 0 0 140px rgba(167, 139, 250, 0.55); }
}

/* Stripchat-like centered Private Show window (stage only) */
.sl-spy-stage__card {
  position: relative;
  z-index: 3;
  width: min(380px, calc(100% - 32px));
  max-width: calc(100% - 32px);
  padding: 28px 22px 20px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 14, 20, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.55);
  color: #e8eaed;
  text-align: center;
  box-sizing: border-box;
}
.sl-spy-stage__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: #e11d48;
  border: 0;
  margin-bottom: 14px;
}
.sl-spy-stage__card h3 {
  margin: 0 0 10px;
  font-size: clamp(20px, 3.2vw, 26px);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
}
.sl-spy-stage__card p {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(232, 234, 237, 0.78);
}
.sl-spy-stage__rate {
  margin: 0 0 18px;
  font-size: 18px;
  font-weight: 800;
  color: #ffd54f;
}
.sl-spy-stage__rate small {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #86efac;
}
.sl-spy-stage__actions {
  display: grid;
  gap: 10px;
}
.sl-spy-stage__btn {
  min-height: 48px;
  border-radius: 10px;
  border: 0;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
}
.sl-spy-stage__btn--primary {
  background: #ff3b77;
  color: #fff;
  box-shadow: 0 10px 24px rgba(255, 59, 119, 0.35);
}
.sl-spy-stage__btn--primary:hover {
  filter: brightness(1.06);
}
.sl-spy-stage__btn--ghost {
  background: transparent;
  color: #e8eaed;
  border: 1px solid rgba(255, 255, 255, 0.22);
}
.sl-spy-stage__countdown {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 800;
  color: #86efac;
}
.sl-spy-stage__countdown[hidden] { display: none !important; }

.sl-goal-chat-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.22), rgba(15, 23, 42, 0.85));
  border: 1px solid rgba(167, 139, 250, 0.35);
  color: #eef2ff;
  font-size: 13px;
  line-height: 1.35;
}
.sl-goal-chat-chip[hidden] { display: none !important; }
.sl-goal-chat-chip strong { color: #fde68a; }
.sl-goal-chat-chip button {
  margin-left: auto;
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 900;
  font-size: 12px;
  cursor: pointer;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #052e16;
  white-space: nowrap;
}

.sl-room-goal-bar-model-cta {
  display: none;
  margin-left: 8px;
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 900;
  font-size: 12px;
  cursor: pointer;
  background: linear-gradient(135deg, #a78bfa, #7c3aed);
  color: #fff;
  white-space: nowrap;
}
body.sl-is-model-room .sl-room-goal-bar-model-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
body.sl-is-model-room .sl-room-goal-bar-tip {
  display: none;
}

@media (max-width: 720px) {
  .sl-spy-stage__card { padding: 18px 14px 14px; width: calc(100% - 24px); }
  .sl-goal-chat-chip { flex-wrap: wrap; }
  .sl-goal-chat-chip button { width: 100%; margin-left: 0; }
  .sl-room-goal-bar {
    padding-left: 12px !important;
    padding-right: 12px !important;
    box-sizing: border-box;
    max-width: 100%;
  }
}

/* Short mobile stage: Private/Exclusive fills MAIN LIVE WINDOW.
   CTAs (Start Spy / Stay) are flex-locked at the bottom — NEVER clipped. */
@media (max-width: 720px) and (max-height: 920px) {
  .sl-spy-stage {
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
    inset: 0;
    max-width: 100%;
    max-height: 100%;
    overflow: hidden;
  }
  .sl-spy-stage__wait,
  .sl-spy-wait-theme,
  .sl-spy-wait-rings {
    display: none !important;
  }
  .sl-spy-stage__veil {
    background: rgba(8, 10, 16, 0.92) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .sl-spy-stage__card {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 10px 12px 10px;
    border-radius: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
    margin: 0;
    border: 0;
    box-shadow: none;
    background: rgba(10, 12, 18, 0.96);
    box-sizing: border-box;
  }
  /* Copy can shrink; buttons cannot */
  .sl-spy-stage__badge {
    flex: 0 0 auto;
    margin-bottom: 4px;
    padding: 3px 10px;
    font-size: 10px;
  }
  .sl-spy-stage__card h3 {
    flex: 0 0 auto;
    font-size: 15px;
    margin: 0 0 2px;
    line-height: 1.2;
  }
  .sl-spy-stage__card p {
    flex: 1 1 auto;
    min-height: 0;
    font-size: 11px;
    margin: 0 0 4px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .sl-spy-stage__rate {
    flex: 0 0 auto;
    margin: 0 0 6px;
    font-size: 12px;
    line-height: 1.25;
  }
  .sl-spy-stage__rate small {
    font-size: 11px;
  }
  .sl-spy-stage__actions {
    flex: 0 0 auto;
    margin-top: auto;
    padding-top: 4px;
    gap: 6px;
    width: 100%;
  }
  .sl-spy-stage__btn {
    flex: 0 0 auto;
    min-height: 42px;
    height: 42px;
    font-size: 13px;
  }
  .sl-spy-stage__btn--ghost {
    min-height: 34px;
    height: 34px;
  }
  .sl-spy-stage__btn[hidden] {
    display: none !important;
  }
  .sl-spy-stage__countdown {
    flex: 0 0 auto;
    margin-top: 4px;
  }
  .sl-spy-stage__wait-caption {
    display: none;
  }
}

/* Ultra-short stage: keep PRIMARY Spy CTA even if ghost is tight */
@media (max-width: 720px) and (max-height: 780px) {
  body.sl-spy-stage-active .sl-spy-stage__card p {
    display: none !important;
  }
  body.sl-spy-stage-active .sl-spy-stage__btn--primary:not([hidden]) {
    min-height: 44px !important;
    height: 44px !important;
    display: block !important;
    visibility: visible !important;
  }
}
