/*
|--------------------------------------------------------------------------
| UBEXMedia TV Show Detail
|--------------------------------------------------------------------------
*/

.tvshow-page {
    background: #080b11;
    color: #fff;
    min-height: 100vh;
}


/*
|--------------------------------------------------------------------------
| Hero
|--------------------------------------------------------------------------
*/

.tvshow-hero {
    position: relative;
    width: 100%;
    min-height: clamp(520px, 56.25vw, 820px);

    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;

    display: flex;
    align-items: center;

    overflow: hidden;
}


/*
 * Navy -> blue -> transparent.
 *
 * The dark navy begins behind the text,
 * transitions through UBEX blue, and disappears
 * toward the artwork.
 */

.tvshow-hero-gradient {
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            90deg,
            rgba(8, 24, 55, 1) 0%,
            rgba(15, 52, 103, 0.98) 24%,
            rgba(21, 102, 168, 0.82) 44%,
            rgba(46, 197, 240, 0.28) 61%,
            rgba(0, 0, 0, 0) 78%
        );

    z-index: 1;
}


/*
 * Subtle bottom fade into page.
 */

.tvshow-hero::after {
    content: "";

    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    height: 28%;

    background:
        linear-gradient(
            to bottom,
            transparent,
            rgba(8, 11, 17, 0.95)
        );

    z-index: 1;

    pointer-events: none;
}


.tvshow-hero-content {
    position: relative;
    z-index: 2;

    width: min(92%, 1400px);

    margin: 0 auto;

    padding:
        clamp(60px, 8vw, 120px)
        0;

    max-width: 1400px;
}


.tvshow-hero-content > * {
    max-width: 610px;
}


.tvshow-title {
    margin: 0 0 22px;

    color: #fff;

    font-size:
        clamp(
            38px,
            5vw,
            72px
        );

    font-weight: 700;

    line-height: 1.02;
}


.tvshow-description {
    font-size:
        clamp(
            16px,
            1.4vw,
            20px
        );

    line-height: 1.65;

    color:
        rgba(255, 255, 255, 0.94);

    margin-bottom: 18px;
}


.tvshow-description p {
    margin: 0;
}


.tvshow-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;

    margin-bottom: 28px;

    color:
        rgba(255, 255, 255, 0.80);

    font-size: 14px;
}


/*
|--------------------------------------------------------------------------
| Hero Buttons
|--------------------------------------------------------------------------
*/

.tvshow-hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 14px;
}


.tvshow-watch-button,
.tvshow-details-button {
    min-height: 52px;

    border-radius: 6px;

    border: 0;

    cursor: pointer;

    padding:
        0 24px;

    font-size: 15px;
    font-weight: 700;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}


.tvshow-watch-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;

    color: #061323;

    background: #ffffff;
}


.tvshow-watch-button:hover {
    background:
        var(--ubex-cyan, #2EC5F0);

    transform:
        translateY(-1px);
}


.tvshow-watch-icon {
    width: 0;
    height: 0;

    border-top:
        8px solid transparent;

    border-bottom:
        8px solid transparent;

    border-left:
        13px solid currentColor;
}


.tvshow-details-button {
    color: #fff;

    border:
        1px solid
        rgba(255,255,255,0.55);

    background:
        rgba(4, 12, 26, 0.55);

    backdrop-filter:
        blur(7px);
}


.tvshow-details-button:hover {
    border-color:
        var(--ubex-cyan, #2EC5F0);

    color:
        var(--ubex-cyan, #2EC5F0);
}


/*
|--------------------------------------------------------------------------
| Details panel
|--------------------------------------------------------------------------
*/

.tvshow-details-panel {
    background:
        linear-gradient(
            90deg,
            #12284b,
            #173f73
        );

    padding: 0;

    max-height: 0;

    overflow: hidden;

    opacity: 0;

    transition:
        max-height 0.35s ease,
        padding 0.35s ease,
        opacity 0.25s ease;
}


.tvshow-details-panel.active {
    max-height: 700px;

    padding: 34px 0;

    opacity: 1;
}


.tvshow-details-inner {
    width: min(92%, 1400px);
    margin: auto;
}


.tvshow-details-inner h2 {
    margin:
        0 0 16px;
}


.tvshow-details-description {
    max-width: 900px;

    color:
        rgba(255,255,255,0.86);

    line-height: 1.7;
}


/*
|--------------------------------------------------------------------------
| Tabs
|--------------------------------------------------------------------------
*/

.tvshow-content-section {
    width: min(92%, 1400px);

    margin: auto;

    padding:
        0 0 80px;
}


.tvshow-tabs {
    display: flex;

    gap: 38px;

    border-bottom:
        1px solid
        rgba(255,255,255,0.11);
}


.tvshow-tab {
    position: relative;

    appearance: none;

    border: 0;
    background: none;

    padding:
        24px 0 18px;

    color:
        rgba(255,255,255,0.58);

    font-size: 15px;

    font-weight: 700;

    text-transform: uppercase;

    cursor: pointer;
}


.tvshow-tab:hover,
.tvshow-tab.active {
    color: #fff;
}


.tvshow-tab.active::after {
    content: "";

    position: absolute;

    left: 0;
    right: 0;
    bottom: -1px;

    height: 3px;

    background:
        var(--ubex-cyan, #2EC5F0);
}


.tvshow-tab-panel {
    display: none;

    padding-top: 36px;
}


.tvshow-tab-panel.active {
    display: block;
}


/*
|--------------------------------------------------------------------------
| Season dropdown
|--------------------------------------------------------------------------
*/

.tvshow-season-selector {
    display: flex;
    align-items: center;

    gap: 14px;

    margin-bottom: 30px;
}


.tvshow-season-selector label {
    font-size: 17px;
    font-weight: 700;
}


.tvshow-season-selector select {
    min-width: 230px;

    padding:
        10px 38px 10px 14px;

    color: #fff;

    border:
        1px solid
        rgba(255,255,255,0.25);

    border-radius: 5px;

    background:
        #141a24;

    font-size: 14px;
}


/*
|--------------------------------------------------------------------------
| Episodes
|--------------------------------------------------------------------------
*/

.tvshow-episode-list {
    display: grid;

    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        );

    gap: 26px;
}


.tvshow-episode-card {
    display: block;
}


.tvshow-episode-image {
    position: relative;

    display: block;

    width: 100%;

    aspect-ratio:
        16 / 9;

    overflow: hidden;

    background:
        #151a23;

    border-radius: 5px;
}


.tvshow-episode-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    display: block;

    transition:
        transform 0.3s ease,
        opacity 0.3s ease;
}


.tvshow-episode-card:hover
.tvshow-episode-image img {
    transform:
        scale(1.035);

    opacity: 0.86;
}


.tvshow-episode-placeholder {
    width: 100%;
    height: 100%;

    background:
        linear-gradient(
            135deg,
            #142a4d,
            #09101c
        );
}


.tvshow-episode-info {
    padding:
        14px 3px 4px;
}


.tvshow-episode-info h3 {
    margin:
        0 0 8px;

    font-size: 17px;
}


.tvshow-episode-info h3 a {
    color: #fff;
    text-decoration: none;
}


.tvshow-episode-info p {
    margin: 0;

    color:
        rgba(255,255,255,0.62);

    line-height: 1.5;

    font-size: 14px;
}


/*
|--------------------------------------------------------------------------
| Cast
|--------------------------------------------------------------------------
|
| These multiple selectors are intentional until I see
| your inc_cast.php markup.
*/

/*
|--------------------------------------------------------------------------
| Cast Grid
|--------------------------------------------------------------------------
*/

.tvshow-cast {
    width: 100%;
}

.cast-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 30px 24px;
}

.cast-member {
    text-align: center;
}

.cast-trigger {
    width: 100%;
    padding: 0;

    border: 0;
    background: transparent;

    color: #fff;

    cursor: pointer;
}

.cast-photo-wrap {
    display: block;

    width: 150px;
    height: 150px;

    max-width: 100%;

    margin: 0 auto 14px;

    border-radius: 50%;

    overflow: hidden;

    background: #151c28;

    border: 3px solid rgba(46, 197, 240, 0.35);

    transition:
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.cast-photo-wrap img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}

.cast-trigger:hover .cast-photo-wrap,
.cast-trigger:focus-visible .cast-photo-wrap {
    transform: scale(1.04);

    border-color: var(--ubex-cyan, #2EC5F0);

    box-shadow:
        0 8px 28px
        rgba(46, 197, 240, 0.18);
}

.cast-name {
    display: block;

    color: #fff;

    font-size: 15px;
    font-weight: 600;

    line-height: 1.35;
}


/*
|--------------------------------------------------------------------------
| Cast Lightbox
|--------------------------------------------------------------------------
*/

.cast-lightbox {
    position: fixed;
    inset: 0;

    display: none;

    align-items: center;
    justify-content: center;

    padding: 30px;

    background: rgba(0, 0, 0, 0.92);

    backdrop-filter: blur(5px);

    z-index: 999999;
}

.cast-lightbox.active {
    display: flex;
}

.cast-lightbox-panel {
    position: relative;

    width: min(92vw, 820px);

    padding: 42px;

    border:
        1px solid
        rgba(46, 197, 240, 0.28);

    border-radius: 10px;

    background:
        linear-gradient(
            135deg,
            #0d1727,
            #111923
        );

    color: #fff;

    box-shadow:
        0 30px 90px
        rgba(0, 0, 0, 0.7);
}

.cast-lightbox-close {
    position: absolute;

    top: 12px;
    right: 18px;

    padding: 0;

    border: 0;
    background: transparent;

    color: #fff;

    font-size: 38px;
    line-height: 1;

    cursor: pointer;
}

.cast-lightbox-close:hover {
    color: var(--ubex-cyan, #2EC5F0);
}

.cast-lightbox-layout {
    display: grid;

    grid-template-columns:
        190px 1fr;

    gap: 32px;

    align-items: start;
}

.cast-lightbox-photo img {
    width: 190px;
    height: 190px;

    object-fit: cover;

    border-radius: 50%;

    border:
        3px solid
        var(--ubex-cyan, #2EC5F0);
}

.cast-lightbox-info h3 {
    margin:
        5px 0 18px;

    font-size: 28px;
}

#cast-lightbox-bio {
    color:
        rgba(255, 255, 255, 0.78);

    line-height: 1.7;
}

#cast-lightbox-bio p:last-child {
    margin-bottom: 0;
}


/*
|--------------------------------------------------------------------------
| Responsive Cast
|--------------------------------------------------------------------------
*/

@media (max-width: 1100px) {

    .cast-grid {
        grid-template-columns:
            repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {

    .cast-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .cast-photo-wrap {
        width: 125px;
        height: 125px;
    }

    .cast-lightbox-layout {
        grid-template-columns: 1fr;

        text-align: center;
    }

    .cast-lightbox-photo img {
        width: 150px;
        height: 150px;
    }

    .cast-lightbox-panel {
        padding:
            42px 24px 28px;
    }
}

body.cast-modal-open {
    overflow: hidden;
}


/*
|--------------------------------------------------------------------------
| Empty content
|--------------------------------------------------------------------------
*/

.tvshow-empty-message {
    color:
        rgba(255,255,255,0.55);
}


/*
|--------------------------------------------------------------------------
| Responsive
|--------------------------------------------------------------------------
*/

@media
(max-width: 1000px) {

    .tvshow-hero {
        min-height: 600px;

        background-position:
            65% center;
    }


    .tvshow-hero-gradient {
        background:
            linear-gradient(
                90deg,
                rgba(8,24,55,1) 0%,
                rgba(15,52,103,0.96) 42%,
                rgba(21,102,168,0.58) 67%,
                rgba(0,0,0,0) 100%
            );
    }


    .tvshow-episode-list {
        grid-template-columns:
            repeat(
                2,
                minmax(0,1fr)
            );
    }
}


@media
(max-width: 650px) {

    .tvshow-hero {
        min-height: 620px;

        align-items:
            flex-end;

        background-position:
            64% center;
    }


    .tvshow-hero-gradient {
        background:
            linear-gradient(
                to top,
                rgba(8,24,55,1) 0%,
                rgba(15,52,103,0.92) 46%,
                rgba(21,102,168,0.40) 72%,
                rgba(0,0,0,0.05) 100%
            );
    }


    .tvshow-hero-content {
        padding:
            50px 0;
    }


    .tvshow-description {
        font-size:
            15px;
    }


    .tvshow-tabs {
        gap: 22px;
    }


    .tvshow-tab {
        font-size:
            13px;
    }


    .tvshow-episode-list {
        grid-template-columns:
            1fr;
    }


    .tvshow-season-selector {
        align-items:
            flex-start;

        flex-direction:
            column;
    }


    .tvshow-season-selector select {
        width: 100%;
    }
}