/* Latest Episodes Scroller — extends rec-wall-container pattern */

.ep-scroller-item {
    flex: 0 0 150px;
    min-width: 150px;
    scroll-snap-align: start;
    position: relative;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.ep-scroller-item:hover {
    box-shadow: 0 6px 20px color-mix(in srgb, var(--theme-accent) 18%, transparent);
    transform: translateY(-4px);
}

.ep-scroller-item a {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Thumbnail */

.ep-scroller-thumb {
    position: relative;
    width: 100%;
    height: 110px;
    overflow: hidden;
    background-image: linear-gradient(to right bottom, #ff00f0, #d800f0, #ad00f0, #780dee, #121ceb);
}

.ep-scroller-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    pointer-events: none;
    display: block;
}

.ep-scroller-item:hover .ep-scroller-thumb img {
    transform: scale(1.06);
}

/* Fallback text shown inside gradient when image fails */
.ep-scroller-thumb-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    text-align: center;
    padding: 8px;
    word-break: break-word;
}

/* Season/Episode badge overlay */
.ep-scroller-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    padding: 18px 6px 5px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* Content section */

.ep-scroller-content {
    padding: 8px 8px 10px;
}

.ep-scroller-title {
    font-size: 11px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}

.ep-scroller-date {
    font-size: 10px;
    color: #999;
}

/* Format links row */

.ep-scroller-formats {
    display: flex;
    gap: 4px;
    padding: 0 8px 8px;
    flex-wrap: wrap;
}

.ep-scroller-fmt {
    font-size: 10px;
    font-weight: 600;
    color: var(--theme-accent);
    text-decoration: none;
    padding: 2px 6px;
    border: 1px solid var(--theme-accent);
    border-radius: 3px;
    transition: all 0.2s;
}

.ep-scroller-fmt:hover {
    background: var(--theme-accent);
    color: var(--theme-on-accent);
}

/* Report flag icon in the format row */

.ep-scroller-formats .report-toggle {
    margin-left: auto;
    font-size: 13px;
    line-height: 1;
}

.ep-scroller-formats .report-toggle .material-icons {
    font-size: 14px;
}

/* Report panel adapted for scroller cards */

.ep-scroller-item .report-panel {
    margin-top: 0;
    border-radius: 0 0 8px 8px;
    padding: 6px 8px;
}

.ep-scroller-item .report-panel label {
    display: block;
    margin-bottom: 1px;
}

.ep-scroller-item .report-panel select,
.ep-scroller-item .report-panel input[type="text"] {
    width: 100%;
    font-size: 11px;
    margin-bottom: 4px;
    box-sizing: border-box;
}

.ep-scroller-item .report-panel .report-row {
    margin-bottom: 2px;
}

.ep-scroller-item .report-panel .btn-submit,
.ep-scroller-item .report-panel .btn-cancel {
    font-size: 11px;
    padding: 3px 8px;
}

.ep-scroller-item .report-result {
    font-size: 11px;
    padding: 4px 6px;
}

/* Empty state */

.ep-scroller-empty {
    text-align: center;
    padding: 30px 20px;
    color: #888;
    font-style: italic;
    font-size: 13px;
    width: 100%;
}

/* Responsive */

@media (max-width: 400px) {
    .ep-scroller-item {
        flex: 0 0 120px;
        min-width: 120px;
    }
    .ep-scroller-thumb {
        height: 90px;
    }
    .ep-scroller-title {
        font-size: 10px;
    }
    .ep-scroller-badge {
        font-size: 12px;
    }
}

@media (min-width: 401px) and (max-width: 600px) {
    .ep-scroller-item {
        flex: 0 0 135px;
        min-width: 135px;
    }
    .ep-scroller-thumb {
        height: 100px;
    }
}

@media (min-width: 901px) {
    .ep-scroller-item {
        flex: 0 0 165px;
        min-width: 165px;
    }
    .ep-scroller-thumb {
        height: 120px;
    }
}
