/* Watch page: player frame, metadata, paywall, up next */

.bfx-watch-shell {
    max-width: 1464px;
    margin-left: auto;
    margin-right: auto;
}

.bfx-watch-player-frame {
    border-radius: var(--bfx-radius-frame);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: #050505;
    box-shadow: var(--bfx-shadow-player-depth);
}

.bfx-watch-shell .bfx-watch-player-frame {
    position: relative;
}

.bfx-watch-player-frame .video-item,
.bfx-watch-player-frame .video-js {
    margin-bottom: 0 !important;
}

/* Pause/ended overlay: logo + title top-right; top + bottom scrims for legibility */
.bfx-video-player-wrapper {
    position: relative;
}

.bfx-video-pause-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 1.1rem 1.35rem 5rem;
    text-align: right;
    background:
        linear-gradient(
            180deg,
            rgba(0, 0, 0, 0.78) 0%,
            rgba(0, 0, 0, 0.38) 32%,
            transparent 58%
        ),
        linear-gradient(
            0deg,
            rgba(0, 0, 0, 0.52) 0%,
            rgba(0, 0, 0, 0.22) 28%,
            transparent 52%
        );
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.bfx-video-pause-overlay.bfx-overlay-visible {
    opacity: 1;
    visibility: visible;
}

.bfx-overlay-logo {
    height: 1.85rem;
    width: auto;
    max-width: min(160px, 42vw);
    object-fit: contain;
    object-position: right center;
    margin-bottom: 0.45rem;
}

.bfx-overlay-title {
    font-size: clamp(1rem, 2.2vw, 1.65rem);
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.2;
    max-width: min(100%, 72vw);
    text-align: right;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85), 0 2px 14px rgba(0, 0, 0, 0.55);
}

.bfx-watch-paywall.carousel-section-banner {
    border-radius: var(--bfx-radius-frame);
    overflow: hidden;
    border: 1px solid var(--bfx-glass-border);
    box-shadow: var(--bfx-shadow-header);
}

/* Match unlocked player chrome when paywall uses .bfx-watch-player-frame */
.bfx-watch-player-frame.bfx-watch-paywall.carousel-section-banner {
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: var(--bfx-shadow-player-depth);
}

/* Paywall hero: 16:9 frame, thumbnail + scrim + centered CTA */
.video-page-ambient .bfx-watch-paywall--ambient.bfx-watch-player-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0 !important;
    aspect-ratio: 16 / 9;
    width: 100%;
    max-height: min(72vh, 900px);
}

.video-page-ambient .bfx-watch-paywall--ambient .bfx-watch-paywall__thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    z-index: 0;
}

.video-page-ambient .bfx-watch-paywall--ambient.carousel-section-banner::before {
    z-index: 1;
    opacity: 0.45;
}

/* Logged-out watch: slightly stronger gradient scrim on thumbnail for CTA legibility */
.video-page-ambient
    .bfx-watch-paywall--ambient.bfx-watch-paywall--guest.carousel-section-banner::before {
    background-color: transparent;
    background-image: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.5) 0%,
        rgba(0, 0, 0, 0.68) 42%,
        rgba(0, 0, 0, 0.82) 100%
    );
    opacity: 1;
}

/* Reset global .carousel-content absolute centering (breaks when position becomes relative) */
.video-page-ambient .bfx-watch-paywall--ambient .carousel-content {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    transform: none;
    z-index: 2;
    padding: 2rem 1.25rem;
    max-width: 28rem;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

/* Title / description block — reuses program glass panel tokens */
.video-page-meta-panel.program-head--ambient-panel {
    margin-top: 0.25rem;
}

.bfx-watch-paywall__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem 0.75rem;
    width: 100%;
}

.bfx-watch-paywall .trial-btn,
.bfx-watch-paywall .learnmore-btn {
    border-radius: 12px !important;
    transition: opacity 0.15s ease, transform 0.15s ease;
    box-sizing: border-box;
}

.bfx-watch-paywall .trial-btn {
    background-color: var(--bfx-accent) !important;
}

.bfx-watch-paywall .trial-btn:hover {
    background-color: var(--bfx-accent-hover) !important;
}

/* Mobile paywall CTAs: primary full-width (capped); secondary hug text (no forced 250px match) */
@media (max-width: 575.98px) {
    .video-page-ambient .bfx-watch-paywall--ambient .bfx-watch-paywall__cta {
        padding: 1.15rem 0.9rem 1.35rem;
    }

    .video-page-ambient .bfx-watch-paywall__headline {
        font-size: 0.68rem;
        letter-spacing: 0.06em;
        line-height: 1.4;
        margin-bottom: 0.9rem !important;
        padding: 0 0.25rem;
    }

    .video-page-ambient .bfx-watch-paywall__actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.65rem;
        max-width: 17.5rem;
        margin-left: auto;
        margin-right: auto;
    }

    .bfx-watch-paywall .trial-btn {
        width: 100%;
        max-width: none;
        padding: 0.7rem 1rem !important;
        font-size: 0.8125rem;
        font-weight: 600;
        line-height: 1.3;
        border: none;
    }

    .bfx-watch-paywall .learnmore-btn {
        width: fit-content;
        max-width: 100%;
        align-self: center;
        padding: 0.6rem 1.4rem !important;
        font-size: 0.8125rem;
        font-weight: 600;
        line-height: 1.3;
        opacity: 1 !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        background-color: rgba(48, 44, 46, 0.92) !important;
    }
}

@media (min-width: 576px) and (max-width: 991.98px) {
    .bfx-watch-paywall__actions {
        gap: 0.55rem 0.85rem;
    }

    .bfx-watch-paywall .trial-btn,
    .bfx-watch-paywall .learnmore-btn {
        width: auto;
        min-width: 10.5rem;
        padding: 0.55rem 1.15rem !important;
        font-size: 0.875rem;
        font-weight: 600;
    }
}

.bfx-watch-meta {
    gap: 1rem;
}

.bfx-watch-title {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.bfx-watch-meta .total-video-time {
    color: var(--bfx-text-muted);
    font-size: 0.95rem;
}

/* Full width of the watch container — match video player column, not a narrow measure */
.bfx-watch-description {
    max-width: 100%;
    width: 100%;
    color: var(--bfx-text-description);
    line-height: 1.65;
    font-size: 15px;
}

.bfx-watch-description p,
.bfx-watch-description div {
    max-width: 100%;
    color: inherit;
}

.bfx-up-next-section.videocard-section-2 {
    margin-top: 2.5rem !important;
}

.bfx-up-next-section .bfx-up-next-heading {
    font-size: 1rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.9;
}

.bfx-up-next-card.team-item {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bfx-up-next-card .videocard-content {
    border-radius: var(--bfx-radius-card);
    background: #0c0c0c;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--bfx-shadow-up-next);
}

.bfx-up-next-card .videocard-content::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    pointer-events: none;
    z-index: 2;
}

.bfx-up-next-card:hover .videocard-content {
    box-shadow: var(--bfx-shadow-up-next-hover);
}

.bfx-up-next-card:hover {
    transform: translateY(-4px);
}

.bfx-up-next-card .videocard-content-text p {
    font-size: 0.95rem;
    line-height: 1.35;
}

@media (prefers-reduced-motion: reduce) {
    .bfx-up-next-card.team-item {
        transition: none;
    }

    .bfx-watch-paywall .trial-btn,
    .bfx-watch-paywall .learnmore-btn {
        transition: none;
    }
}
