/**
 * Show Details Expansion Panel Styles
 *
 * Styles for the expandable panel that shows seasons and episodes
 * below the promotional-art area.
 */

/* Expansion Container */
.show-details-expansion {
    background: #0a0a0a;
    border-top: 1px solid #222;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
}

.show-details-expansion.open {
    max-height: 800px;
    overflow-y: auto;
    opacity: 1;
}

.show-details-expansion.closing {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

/* Loading State */
.show-details-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 20px;
    color: #888;
    font-size: 0.95rem;
}

.show-details-loading wa-spinner {
    font-size: 1.5rem;
}

/* Error State */
.show-details-error {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 30px 20px;
    color: #e74c3c;
    font-size: 0.95rem;
}

.show-details-error wa-icon {
    font-size: 1.2rem;
}

/* Panel Container */
.show-details-panel {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Panel Header */
.show-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #333;
}

.show-details-title {
    color: #fff;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
}

.show-details-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #222;
    border: 1px solid #444;
    border-radius: 50%;
    color: #888;
    cursor: pointer;
    transition: all 0.2s ease;
}

.show-details-close:hover {
    background: #333;
    border-color: #666;
    color: #fff;
}

.show-details-close wa-icon {
    font-size: 18px;
}

/* Season Card */
.season-card {
    background: #111;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
}

.season-card:last-child {
    margin-bottom: 0;
}

.season-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #1a1a1a 0%, #151515 100%);
    border-bottom: 1px solid #2a2a2a;
}

.season-card-title {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.season-number {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
}

.season-subtitle {
    color: #888;
    font-size: 0.95rem;
}

.season-episode-count {
    color: #666;
    font-size: 0.85rem;
}

/* Season Pass Card */
.season-pass-card {
    padding: 12px 20px;
    background: #0d0d0d;
    border-bottom: 1px solid #2a2a2a;
}

.season-pass-active {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #4CAF50;
    font-size: 0.9rem;
}

.season-pass-active wa-icon {
    font-size: 1.1rem;
}

.pass-expiration {
    color: #888;
    font-size: 0.85rem;
    margin-left: auto;
}

.season-pass-offer {
    display: flex;
    align-items: center;
    gap: 16px;
}

.pass-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.pass-info wa-icon {
    color: var(--CS-aqua, #00fdf6);
    font-size: 1.2rem;
}

.pass-label {
    color: #fff;
    font-weight: 500;
}

.pass-description {
    color: #888;
    font-size: 0.85rem;
}

.pass-price {
    color: var(--CS-aqua, #00fdf6);
    font-size: 1.1rem;
    font-weight: 600;
}

.pass-buy-btn {
    background: var(--CS-blue, #0c6af5);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pass-buy-btn:hover {
    background: #0a5ad4;
    transform: translateY(-1px);
}

/* Episode List */
.episode-list {
    display: flex;
    flex-direction: column;
}

.episode-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid #1a1a1a;
    cursor: pointer;
    transition: all 0.15s ease;
}

.episode-row:last-child {
    border-bottom: none;
}

.episode-row:hover {
    background: #1a1a1a;
}

.episode-row.owned:hover,
.episode-row.free:hover {
    background: rgba(76, 175, 80, 0.1);
}

/* Episode Thumbnail */
.episode-thumb {
    position: relative;
    width: 120px;
    height: 68px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: #1a1a1a;
}

.episode-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.episode-row:hover .episode-thumb img {
    transform: scale(1.05);
}

.episode-num-overlay {
    position: absolute;
    bottom: 4px;
    left: 4px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

.episode-row.owned .episode-num-overlay,
.episode-row.free .episode-num-overlay {
    background: rgba(76, 175, 80, 0.9);
}

.episode-number-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #2a2a2a;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #888;
    flex-shrink: 0;
}

.episode-row.owned .episode-number-badge,
.episode-row.free .episode-number-badge {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.episode-info {
    flex: 1;
    min-width: 0;
    padding-top: 2px;
}

.episode-title {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.episode-row:hover .episode-title {
    color: var(--CS-aqua, #00fdf6);
}

.episode-desc {
    color: #888;
    font-size: 0.8rem;
    line-height: 1.4;
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.episode-price {
    color: var(--CS-aqua, #00fdf6);
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 4px;
}

.episode-status {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    align-self: center;
}

.play-icon {
    color: var(--CS-aqua, #00fdf6);
    font-size: 1.2rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.episode-row:hover .play-icon {
    opacity: 1;
}

.status-badge {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.status-owned {
    background: #4CAF50;
    color: #fff;
}

.status-free {
    background: #2196F3;
    color: #fff;
}

.status-locked {
    background: #444;
    color: #999;
}

.status-coming-soon {
    background: #7c4dff;
    color: #fff;
}

/* Coming Soon Episode Row */
.episode-row.coming-soon {
    opacity: 0.7;
    cursor: default;
}

.episode-row.coming-soon:hover {
    background: transparent;
}

.episode-row.coming-soon .episode-number-badge {
    background: rgba(124, 77, 255, 0.2);
    color: #7c4dff;
}

.episode-row.coming-soon .episode-num-overlay {
    background: rgba(124, 77, 255, 0.9);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .show-details-panel {
        padding: 15px;
    }

    .show-details-header {
        margin-bottom: 15px;
        padding-bottom: 12px;
    }

    .show-details-title {
        font-size: 1.1rem;
    }

    .season-card-header {
        padding: 12px 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .season-card-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .season-pass-offer {
        flex-wrap: wrap;
        gap: 12px;
    }

    .pass-info {
        width: 100%;
    }

    .pass-price {
        margin-left: auto;
    }

    .episode-row {
        padding: 10px 15px;
        gap: 10px;
    }

    .episode-thumb {
        width: 100px;
        height: 56px;
    }

    .episode-number-badge {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }

    .episode-title {
        font-size: 0.9rem;
    }

    .episode-desc {
        font-size: 0.75rem;
        -webkit-line-clamp: 1;
    }

    .status-badge {
        font-size: 0.7rem;
        padding: 3px 8px;
    }
}

@media (max-width: 480px) {
    .show-details-expansion.open {
        max-height: 600px;
    }

    .season-pass-card {
        padding: 10px 15px;
    }

    .pass-buy-btn {
        width: 100%;
        margin-top: 8px;
    }

    .episode-thumb {
        width: 80px;
        height: 45px;
    }

    .episode-num-overlay {
        font-size: 0.6rem;
        padding: 1px 4px;
    }

    .episode-desc {
        -webkit-line-clamp: 1;
        font-size: 0.7rem;
        margin-top: 2px;
    }

    .episode-status {
        flex-direction: column;
        align-items: flex-end;
        gap: 4px;
    }

    .play-icon {
        display: none;
    }
}

/* All Episodes Owned State */
.season-pass-complete {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #4CAF50;
    font-size: 0.9rem;
}

.season-pass-complete wa-icon {
    font-size: 1.1rem;
}

/* Admin Note */
.admin-note {
    color: #888;
    font-size: 0.75rem;
    font-style: italic;
    margin-left: 8px;
}
