/* Songs Application Specific Styles */

/* Songs Controls */
.songs-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.search-container {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.clear-search {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6c757d;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.clear-search:hover {
    background: #f8f9fa;
    color: #495057;
}

/* Songs Stats */
.songs-stats {
    margin-bottom: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.songs-stats p {
    margin: 0;
    color: #6c757d;
    font-size: 0.875rem;
}

/* Songs Container */
.songs-container {
    min-height: 400px;
}

.songs-list {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.song-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f8f9fa;
    transition: background-color 0.2s ease;
}

.song-item:last-child {
    border-bottom: none;
}

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

.song-number {
    font-weight: 600;
    color: #3498db;
    min-width: 3rem;
    text-align: right;
    margin-right: 1.5rem;
    font-size: 1.1rem;
}

.song-info {
    flex: 1;
}

.song-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}

.song-artist {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.song-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: #868e96;
}

.song-genre,
.song-year,
.song-difficulty {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.song-notes {
    font-style: italic;
    color: #6c757d;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    padding-left: 0.5rem;
    border-left: 3px solid #e9ecef;
}

/* Search Results */
.search-results-header {
    background: #e3f2fd;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid #bbdefb;
    font-size: 0.9rem;
    color: #1565c0;
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.no-results h3 {
    margin-bottom: 1rem;
    color: #6c757d;
}

.no-results p {
    margin-bottom: 1.5rem;
}

/* Loading and Error States */
.songs-loading {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.songs-error {
    text-align: center;
    padding: 3rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .songs-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .search-container {
        max-width: none;
    }

    .song-item {
        padding: 0.75rem 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .song-number {
        min-width: auto;
        text-align: left;
        margin-right: 0;
        font-size: 1rem;
    }

    .song-info {
        width: 100%;
    }

    .song-meta {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .song-item {
        padding: 0.5rem;
    }

    .song-title {
        font-size: 1rem;
    }

    .song-artist {
        font-size: 0.85rem;
    }

    .song-meta {
        font-size: 0.75rem;
    }

    .song-notes {
        font-size: 0.8rem;
        margin-top: 0.25rem;
        padding-left: 0.25rem;
        border-left-width: 2px;
    }
}

/* Accessibility */
.song-item:focus {
    outline: 2px solid #3498db;
    outline-offset: -2px;
}

.search-input:focus {
    outline: none;
}

/* Lyrics Section */
.song-lyrics-section {
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid #f0f0f0;
}

.lyrics-toggle {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 0.5rem;
}

.lyrics-toggle:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.lyrics-toggle:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

.song-lyrics {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 1rem;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #495057;
    white-space: pre-line;
    max-height: 300px;
    overflow-y: auto;
    transition: all 0.3s ease;
}

.song-lyrics.hidden {
    display: none;
}

.song-lyrics em {
    color: #6c757d;
    font-style: italic;
}

/* Lyrics scrollbar styling */
.song-lyrics::-webkit-scrollbar {
    width: 6px;
}

.song-lyrics::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.song-lyrics::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.song-lyrics::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Print Styles */
@media print {
    .songs-controls,
    .footer {
        display: none;
    }

    .song-item {
        break-inside: avoid;
        padding: 0.5rem 0;
        border-bottom: 1px solid #ddd;
    }

    .song-number {
        font-weight: bold;
    }

    .song-title {
        font-weight: bold;
    }

    .song-meta {
        display: none;
    }

    .lyrics-toggle {
        display: none;
    }

    .song-lyrics {
        display: block !important;
        background: none;
        border: none;
        padding: 0.5rem 0;
        max-height: none;
        overflow: visible;
    }
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .song-lyrics {
        font-size: 0.85rem;
        padding: 0.75rem;
        max-height: 200px;
    }

    .lyrics-toggle {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
}