.saba-live-preview {
    position: fixed;
    z-index: 99990;
    inset-inline-start: 24px;
    bottom: 24px;
    width: min(390px, calc(100vw - 32px));
    overflow: hidden;
    color: #fff;
    background: #101c2b;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(2,16,36,.32);
}

.saba-live-preview[hidden] {
    display: none;
}

.saba-live-preview__topbar {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    background: #102841;
}

.saba-live-preview__status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
}

.saba-live-preview__status i,
.saba-live-page__eyebrow i {
    width: 9px;
    height: 9px;
    display: inline-block;
    border-radius: 50%;
    background: #ef3340;
    box-shadow: 0 0 0 5px rgba(239,51,64,.14);
}

.saba-live-preview__actions {
    display: flex;
    gap: 7px;
}

.saba-live-preview__actions button {
    width: 31px;
    height: 31px;
    color: #fff;
    cursor: pointer;
    border: 0;
    border-radius: 9px;
    background: rgba(255,255,255,.1);
    font-size: 19px;
}

.saba-live-preview__video {
    background: #05080d;
}

.saba-live-preview .video-js {
    width: 100%;
    aspect-ratio: 16 / 9;
}

.saba-live-preview__link {
    display: block;
    padding: 13px 18px;
    color: #082d50;
    background: #f47b20;
    text-align: center;
    text-decoration: none;
    font-weight: 800;
}

.saba-live-preview.is-minimized
.saba-live-preview__video,

.saba-live-preview.is-minimized
.saba-live-preview__link {
    display: none;
}

.saba-live-page {
    min-height: calc(100vh - 160px);
    padding: clamp(44px, 7vw, 90px) 20px;
    background:
        radial-gradient(
            circle at 80% 10%,
            rgba(244,123,32,.11),
            transparent 30%
        ),
        #f6f8fb;
}

.saba-live-page__inner {
    width: min(1180px, 100%);
    margin-inline: auto;
}

.saba-live-page__heading {
    margin-bottom: 30px;
    text-align: center;
}

.saba-live-page__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #f47b20;
    font-weight: 800;
}

.saba-live-page h1 {
    margin: 12px 0 8px;
    color: #0c1b35;
    font-size: clamp(42px, 6vw, 72px);
    line-height: 1.1;
}

.saba-live-page p {
    margin: 0;
    color: #5c6a7d;
    font-size: 18px;
}

.saba-live-page__player {
    overflow: hidden;
    background: #05080d;
    border-radius: 22px;
    box-shadow: 0 28px 75px rgba(8,28,56,.2);
}

.saba-live-page__player .video-js {
    width: 100%;
    aspect-ratio: 16 / 9;
}

.video-js .vjs-live-control {
    display: flex;
}

@media (max-width: 720px) {
    .saba-live-preview {
        inset-inline: 12px;
        bottom: 12px;
        width: auto;
    }

    .saba-live-page {
        padding-inline: 12px;
    }

    .saba-live-page__player {
        border-radius: 14px;
    }
}

/* SABA LIVE CONTAINMENT V051 START */

/*
 * These rules deliberately use the component ID to prevent page,
 * program-grid or Video.js rules from stretching the floating player.
 */

#sabaLivePreview.saba-live-preview {
  position: fixed !important;
  inset-inline-end: 22px !important;
  inset-inline-start: auto !important;
  inset-block-end: 22px !important;
  inset-block-start: auto !important;

  width: clamp(320px, 25vw, 410px) !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: calc(100dvh - 110px) !important;

  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;

  margin: 0 !important;
  padding: 0 !important;

  border: 1px solid rgba(255, 255, 255, .16) !important;
  border-radius: 20px !important;

  background: #061d36 !important;
  box-shadow:
    0 28px 75px rgba(2, 14, 27, .34),
    0 8px 24px rgba(2, 14, 27, .2) !important;

  transform: none;
  contain: layout paint;
  isolation: isolate;
  z-index: 9990 !important;
}

#sabaLivePreview .saba-live-preview__topbar {
  position: relative !important;
  flex: 0 0 48px !important;
  width: 100% !important;
  min-height: 48px !important;
  max-height: 48px !important;
  box-sizing: border-box !important;
}

#sabaLivePreview .saba-live-preview__body,
#sabaLivePreview .saba-live-preview__media,
#sabaLivePreview .saba-live-preview__stage,
#sabaLivePreview .saba-live-preview__player {
  position: relative !important;
  flex: 0 0 auto !important;

  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;

  margin: 0 !important;
  padding: 0 !important;

  overflow: hidden !important;
  box-sizing: border-box !important;
}

#sabaLivePreview .saba-live-preview__media,
#sabaLivePreview .saba-live-preview__stage,
#sabaLivePreview .saba-live-preview__player {
  aspect-ratio: 16 / 9 !important;
  background: #000 !important;
}

#sabaLivePreview video,
#sabaLivePreview .video-js,
#sabaLivePreview .video-js video,
#sabaLivePreview .vjs-tech {
  position: absolute !important;
  inset: 0 !important;

  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;

  margin: 0 !important;
  padding: 0 !important;

  object-fit: contain !important;
  background: #000 !important;
}

#sabaLivePreview .video-js {
  position: relative !important;
  inset: auto !important;
  aspect-ratio: 16 / 9 !important;
}

#sabaLivePreview .saba-live-preview__footer,
#sabaLivePreview .saba-live-preview__action,
#sabaLivePreview > a:last-child {
  position: relative !important;
  flex: 0 0 auto !important;

  width: 100% !important;
  min-height: 48px !important;
  max-height: 58px !important;

  margin: 0 !important;
  box-sizing: border-box !important;
}

/* Minimized state must never retain the video height. */

#sabaLivePreview.is-minimized,
#sabaLivePreview[data-minimized="true"] {
  width: min(320px, calc(100vw - 28px)) !important;
  height: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
}

#sabaLivePreview.is-minimized
  .saba-live-preview__body,
#sabaLivePreview.is-minimized
  .saba-live-preview__media,
#sabaLivePreview.is-minimized
  .saba-live-preview__stage,
#sabaLivePreview.is-minimized
  .saba-live-preview__player,
#sabaLivePreview.is-minimized
  .saba-live-preview__footer,
#sabaLivePreview.is-minimized
  .saba-live-preview__action,
#sabaLivePreview[data-minimized="true"]
  .saba-live-preview__body,
#sabaLivePreview[data-minimized="true"]
  .saba-live-preview__media,
#sabaLivePreview[data-minimized="true"]
  .saba-live-preview__stage,
#sabaLivePreview[data-minimized="true"]
  .saba-live-preview__player,
#sabaLivePreview[data-minimized="true"]
  .saba-live-preview__footer,
#sabaLivePreview[data-minimized="true"]
  .saba-live-preview__action {
  display: none !important;
}

/* Prevent duplicated widgets during dynamic/browser restoration. */

body > #sabaLivePreview ~ #sabaLivePreview {
  display: none !important;
}

@media (max-width: 720px) {
  #sabaLivePreview.saba-live-preview {
    inset-inline: 12px !important;
    inset-block-end: 12px !important;

    width: auto !important;
    max-width: none !important;
    max-height: calc(100dvh - 90px) !important;

    border-radius: 17px !important;
  }

  #sabaLivePreview .saba-live-preview__topbar {
    flex-basis: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
  }
}

/* SABA LIVE CONTAINMENT V051 END */

/* SABA LIVE CONNECTION V052 */
#sabaLivePreview .saba-live-preview__video {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 75% 20%,
            rgba(31, 119, 180, 0.24),
            transparent 45%
        ),
        linear-gradient(145deg, #07192b, #102f4e);
}

#sabaLivePreview .saba-live-connection {
    position: absolute;
    inset: 0;
    z-index: 8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 1rem;
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 700;
    text-align: center;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    background:
        linear-gradient(
            135deg,
            rgba(5, 24, 43, 0.96),
            rgba(13, 55, 90, 0.92)
        );
    transition:
        opacity 180ms ease,
        visibility 180ms ease;
}

#sabaLivePreview.is-connecting
    .saba-live-connection,
#sabaLivePreview.is-retrying
    .saba-live-connection,
#sabaLivePreview.has-live-error
    .saba-live-connection {
    opacity: 1;
    visibility: visible;
}

#sabaLivePreview.is-playing
    .saba-live-connection {
    opacity: 0;
    visibility: hidden;
}

#sabaLivePreview .saba-live-connection__pulse {
    width: 0.72rem;
    height: 0.72rem;
    flex: 0 0 0.72rem;
    border-radius: 999px;
    background: #ff7a1a;
    box-shadow:
        0 0 0 0 rgba(255, 122, 26, 0.65);
    animation:
        saba-live-pulse 1.45s ease-out infinite;
}

#sabaLivePreview.has-live-error
    .saba-live-connection__pulse {
    background: #e44a4a;
    animation: none;
}

#sabaLivePreview
    .video-js
    .vjs-big-play-button {
    display: none !important;
}

#sabaLivePreview.is-connecting
    .video-js,
#sabaLivePreview.is-retrying
    .video-js {
    opacity: 0.15;
}

#sabaLivePreview.is-playing
    .video-js {
    opacity: 1;
    transition: opacity 220ms ease;
}

@keyframes saba-live-pulse {
    0% {
        box-shadow:
            0 0 0 0 rgba(255, 122, 26, 0.68);
    }

    70% {
        box-shadow:
            0 0 0 0.55rem rgba(255, 122, 26, 0);
    }

    100% {
        box-shadow:
            0 0 0 0 rgba(255, 122, 26, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    #sabaLivePreview .saba-live-connection,
    #sabaLivePreview .video-js {
        transition: none;
    }

    #sabaLivePreview
        .saba-live-connection__pulse {
        animation: none;
    }
}
/* END SABA LIVE CONNECTION V052 */
