/* Song Picker - Vertical scrolling list with search */

.song-picker-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.song-picker-modal.active {
    opacity: 1;
}

.song-picker-container {
    background: #ffffff;
    width: 90%;
    max-width: 600px;
    height: 85vh;
    max-height: 700px;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.song-picker-modal.active .song-picker-container {
    transform: scale(1);
}

/* Header */
.song-picker-header {
    padding: 20px;
    color: white;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.song-picker-back-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 18px;
    flex-shrink: 0;
}

.song-picker-back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.song-picker-back-btn:active {
    transform: scale(0.95);
}

.song-picker-title {
    flex: 1;
    min-width: 0;
}

.song-picker-title h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-picker-title p {
    margin: 4px 0 0;
    font-size: 14px;
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-picker-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

/* Search */
.song-picker-search {
    padding: 16px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.song-picker-search i {
    color: #6c757d;
    font-size: 16px;
}

.song-picker-search input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 16px;
    outline: none;
    color: #212529;
}

.song-picker-search input::placeholder {
    color: #adb5bd;
}

.song-search-clear {
    background: transparent;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.song-search-clear:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Song List */
.song-list {
    flex: 1;
    overflow-y: auto;
    background: #ffffff;
    -webkit-overflow-scrolling: touch;
}

.song-list::-webkit-scrollbar {
    width: 8px;
}

.song-list::-webkit-scrollbar-track {
    background: #f8f9fa;
}

.song-list::-webkit-scrollbar-thumb {
    background: #dee2e6;
    border-radius: 4px;
}

.song-list::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}

/* Song Item */
.song-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid #f1f3f5;
    cursor: pointer;
    transition: background 0.15s ease;
    min-height: 80px;
}

.song-item:hover {
    background: #f8f9fa;
}

.song-item:active {
    background: #e9ecef;
}

.song-item-number {
    font-size: 18px;
    font-weight: 700;
    color: #495057;
    min-width: 50px;
    text-align: right;
    flex-shrink: 0;
}

.song-item-content {
    flex: 1;
    min-width: 0;
}

.song-item-title {
    font-size: 16px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.song-item-preview {
    font-size: 14px;
    color: #6c757d;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-family: 'Lora', serif;
    font-style: italic;
}

.song-item-meta {
    color: #adb5bd;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Empty State */
.song-list-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #adb5bd;
}

.song-list-empty i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.song-list-empty p {
    font-size: 16px;
    margin: 0;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .song-picker-container {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    .song-picker-header {
        padding: 16px;
    }

    .song-picker-title h3 {
        font-size: 20px;
    }

    .song-picker-title p {
        font-size: 13px;
    }

    .song-picker-search {
        padding: 12px 16px;
    }

    .song-item {
        padding: 12px 16px;
        min-height: 72px;
    }

    .song-item-number {
        font-size: 16px;
        min-width: 40px;
    }

    .song-item-title {
        font-size: 15px;
    }

    .song-item-preview {
        font-size: 13px;
    }
}

/* Smooth animations */
@media (prefers-reduced-motion: reduce) {
    .song-picker-modal,
    .song-picker-container,
    .song-item {
        transition: none;
    }
}
