/* ========================================
   Video Playlist Modal
   ======================================== */

.playlist-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.playlist-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: -1;
}

.playlist-modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 1000px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.playlist-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
}

.playlist-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.playlist-close:hover {
    background-color: #f3f4f6;
}

.playlist-container {
    display: flex;
    flex: 1;
    min-height: 0;
    gap: 20px;
    padding: 20px 24px;
    overflow: hidden;
}

.playlist-player {
    flex: 1;
    min-width: 0;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.playlist-iframe {
    width: 100%;
    height: 100%;
}

.playlist-list {
    width: 280px;
    display: flex;
    flex-direction: column;
    border-left: 1px solid #e5e7eb;
    padding-left: 20px;
}

.playlist-list h3 {
    margin: 0 0 12px 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.playlist-items {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.playlist-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.playlist-item:hover {
    background-color: #f3f4f6;
}

.playlist-item.active {
    background-color: #ede9fe;
    border-color: #7c3aed;
}

.playlist-item-number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e5e7eb;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
}

.playlist-item.active .playlist-item-number {
    background-color: #7c3aed;
    color: white;
}

.playlist-item-title {
    flex: 1;
    font-size: 0.85rem;
    color: #374151;
    line-height: 1.4;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.playlist-item.active .playlist-item-title {
    color: #7c3aed;
    font-weight: 500;
}

/* ========================================
   Podcast Modal Styles
   ======================================== */

.podcast-modal {
    width: 90% !important;
    max-width: 600px !important;
}

.podcast-list-container {
    flex: 1;
    overflow: hidden;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
}

.podcast-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.podcast-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    background: #f8fafc;
    transition: all 0.2s;
    border: 1px solid #e2e8f0;
}

.podcast-item:hover {
    background: #ede9fe;
    border-color: #7c3aed;
}

.podcast-number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e5e7eb;
    border-radius: 4px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.podcast-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.podcast-title {
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    line-height: 1.3;
    word-break: break-word;
}

.podcast-show {
    font-size: 12px;
    color: #6b7280;
}

.podcast-link {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 18px;
    text-decoration: none;
}

.podcast-link:hover {
    background: #7c3aed;
    border-color: #7c3aed;
    transform: scale(1.05);
}

.spotify-icon {
    display: block;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .playlist-modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .playlist-container {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }

    .playlist-list {
        width: 100%;
        border-left: none;
        border-top: 1px solid #e5e7eb;
        padding-left: 0;
        padding-top: 16px;
        max-height: 150px;
    }

    .playlist-player {
        aspect-ratio: 16 / 9;
    }

    .playlist-items {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 12px;
    }

    .playlist-item {
        flex-shrink: 0;
        min-width: 100px;
        flex-direction: column;
        padding: 8px;
    }

    .playlist-item-title {
        font-size: 0.75rem;
        -webkit-line-clamp: 1;
    }
}
