/*
 * RUSERIALS FULLSTORY CAST PORTRAIT ZOOM V4
 * Clean isolated carousel with larger face-focused circular portraits.
 * Isolated from legacy .ab-post-cast-* selectors.
 */

.rs-cast-v2-section {
    --rs-cast-accent: #42ad91;
    --rs-cast-accent-dark: #278d75;
    --rs-cast-accent-soft: #eaf7f3;
    --rs-cast-border: #d7e7e3;
    --rs-cast-text: #202631;
    --rs-cast-muted: #6c7887;
    position: relative;
    margin: 18px 0;
    padding: 18px 16px 16px;
    overflow: hidden;
    border: 1px solid var(--rs-cast-border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(34, 77, 69, .06);
    box-sizing: border-box;
}

.rs-cast-v2-section,
.rs-cast-v2-section * {
    box-sizing: border-box;
}

.rs-cast-v2-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 16px;
}

.rs-cast-v2-kicker {
    display: block;
    margin: 0 0 3px;
    color: var(--rs-cast-accent-dark);
    font-size: 12px;
    font-weight: 550;
    line-height: 1.25;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.rs-cast-v2-heading h2 {
    margin: 0;
    color: var(--rs-cast-text);
    font-size: 20px;
    font-weight: 550;
    line-height: 1.25;
}

.rs-cast-v2-count {
    display: grid;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid #cce9e1;
    border-radius: 50%;
    background: #effaf7;
    color: var(--rs-cast-accent-dark);
    font-size: 13px;
    font-weight: 550;
    line-height: 1;
}

.rs-cast-v2-carousel {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    align-items: start;
    gap: 10px;
    min-width: 0;
}

.rs-cast-v2-carousel.is-static {
    grid-template-columns: minmax(0, 1fr);
}

.rs-cast-v2-carousel.is-static .rs-cast-v2-arrow {
    display: none;
}

.rs-cast-v2-viewport {
    min-width: 0;
    overflow: hidden;
}

.rs-cast-v2-track {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0 1px 5px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
}

.rs-cast-v2-track::-webkit-scrollbar {
    display: none;
}

.rs-cast-v2-card,
.rs-cast-v2-card:hover,
.rs-cast-v2-card:focus,
.rs-cast-v2-card:active {
    display: grid;
    flex: 0 0 92px;
    grid-template-rows: 92px auto auto;
    align-content: start;
    gap: 7px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--rs-cast-text);
    text-align: center;
    text-decoration: none;
    transform: none;
    scroll-snap-align: start;
}

.rs-cast-v2-photo {
    position: relative;
    display: grid;
    width: 92px;
    height: 92px;
    place-items: center;
    overflow: hidden;
    border: 1px solid #cfe3de;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 4px 12px rgba(33, 74, 66, .10);
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.rs-cast-v2-photo img {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 50%;
    max-width: none;
    background: #fff;
    object-fit: cover;
    object-position: 50% 12%;
    filter: none;
    transform: scale(1.16);
    transform-origin: 50% 18%;
}

.rs-cast-v2-card:hover .rs-cast-v2-photo,
.rs-cast-v2-card:focus-visible .rs-cast-v2-photo {
    border-color: #83cdbb;
    background: #f0fbf8;
    box-shadow: 0 6px 16px rgba(39, 141, 117, .15);
}

.rs-cast-v2-placeholder {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    border-radius: 50%;
    color: var(--rs-cast-accent-dark);
    font-size: 28px;
    font-weight: 500;
    line-height: 1;
}

.rs-cast-v2-name {
    display: -webkit-box;
    min-width: 0;
    min-height: 31px;
    overflow: hidden;
    color: var(--rs-cast-text);
    font-size: 12px;
    font-weight: 550;
    line-height: 1.3;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.rs-cast-v2-role {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: var(--rs-cast-muted);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html body .rs-cast-v2-section button.rs-cast-v2-arrow,
html body .rs-cast-v2-section button.rs-cast-v2-arrow:hover,
html body .rs-cast-v2-section button.rs-cast-v2-arrow:focus,
html body .rs-cast-v2-section button.rs-cast-v2-arrow:active {
    display: grid;
    align-self: start;
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
    margin: 27px 0 0;
    padding: 0;
    place-items: center;
    border: 1px solid #cae4de;
    border-radius: 12px;
    outline: 0;
    background: #fff;
    box-shadow: 0 5px 14px rgba(34, 77, 69, .09);
    color: var(--rs-cast-accent-dark);
    cursor: pointer;
    font: inherit;
    line-height: 1;
    transform: none;
    transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease;
    appearance: none;
    -webkit-appearance: none;
}

html body .rs-cast-v2-section button.rs-cast-v2-arrow:hover,
html body .rs-cast-v2-section button.rs-cast-v2-arrow:focus-visible {
    border-color: #8bcfbe;
    background: #effaf7;
    box-shadow: 0 7px 18px rgba(39, 141, 117, .14);
    color: #19745f;
}

html body .rs-cast-v2-section button.rs-cast-v2-arrow:disabled {
    opacity: .32;
    cursor: default;
    box-shadow: none;
}

.rs-cast-v2-arrow svg {
    display: block;
    width: 18px;
    height: 18px;
    overflow: visible;
    pointer-events: none;
}

.rs-cast-v2-arrow path {
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 1050px) and (min-width: 760px) {
    .rs-cast-v2-card,
    .rs-cast-v2-card:hover,
    .rs-cast-v2-card:focus,
    .rs-cast-v2-card:active {
        flex-basis: 88px;
        grid-template-rows: 88px auto auto;
    }

    .rs-cast-v2-photo {
        width: 88px;
        height: 88px;
    }

    html body .rs-cast-v2-section button.rs-cast-v2-arrow,
    html body .rs-cast-v2-section button.rs-cast-v2-arrow:hover,
    html body .rs-cast-v2-section button.rs-cast-v2-arrow:focus,
    html body .rs-cast-v2-section button.rs-cast-v2-arrow:active {
        margin-top: 25px;
    }
}

@media (max-width: 759px) {
    .rs-cast-v2-section {
        margin: 16px 0;
        padding: 16px 14px 14px;
        border-radius: 17px;
    }

    .rs-cast-v2-heading {
        margin-bottom: 16px;
    }

    .rs-cast-v2-heading h2 {
        font-size: 20px;
    }

    .rs-cast-v2-count {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
        font-size: 13px;
    }

    .rs-cast-v2-carousel,
    .rs-cast-v2-carousel.is-static {
        display: block;
    }

    html body .rs-cast-v2-section button.rs-cast-v2-arrow,
    html body .rs-cast-v2-section button.rs-cast-v2-arrow:hover,
    html body .rs-cast-v2-section button.rs-cast-v2-arrow:focus,
    html body .rs-cast-v2-section button.rs-cast-v2-arrow:active {
        display: none;
    }

    .rs-cast-v2-viewport {
        margin: 0 -14px;
        overflow: visible;
    }

    .rs-cast-v2-track {
        gap: 12px;
        padding: 0 14px 4px;
        scroll-padding-inline: 14px;
        scroll-snap-type: x mandatory;
    }

    .rs-cast-v2-card,
    .rs-cast-v2-card:hover,
    .rs-cast-v2-card:focus,
    .rs-cast-v2-card:active {
        flex-basis: 112px;
        grid-template-rows: 104px auto;
        gap: 8px;
    }

    .rs-cast-v2-photo {
        width: 104px;
        height: 104px;
    }

    .rs-cast-v2-name {
        min-height: 34px;
        font-size: 13px;
        line-height: 1.3;
    }

    .rs-cast-v2-role {
        display: none;
    }
}

@media (max-width: 380px) {
    .rs-cast-v2-track {
        gap: 10px;
    }

    .rs-cast-v2-card,
    .rs-cast-v2-card:hover,
    .rs-cast-v2-card:focus,
    .rs-cast-v2-card:active {
        flex-basis: 108px;
        grid-template-rows: 100px auto;
    }

    .rs-cast-v2-photo {
        width: 100px;
        height: 100px;
    }
}

/* ==================================================================
   RUSERIALS ZERO CLS STATIC-CAROUSEL GEOMETRY V1
   JavaScript may disable arrows, but it must never change column widths.
   ================================================================== */
@media (min-width: 760px) {
    .rs-cast-v2-carousel.is-static {
        grid-template-columns: 38px minmax(0, 1fr) 38px;
    }

    html body .rs-cast-v2-section .rs-cast-v2-carousel.is-static button.rs-cast-v2-arrow {
        display: grid;
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
    }
}

/* ==================================================================
   RUSERIALS FULLSTORY CAST CONTROLS HOTFIX V1R8
   Desktop controls keep one fixed appearance and geometry.
   Mobile uses native swipe only: no arrow buttons are displayed.
   ================================================================== */
@media (min-width: 760px) {
    html body .rs-cast-v2-section .rs-cast-v2-carousel > button.rs-cast-v2-arrow,
    html body .rs-cast-v2-section .rs-cast-v2-carousel > button.rs-cast-v2-arrow:hover,
    html body .rs-cast-v2-section .rs-cast-v2-carousel > button.rs-cast-v2-arrow:focus,
    html body .rs-cast-v2-section .rs-cast-v2-carousel > button.rs-cast-v2-arrow:focus-visible,
    html body .rs-cast-v2-section .rs-cast-v2-carousel > button.rs-cast-v2-arrow:active {
        display: grid;
        visibility: visible;
        width: 38px;
        min-width: 38px;
        max-width: 38px;
        height: 38px;
        min-height: 38px;
        max-height: 38px;
        margin: 27px 0 0;
        padding: 0;
        place-items: center;
        border: 1px solid #cae4de;
        border-radius: 12px;
        outline: 0;
        background: #fff;
        box-shadow: 0 5px 14px rgba(34, 77, 69, .09);
        color: #278d75;
        opacity: 1;
        transform: none;
        transition: none;
        animation: none;
        cursor: pointer;
        appearance: none;
        -webkit-appearance: none;
    }

    html body .rs-cast-v2-section .rs-cast-v2-carousel.is-static > button.rs-cast-v2-arrow,
    html body .rs-cast-v2-section .rs-cast-v2-carousel.is-static > button.rs-cast-v2-arrow:hover,
    html body .rs-cast-v2-section .rs-cast-v2-carousel.is-static > button.rs-cast-v2-arrow:focus,
    html body .rs-cast-v2-section .rs-cast-v2-carousel.is-static > button.rs-cast-v2-arrow:active {
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
    }
}

@media (max-width: 759px) {
    html body .rs-cast-v2-section .rs-cast-v2-carousel,
    html body .rs-cast-v2-section .rs-cast-v2-carousel.is-static {
        display: block;
        grid-template-columns: none;
    }

    html body .rs-cast-v2-section .rs-cast-v2-carousel > button.rs-cast-v2-arrow,
    html body .rs-cast-v2-section .rs-cast-v2-carousel > button.rs-cast-v2-arrow:hover,
    html body .rs-cast-v2-section .rs-cast-v2-carousel > button.rs-cast-v2-arrow:focus,
    html body .rs-cast-v2-section .rs-cast-v2-carousel > button.rs-cast-v2-arrow:focus-visible,
    html body .rs-cast-v2-section .rs-cast-v2-carousel > button.rs-cast-v2-arrow:active,
    html body .rs-cast-v2-section .rs-cast-v2-carousel.is-static > button.rs-cast-v2-arrow {
        display: none !important;
        visibility: hidden !important;
        width: 0;
        min-width: 0;
        max-width: 0;
        height: 0;
        min-height: 0;
        max-height: 0;
        margin: 0;
        padding: 0;
        border: 0;
        opacity: 0;
        pointer-events: none;
    }
}
/* ==================================================================
   /RUSERIALS FULLSTORY CAST CONTROLS HOTFIX V1R8
   ================================================================== */

