/* WebPhim Patch v3 - deliberate, narrow overrides on top of v1 and v2.
 * Loaded LAST by common/assets.php. PHP 7.4 compatible; no build tooling.
 */

/* Pagination: shrink v2's 70 x 64px buttons and 18px numerals. */
.pc-catalog-page .pc-catalog-pagination.wp-pagination-v2 {
    min-height:44px!important;
    margin-top:28px!important;
    margin-bottom:12px!important;
    overflow-x:auto;
    scrollbar-width:thin;
}
.pc-catalog-page .pc-catalog-pagination.wp-pagination-v2 .pc-page-pill,
.pc-catalog-page .pc-catalog-pagination.wp-pagination-v2 .wp-page-ellipsis {
    box-sizing:border-box!important;
    width:auto!important;
    min-width:50px!important;
    height:44px!important;
    min-height:44px!important;
    padding:0 12px!important;
    font-size:14px!important;
    line-height:1!important;
    font-weight:550!important;
    border:0!important;
}
.pc-catalog-page .pc-catalog-pagination.wp-pagination-v2 .pc-page-pill.is-current {
    font-weight:650!important;
}

/* Menu chevrons: replaced the text glyph with a proper, centered SVG. */
.wp-main-nav .wp-nav-trigger {
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center;
    gap:6px!important;
    vertical-align:middle;
}
.wp-main-nav .wp-nav-trigger .wp-nav-caret {
    display:block!important;
    position:static!important;
    width:14px!important;
    height:14px!important;
    flex:0 0 14px!important;
    margin:0!important;
    padding:0!important;
    opacity:.75;
    transform-origin:50% 50%;
    transition:transform .15s ease;
}
.wp-nav-dropdown:hover > .wp-nav-trigger .wp-nav-caret,
.wp-nav-dropdown:focus-within > .wp-nav-trigger .wp-nav-caret,
.wp-nav-dropdown.is-open > .wp-nav-trigger .wp-nav-caret {
    transform:rotate(180deg);
}

/* Watch-page cast: image-or-silhouette portraits like the reference. */
.pc-watch-page .wp-watch-cast {
    box-sizing:border-box;
    width:100%;
    min-width:0;
    margin:23px 0 26px!important;
}
.pc-watch-page .wp-watch-cast-grid {
    box-sizing:border-box;
    display:grid;
    grid-template-columns:repeat(9,minmax(0,1fr));
    align-items:start;
    gap:15px;
    width:100%;
}
.pc-watch-page .wp-watch-cast-person {
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:flex-start;
    min-width:0;
    gap:11px;
    color:#d2d3d8!important;
    text-decoration:none!important;
    text-align:center;
    line-height:1.35;
    font-weight:500;
}
.pc-watch-page .wp-watch-cast-avatar {
    display:block;
    position:relative;
    width:100%;
    max-width:148px;
    aspect-ratio:1/1;
    margin:0 auto;
    flex:0 0 auto;
    border-radius:50%;
    overflow:hidden;
    background:#1e2024;
    box-shadow:0 0 0 1px rgba(255,255,255,.025);
    transition:box-shadow .15s ease;
}
.pc-watch-page .wp-watch-cast-avatar .wp-watch-cast-placeholder,
.pc-watch-page .wp-watch-cast-avatar img {
    position:absolute;
    display:block;
    inset:0;
    width:100%;
    height:100%;
}
.pc-watch-page .wp-watch-cast-avatar img {
    object-fit:cover;
    object-position:center 20%;
    z-index:1;
}
.pc-watch-page .wp-watch-cast-avatar img[hidden] {display:none!important}
.pc-watch-page .wp-watch-cast-name {
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    max-width:100%;
    overflow:hidden;
    overflow-wrap:anywhere;
    font-size:13px;
    color:#c8c9cf;
    transition:color .15s;
}
.pc-watch-page a.wp-watch-cast-person:hover .wp-watch-cast-avatar,
.pc-watch-page a.wp-watch-cast-person:focus-visible .wp-watch-cast-avatar {
    box-shadow:0 0 0 2px var(--wp-green,#08c95b);
}
.pc-watch-page a.wp-watch-cast-person:hover .wp-watch-cast-name,
.pc-watch-page a.wp-watch-cast-person:focus-visible .wp-watch-cast-name {
    color:#fff;
}
.pc-watch-page a.wp-watch-cast-person:focus-visible {outline:2px solid var(--wp-green,#08c95b);outline-offset:4px;border-radius:4px}

/* The episode template now locates comments after the season/episode list. */
.pc-watch-page .pc-watch-info-grid > .pc-watch-comments {
    grid-column:1/-1;
    width:100%;
    min-width:0;
    margin:8px 0 0!important;
}

@media(max-width:1350px) {
    .pc-watch-page .wp-watch-cast-grid {grid-template-columns:repeat(7,minmax(0,1fr));gap:18px}
    .pc-watch-page .wp-watch-cast-avatar {max-width:135px}
}
@media(max-width:960px) {
    .pc-watch-page .wp-watch-cast-grid {grid-template-columns:repeat(5,minmax(0,1fr));gap:15px}
}
@media(max-width:760px) {
    .pc-catalog-page .pc-catalog-pagination.wp-pagination-v2 {min-height:40px!important;margin-top:22px!important}
    .pc-catalog-page .pc-catalog-pagination.wp-pagination-v2 .pc-page-pill,
    .pc-catalog-page .pc-catalog-pagination.wp-pagination-v2 .wp-page-ellipsis {
        min-width:40px!important;
        height:40px!important;
        min-height:40px!important;
        padding:0 8px!important;
        font-size:13px!important;
    }
    .pc-watch-page .wp-watch-cast {margin:18px 0 24px!important}
    .pc-watch-page .wp-watch-cast-grid {
        display:flex;
        gap:16px;
        overflow-x:auto;
        overscroll-behavior-x:contain;
        scroll-snap-type:x proximity;
        scrollbar-width:thin;
        padding:2px 2px 12px;
    }
    .pc-watch-page .wp-watch-cast-person {flex:0 0 98px;scroll-snap-align:start}
    .pc-watch-page .wp-watch-cast-avatar {width:94px;max-width:94px}
    .pc-watch-page .wp-watch-cast-name {font-size:12px}
}
@media(max-width:390px) {
    .pc-catalog-page .pc-catalog-pagination.wp-pagination-v2 .pc-page-pill,
    .pc-catalog-page .pc-catalog-pagination.wp-pagination-v2 .wp-page-ellipsis {
        min-width:36px!important;
        padding:0 6px!important;
    }
}
@media(prefers-reduced-motion:reduce) {
    .pc-watch-page .wp-watch-cast-avatar,
    .pc-watch-page .wp-watch-cast-name,
    .wp-nav-caret {transition:none!important}
}
