/* TV season page additions. Shared movie-detail styling comes from pictures-watch.css. */

body.pictures-tvseries-page #main.pictures-watch-page #list-eps {
    margin-bottom: 12px;
}

body.pictures-tvseries-page #main.pictures-watch-page #list-eps .le-server {
    align-items: flex-start;
}

body.pictures-tvseries-page #main.pictures-watch-page #list-eps .les-title {
    min-width: 120px;
    padding-top: 8px;
}

body.pictures-tvseries-page #main.pictures-watch-page .pictures-episode-list {
    display: flex !important;
    flex: 1 1 500px;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px !important;
}

body.pictures-tvseries-page #main.pictures-watch-page .pictures-episode-btn {
    min-width: 42px !important;
    height: 34px;
    padding: 0 10px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    border: 1px solid #dce6e9;
    border-radius: 3px;
    background: #f3f7f8;
    color: #26343a !important;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    box-sizing: border-box;
}

body.pictures-tvseries-page #main.pictures-watch-page a.pictures-episode-btn:hover,
body.pictures-tvseries-page #main.pictures-watch-page a.pictures-episode-btn:focus {
    border-color: var(--main-brand-color, #08a9c0);
    color: var(--main-brand-color, #08a9c0) !important;
}

body.pictures-tvseries-page #main.pictures-watch-page .pictures-episode-btn.active {
    border-color: var(--main-brand-color, #08a9c0);
    background: var(--main-brand-color, #08a9c0);
    color: #fff !important;
}

body.pictures-tvseries-page #main.pictures-watch-page .pictures-episode-btn.is-disabled {
    opacity: .45;
    cursor: default;
}

body.pictures-tvseries-page #main.pictures-watch-page .pictures-no-episodes {
    display: inline-block;
    padding: 8px 0;
    color: #777;
    font-size: 13px;
}

body.pictures-tvseries-page #main.pictures-watch-page .pictures-no-player {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #ddd;
    text-align: center;
    transform: none;
    top: auto;
    left: auto;
    right: auto;
}

body.pictures-tvseries-page #main.pictures-watch-page .mlw-related {
    margin-top: 28px;
}

@media (max-width: 600px) {
    body.pictures-tvseries-page #main.pictures-watch-page #list-eps .le-server {
        display: block;
    }

    body.pictures-tvseries-page #main.pictures-watch-page #list-eps .les-title {
        min-width: 0;
        margin-bottom: 8px;
        padding-top: 0;
    }

    body.pictures-tvseries-page #main.pictures-watch-page .pictures-episode-list {
        gap: 6px !important;
    }

    body.pictures-tvseries-page #main.pictures-watch-page .pictures-episode-btn {
        min-width: 40px !important;
        height: 32px;
        padding: 0 8px !important;
    }
}


/* v2: Generated TMDB servers and grouped episode selectors. */
body.pictures-tvseries-page #main.pictures-watch-page .pictures-tv-server-row {
    align-items: center;
}

body.pictures-tvseries-page #main.pictures-watch-page .pictures-tv-server-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    flex: 1 1 400px;
}

body.pictures-tvseries-page #main.pictures-watch-page .pictures-tv-server-tab {
    min-width: 88px;
    height: 34px;
    padding: 0 12px;
    border: 1px solid #dce6e9;
    border-radius: 3px;
    background: #f3f7f8;
    color: #26343a;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

body.pictures-tvseries-page #main.pictures-watch-page .pictures-tv-server-tab:hover,
body.pictures-tvseries-page #main.pictures-watch-page .pictures-tv-server-tab:focus {
    border-color: var(--main-brand-color, #08a9c0);
    color: var(--main-brand-color, #08a9c0);
}

body.pictures-tvseries-page #main.pictures-watch-page .pictures-tv-server-tab.active {
    border-color: var(--main-brand-color, #08a9c0);
    background: var(--main-brand-color, #08a9c0);
    color: #fff;
}

body.pictures-tvseries-page #main.pictures-watch-page .pictures-episode-groups {
    display: block !important;
    flex: 1 1 500px;
}

body.pictures-tvseries-page #main.pictures-watch-page .pictures-episode-group {
    display: none;
    flex-wrap: wrap;
    gap: 7px;
}

body.pictures-tvseries-page #main.pictures-watch-page .pictures-episode-group.active {
    display: flex;
}

@media (max-width: 600px) {
    body.pictures-tvseries-page #main.pictures-watch-page .pictures-tv-server-tabs {
        margin-top: 8px;
    }

    body.pictures-tvseries-page #main.pictures-watch-page .pictures-tv-server-tab {
        flex: 1 1 90px;
    }
}


/* v3: render the TV detail poster as a real image, not only a background. */
body.pictures-tvseries-page #main.pictures-watch-page
.mvi-content > .pictures-tv-detail-poster {
    overflow: hidden;
    border-radius: 4px;
    background: #eef2f3;
}

body.pictures-tvseries-page #main.pictures-watch-page
.mvi-content > .pictures-tv-detail-poster img {
    width: 100%;
    height: 210px;
    display: block;
    object-fit: cover;
    object-position: center;
}

@media (max-width: 991px) {
    body.pictures-tvseries-page #main.pictures-watch-page
    .mvi-content > .pictures-tv-detail-poster img {
        height: 180px;
    }
}

@media (max-width: 600px) {
    body.pictures-tvseries-page #main.pictures-watch-page
    .mvi-content > .pictures-tv-detail-poster img {
        height: 135px;
    }
}



/* v4: TV navigation layout, matching the site's white/cyan palette. */
body.pictures-tvseries-page #main.pictures-watch-page #list-eps.pictures-tv-navigation {
    display: flex !important;
    flex-direction: column;
    gap: 12px;
    margin: 0 0 12px;
    padding: 12px 0;
    background: #f4f6f7;
    border-bottom: 0;
}
body.pictures-tvseries-page .pictures-tv-control-bar,
body.pictures-tvseries-page .pictures-tv-panel {
    background: #fff;
    border: 1px solid #dfe7eb;
    border-radius: 6px;
    padding: 13px 15px;
}
body.pictures-tvseries-page .pictures-tv-control-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
}
body.pictures-tvseries-page .pictures-tv-control-actions,
body.pictures-tvseries-page .pictures-tv-server-tabs,
body.pictures-tvseries-page .pictures-tv-season-list,
body.pictures-tvseries-page .pictures-tv-episode-list {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    align-items: center;
}
body.pictures-tvseries-page .pictures-tv-server-tabs { margin-left: auto; }
/* Override the older grouped-selector flex basis: keep servers on the right. */
body.pictures-tvseries-page #main.pictures-watch-page #list-eps.pictures-tv-navigation .pictures-tv-server-tabs {
    flex: 0 1 auto;
}
body.pictures-tvseries-page #main.pictures-watch-page #list-eps .pictures-tv-action-btn,
body.pictures-tvseries-page #main.pictures-watch-page #list-eps .pictures-tv-server-tab,
body.pictures-tvseries-page #main.pictures-watch-page #list-eps .pictures-tv-season-link,
body.pictures-tvseries-page #main.pictures-watch-page #list-eps .pictures-tv-episode-btn {
    box-sizing: border-box;
    display: inline-flex !important;
    justify-content: center;
    align-items: center;
    width: auto;
    min-height: 34px;
    padding: 8px 12px !important;
    border: 1px solid #d6e1e5;
    border-radius: 4px;
    color: #344653 !important;
    background: #f4f8f9;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    text-decoration: none !important;
    cursor: pointer;
    transition: background-color .15s, color .15s, border-color .15s;
}
body.pictures-tvseries-page #main.pictures-watch-page #list-eps .pictures-tv-action-btn:hover:not(:disabled),
body.pictures-tvseries-page #main.pictures-watch-page #list-eps .pictures-tv-server-tab:hover,
body.pictures-tvseries-page #main.pictures-watch-page #list-eps .pictures-tv-season-link:hover,
body.pictures-tvseries-page #main.pictures-watch-page #list-eps .pictures-tv-episode-btn:hover:not(:disabled) {
    border-color: var(--main-brand-color, #07a9be);
    color: #007c93 !important;
    background: #ecfbfd;
}
body.pictures-tvseries-page #main.pictures-watch-page #list-eps .pictures-tv-server-tab.active,
body.pictures-tvseries-page #main.pictures-watch-page #list-eps .pictures-tv-season-link.active,
body.pictures-tvseries-page #main.pictures-watch-page #list-eps .pictures-tv-episode-btn.active {
    color: #fff !important;
    background: var(--main-brand-color, #08a9c0);
    border-color: var(--main-brand-color, #08a9c0);
}
body.pictures-tvseries-page #main.pictures-watch-page #list-eps button:disabled {
    opacity: .48;
    cursor: not-allowed;
}
body.pictures-tvseries-page #main.pictures-watch-page .pictures-tv-panel-title {
    margin: 0;
    padding: 0;
    color: #222f38;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.4;
}
body.pictures-tvseries-page .pictures-tv-panel-title small {
    color: #71818c;
    font-size: 12px;
    font-weight: 600;
}
body.pictures-tvseries-page .pictures-tv-panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
body.pictures-tvseries-page #pictures-tv-now-playing {
    color: var(--main-brand-color, #08a9c0);
    font-size: 12px;
    font-weight: 700;
}
body.pictures-tvseries-page .pictures-tv-seasons .pictures-tv-panel-title {
    margin-bottom: 10px !important;
}
body.pictures-tvseries-page #main.pictures-watch-page #list-eps .pictures-tv-season-link {
    min-width: 47px;
}
body.pictures-tvseries-page #main.pictures-watch-page #list-eps .pictures-tv-episode-btn {
    min-width: 51px;
    margin: 0 !important;
}
@media (max-width: 680px) {
    body.pictures-tvseries-page .pictures-tv-control-bar,
    body.pictures-tvseries-page .pictures-tv-panel { padding: 12px; }
    body.pictures-tvseries-page .pictures-tv-control-actions { width: 100%; }
    body.pictures-tvseries-page .pictures-tv-server-tabs {
        width: 100%;
        margin-left: 0;
        justify-content: flex-start;
    }
    body.pictures-tvseries-page #main.pictures-watch-page #list-eps .pictures-tv-action-btn { flex: 1 1 auto; }
    body.pictures-tvseries-page #main.pictures-watch-page #list-eps .pictures-tv-server-tab { flex: 1 1 82px; }
    body.pictures-tvseries-page .pictures-tv-season-list,
    body.pictures-tvseries-page .pictures-tv-episode-list { gap: 6px; }
}


/* v6: UI polish. Scoped to TV seasons; ad placements/buttons unchanged. */
body.pictures-tvseries-page #main.pictures-watch-page #list-eps.pictures-tv-navigation {
    gap: 9px;
    padding: 9px 0 12px;
    margin-bottom: 10px;
}
body.pictures-tvseries-page .pictures-tv-control-bar,
body.pictures-tvseries-page .pictures-tv-panel {
    border-color: #e1e9ed;
    border-radius: 7px;
    box-shadow: 0 1px 1px rgba(30, 54, 68, .025);
}
body.pictures-tvseries-page .pictures-tv-control-bar { padding: 11px 15px; }
body.pictures-tvseries-page .pictures-tv-control-actions { gap: 9px; }
body.pictures-tvseries-page #main.pictures-watch-page #list-eps .pictures-tv-action-btn {
    font-size: 12.5px;
}
body.pictures-tvseries-page #main.pictures-watch-page #list-eps .pictures-tv-season-link.active,
body.pictures-tvseries-page #main.pictures-watch-page #list-eps .pictures-tv-episode-btn.active {
    box-shadow: 0 2px 7px rgba(0, 156, 179, .19);
    font-weight: 800;
}
body.pictures-tvseries-page #pictures-tv-now-playing {
    display: inline-flex;
    align-items: center;
    min-height: 23px;
    background: #eaf9fc;
    border: 1px solid #d4eef3;
    padding: 3px 9px;
    border-radius: 20px;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 800;
}
body.pictures-tvseries-page #pictures-tv-now-playing:empty { display: none; }
body.pictures-tvseries-page #main.pictures-watch-page #mv-info .mvi-content {
    grid-template-columns: 160px minmax(0,1fr) 192px;
    column-gap: 24px;
    row-gap: 16px;
    padding: 24px;
}
body.pictures-tvseries-page #main.pictures-watch-page #mv-info .mvi-content > .mvic-thumb {
    width: 160px;
    height: 240px;
}
body.pictures-tvseries-page #main.pictures-watch-page .mvi-content > .pictures-tv-detail-poster img {
    height: 240px;
    object-fit: cover;
}
body.pictures-tvseries-page #main.pictures-watch-page #mv-info .mvi-content h1 {
    font-size: 25px;
    line-height: 1.28;
    font-weight: 750;
    margin: 0 0 11px;
}
body.pictures-tvseries-page #main.pictures-watch-page #mv-info .mvi-content .desc {
    font-size: 14px;
    color: #4c5961;
    line-height: 1.72;
    margin-bottom: 18px;
}
body.pictures-tvseries-page #main.pictures-watch-page #mv-info .mvi-content .mvic-info {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 18px;
}
body.pictures-tvseries-page #main.pictures-watch-page #mv-info .mvi-content .mvic-info .mvici-left,
body.pictures-tvseries-page #main.pictures-watch-page #mv-info .mvi-content .mvic-info .mvici-right {
    width: auto;
    margin: 0;
    float: none;
    min-width: 0;
}
body.pictures-tvseries-page #main.pictures-watch-page #mv-info .mvi-content .mvic-info p {
    font-size: 13px;
    line-height: 1.62;
    margin-bottom: 7px;
    overflow-wrap: anywhere;
}
body.pictures-tvseries-page #main.pictures-watch-page #mv-info .mvi-content .mvic-info strong {
    color: #273640;
}
body.pictures-tvseries-page #main.pictures-watch-page .mlw-related { margin-top: 18px; }
body.pictures-tvseries-page #main.pictures-watch-page .mlw-related .ml-title span {
    font-size: 19px;
}
@media (max-width: 991px) {
    body.pictures-tvseries-page #main.pictures-watch-page #mv-info .mvi-content {
        grid-template-columns: 125px minmax(0,1fr);
        column-gap: 18px;
    }
    body.pictures-tvseries-page #main.pictures-watch-page #mv-info .mvi-content > .mvic-thumb {
        width: 125px;
        height: 188px;
    }
    body.pictures-tvseries-page #main.pictures-watch-page .mvi-content > .pictures-tv-detail-poster img {
        height: 188px;
    }
}
@media (max-width: 680px) {
    body.pictures-tvseries-page .pictures-tv-control-bar { padding: 12px; }
    body.pictures-tvseries-page .pictures-tv-season-list,
    body.pictures-tvseries-page .pictures-tv-episode-list {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        padding: 2px 2px 8px;
        gap: 7px;
    }
    body.pictures-tvseries-page #main.pictures-watch-page #list-eps .pictures-tv-season-link,
    body.pictures-tvseries-page #main.pictures-watch-page #list-eps .pictures-tv-episode-btn {
        flex: 0 0 auto;
        white-space: nowrap;
    }
    body.pictures-tvseries-page #main.pictures-watch-page #mv-info .mvi-content {
        padding: 16px;
        grid-template-columns: 94px minmax(0, 1fr);
        column-gap: 13px;
    }
    body.pictures-tvseries-page #main.pictures-watch-page #mv-info .mvi-content > .mvic-thumb {
        width: 94px;
        height: 141px;
    }
    body.pictures-tvseries-page #main.pictures-watch-page .mvi-content > .pictures-tv-detail-poster img { height: 141px; }
    body.pictures-tvseries-page #main.pictures-watch-page #mv-info .mvi-content h1 { font-size: 21px; }
    body.pictures-tvseries-page #main.pictures-watch-page #mv-info .mvi-content .mvic-info {
        grid-template-columns: minmax(0,1fr);
        gap: 0;
    }
    body.pictures-tvseries-page .pictures-tv-panel-heading { align-items: flex-start; flex-wrap: wrap; }
    body.pictures-tvseries-page #pictures-tv-now-playing { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) {
    body.pictures-tvseries-page #main.pictures-watch-page #list-eps .pictures-tv-action-btn,
    body.pictures-tvseries-page #main.pictures-watch-page #list-eps .pictures-tv-server-tab,
    body.pictures-tvseries-page #main.pictures-watch-page #list-eps .pictures-tv-season-link,
    body.pictures-tvseries-page #main.pictures-watch-page #list-eps .pictures-tv-episode-btn { transition: none; }
}

