/* Title Details shared panels and cast content. */

.title-detail-panel {
    margin-top: 12px;
    padding: 0 10px 12px;
}

.title-detail-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.title-detail-section-head h2 {
    margin: 0;
    color: #ffffff;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.2;
}

.title-detail-section-link {
    flex: 0 0 auto;
    color: #f4b24a;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.2;
    text-decoration: none;
}

.title-detail-section-link:hover,
.title-detail-section-link:focus {
    color: #ffcf72;
}

.title-detail-overview {
    margin: 0;
    color: #d4ccc4;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.62;
    overflow-wrap: anywhere;
    max-height: 130px;
    overflow-y: auto;
    padding-inline-end: 4px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

.title-detail-overview::-webkit-scrollbar {
    width: 4px;
}

.title-detail-overview::-webkit-scrollbar-track {
    background: transparent;
}

.title-detail-overview::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.24);
}

.title-detail-cast-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 24px) / 3);
    gap: 12px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.24) transparent;
    padding-bottom: 8px;
}

.title-detail-cast-grid:focus-visible {
    outline: 2px solid #ff7a2a;
    outline-offset: 3px;
}

.title-detail-cast-item {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 5px;
    scroll-snap-align: start;
    text-align: right;
}

.title-detail-cast-photo {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: #1c1917;
    color: #667890;
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
}

.title-detail-cast-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.title-detail-cast-item h3,
.title-detail-cast-item p {
    margin: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.title-detail-cast-item h3 {
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
}

.title-detail-cast-item p {
    color: #9eb0c7;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.45;
}

@media (min-width: 768px) {
    .title-detail-panel {
        margin-top: 20px;
        padding: 0 14px 14px;
    }

    .title-detail-section-head {
        margin-bottom: 12px;
    }

    .title-detail-cast-grid {
        grid-auto-columns: 126px;
    }
}
