/* PHSPB Smart Preview Fallback — stream-model routes only.
 * Replaces an explicit provider-preview-unavailable state; it does not probe,
 * load or substitute provider iframes. */

body.phspb-stream-template .phspb-hero-main-card .phspb-embed-wrap.phspb-smart-preview-wrap {
  position: relative;
  display: block !important;
  aspect-ratio: 16 / 8.85 !important;
  min-height: 440px !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: radial-gradient(circle at 72% 20%, rgba(117, 50, 168, .28), transparent 34%), linear-gradient(135deg, #12081e 0%, #090511 78%) !important;
  border-color: rgba(202, 130, 255, .25) !important;
}

body.phspb-stream-template .phspb-smart-preview-fallback {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, .94fr) minmax(320px, 1.06fr);
  align-items: end;
  width: 100%;
  height: 100%;
  min-height: inherit;
  padding: clamp(28px, 4vw, 62px);
  gap: clamp(24px, 4vw, 64px);
  overflow: hidden;
  isolation: isolate;
}

body.phspb-stream-template .phspb-smart-preview-fallback__backdrop,
body.phspb-stream-template .phspb-smart-preview-fallback__shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

body.phspb-stream-template .phspb-smart-preview-fallback__backdrop {
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: .24;
  transform: scale(1.04);
  filter: saturate(.86) contrast(.96);
}

body.phspb-stream-template .phspb-smart-preview-fallback__shade {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(10, 5, 18, .98) 0%, rgba(13, 6, 23, .92) 42%, rgba(13, 6, 23, .74) 68%, rgba(10, 4, 17, .88) 100%),
    linear-gradient(180deg, rgba(18, 8, 31, .16), rgba(4, 2, 10, .72));
}

body.phspb-stream-template .phspb-smart-preview-fallback__content,
body.phspb-stream-template .phspb-smart-preview-fallback__alternatives {
  position: relative;
  z-index: 1;
  min-width: 0;
}

body.phspb-stream-template .phspb-smart-preview-fallback__content {
  display: grid;
  justify-items: start;
  gap: 13px;
  max-width: 520px;
}

body.phspb-stream-template .phspb-smart-preview-fallback__state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 110, 173, .30);
  border-radius: 999px;
  color: #ff8fc1;
  background: rgba(91, 21, 69, .36);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .08em;
  line-height: 1;
}

body.phspb-stream-template .phspb-smart-preview-fallback__state i {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 999px;
  background: #ff4f9a;
  box-shadow: 0 0 0 4px rgba(255, 79, 154, .10);
  animation: phspb-smart-preview-live-dot 2.5s ease-in-out infinite;
}

body.phspb-stream-template .phspb-smart-preview-fallback__state em {
  max-width: 18ch;
  overflow: hidden;
  color: rgba(255,255,255,.72);
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.phspb-stream-template .phspb-smart-preview-fallback h2 {
  max-width: 17ch;
  margin: 0 !important;
  color: #fff !important;
  font-size: clamp(27px, 2.7vw, 46px) !important;
  font-weight: 850 !important;
  line-height: 1.04 !important;
  letter-spacing: -.035em;
}

body.phspb-stream-template .phspb-smart-preview-fallback__content > p {
  max-width: 46ch;
  margin: 0 !important;
  color: rgba(255,255,255,.70) !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
}

body.phspb-stream-template .phspb-smart-preview-fallback__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  min-height: 52px;
  max-width: 100%;
  margin-top: 7px;
  padding: 0 20px;
  border: 1px solid rgba(255, 185, 232, .42);
  border-radius: 16px;
  color: #fff !important;
  background: linear-gradient(135deg, #8b30d5 0%, #c22abd 50%, #ee3c9e 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 16px 34px rgba(57, 4, 66, .30);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: .025em;
  line-height: 1.1;
  text-align: center;
  text-decoration: none !important;
  transition: transform 200ms ease, box-shadow 200ms ease, filter 200ms ease;
}

body.phspb-stream-template .phspb-smart-preview-fallback__cta b {
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
}

@media (hover: hover) and (pointer: fine) {
  body.phspb-stream-template .phspb-smart-preview-fallback__cta:hover,
  body.phspb-stream-template .phspb-smart-preview-fallback__cta:focus-visible {
    transform: translateY(-2px);
    color: #fff !important;
    filter: brightness(1.06);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 22px 42px rgba(85, 7, 93, .42);
  }
}

body.phspb-stream-template .phspb-smart-preview-fallback__alternatives {
  align-self: end;
  display: grid;
  gap: 12px;
  min-width: 0;
}

body.phspb-stream-template .phspb-smart-preview-fallback__alternatives-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: #fff;
}

body.phspb-stream-template .phspb-smart-preview-fallback__alternatives-head strong {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .01em;
}

body.phspb-stream-template .phspb-smart-preview-fallback__alternatives-head a {
  color: rgba(230, 192, 255, .84);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

body.phspb-stream-template .phspb-smart-preview-fallback__alternatives-head a:hover,
body.phspb-stream-template .phspb-smart-preview-fallback__alternatives-head a:focus-visible {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.phspb-stream-template .phspb-smart-preview-fallback__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

body.phspb-stream-template .phspb-smart-preview-card {
  position: relative;
  display: grid;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(213, 169, 255, .18);
  border-radius: 15px;
  color: #fff !important;
  background: rgba(18, 8, 31, .72);
  text-decoration: none !important;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

body.phspb-stream-template .phspb-smart-preview-card__thumb {
  position: relative;
  display: block;
  aspect-ratio: 1.38 / 1;
  overflow: hidden;
  background: rgba(77, 37, 110, .25);
}

body.phspb-stream-template .phspb-smart-preview-card__thumb::after {
  content: '';
  position: absolute;
  inset: 42% 0 0;
  background: linear-gradient(180deg, transparent, rgba(10, 4, 18, .70));
  pointer-events: none;
}

body.phspb-stream-template .phspb-smart-preview-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 300ms ease;
}

body.phspb-stream-template .phspb-smart-preview-card__live {
  position: absolute;
  z-index: 1;
  top: 8px;
  left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 20px;
  padding: 4px 7px;
  border-radius: 999px;
  color: #fff;
  background: rgba(239, 39, 96, .94);
  font-size: 9px;
  font-weight: 850;
  line-height: 1;
}

body.phspb-stream-template .phspb-smart-preview-card__live i {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #fff;
  animation: phspb-smart-preview-live-dot 2.5s ease-in-out infinite;
}

body.phspb-stream-template .phspb-smart-preview-card__copy {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 10px 11px;
}

body.phspb-stream-template .phspb-smart-preview-card__copy strong {
  overflow: hidden;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.phspb-stream-template .phspb-smart-preview-card__copy small {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
  color: rgba(255,255,255,.64);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.phspb-stream-template .phspb-smart-preview-card__heart {
  color: #ff78ae;
  font-size: 11px;
  font-style: normal;
  transform-origin: center;
}

@media (hover: hover) and (pointer: fine) {
  body.phspb-stream-template .phspb-smart-preview-card:hover,
  body.phspb-stream-template .phspb-smart-preview-card:focus-visible {
    z-index: 2;
    transform: translateY(-2px);
    border-color: rgba(228, 151, 255, .52);
    box-shadow: 0 14px 26px rgba(1, 0, 9, .32), inset 0 0 0 1px rgba(255,255,255,.05);
  }

  body.phspb-stream-template .phspb-smart-preview-card:hover .phspb-smart-preview-card__thumb img,
  body.phspb-stream-template .phspb-smart-preview-card:focus-visible .phspb-smart-preview-card__thumb img {
    transform: scale(1.015);
  }

  body.phspb-stream-template .phspb-smart-preview-card:hover .phspb-smart-preview-card__heart,
  body.phspb-stream-template .phspb-smart-preview-card:focus-visible .phspb-smart-preview-card__heart {
    animation: phspb-smart-preview-heart 430ms cubic-bezier(.2,.82,.2,1) both;
  }
}

/* One-time reveal is opt-in after the isolated script binds this exact fallback. */
body.phspb-stream-template .phspb-smart-preview-fallback.phspb-smart-preview-ready .phspb-smart-preview-fallback__content,
body.phspb-stream-template .phspb-smart-preview-fallback.phspb-smart-preview-ready .phspb-smart-preview-fallback__alternatives {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 780ms cubic-bezier(.2,.75,.2,1), transform 780ms cubic-bezier(.2,.75,.2,1);
}

body.phspb-stream-template .phspb-smart-preview-fallback.phspb-smart-preview-ready .phspb-smart-preview-fallback__alternatives {
  transition-delay: 120ms;
}

body.phspb-stream-template .phspb-smart-preview-fallback.phspb-smart-preview-visible .phspb-smart-preview-fallback__content,
body.phspb-stream-template .phspb-smart-preview-fallback.phspb-smart-preview-visible .phspb-smart-preview-fallback__alternatives {
  opacity: 1;
  transform: translateY(0);
}

body.phspb-stream-template .phspb-smart-preview-fallback.phspb-smart-preview-ready .phspb-smart-preview-card {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 560ms ease var(--phspb-smart-preview-delay, 0ms), transform 560ms ease var(--phspb-smart-preview-delay, 0ms), border-color 220ms ease, box-shadow 220ms ease;
}

body.phspb-stream-template .phspb-smart-preview-fallback.phspb-smart-preview-visible .phspb-smart-preview-card {
  opacity: 1;
  transform: translateY(0);
}

@keyframes phspb-smart-preview-live-dot {
  0%, 100% { opacity: .58; transform: scale(.92); }
  50% { opacity: 1; transform: scale(1.06); }
}

@keyframes phspb-smart-preview-heart {
  0% { transform: scale(1); }
  28% { transform: scale(1.14); }
  55% { transform: scale(.97); }
  78% { transform: scale(1.07); }
  100% { transform: scale(1); }
}

@media (max-width: 760px) {
  body.phspb-stream-template .phspb-hero-main-card .phspb-embed-wrap.phspb-smart-preview-wrap {
    aspect-ratio: auto !important;
    min-height: 0 !important;
  }

  body.phspb-stream-template .phspb-smart-preview-fallback {
    grid-template-columns: 1fr;
    gap: 22px;
    min-height: 0;
    padding: 28px 18px 18px;
  }

  body.phspb-stream-template .phspb-smart-preview-fallback__content {
    gap: 11px;
  }

  body.phspb-stream-template .phspb-smart-preview-fallback h2 {
    max-width: 16ch;
    font-size: clamp(25px, 8vw, 34px) !important;
  }

  body.phspb-stream-template .phspb-smart-preview-fallback__content > p {
    font-size: 13px !important;
  }

  body.phspb-stream-template .phspb-smart-preview-fallback__cta {
    width: 100%;
    min-height: 50px;
    padding: 0 14px;
    font-size: 11px;
  }

  body.phspb-stream-template .phspb-smart-preview-fallback__grid {
    grid-template-columns: 1fr;
  }

  body.phspb-stream-template .phspb-smart-preview-card:nth-child(n+2) {
    display: none;
  }

  body.phspb-stream-template .phspb-smart-preview-card {
    grid-template-columns: 116px minmax(0, 1fr);
    align-items: stretch;
  }

  body.phspb-stream-template .phspb-smart-preview-card__thumb {
    aspect-ratio: auto;
    min-height: 82px;
  }

  body.phspb-stream-template .phspb-smart-preview-card__copy {
    align-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.phspb-stream-template .phspb-smart-preview-fallback__state i,
  body.phspb-stream-template .phspb-smart-preview-card__live i,
  body.phspb-stream-template .phspb-smart-preview-card__heart {
    animation: none !important;
  }

  body.phspb-stream-template .phspb-smart-preview-fallback.phspb-smart-preview-ready .phspb-smart-preview-fallback__content,
  body.phspb-stream-template .phspb-smart-preview-fallback.phspb-smart-preview-ready .phspb-smart-preview-fallback__alternatives,
  body.phspb-stream-template .phspb-smart-preview-fallback.phspb-smart-preview-ready .phspb-smart-preview-card {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
