/**
 * Playback System CSS
 * 
 * Styles for the audio playback and review interface.
 * Includes responsive design for mobile and desktop.
 */

/* Navigation Styles */
.nav-link 
{
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    text-decoration: none;
    color: #6b7280;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-link:hover 
{
    color: #374151;
    background-color: #f3f4f6;
}

.nav-link.active 
{
    color: #3b82f6;
    background-color: #eff6ff;
}

.mobile-nav-link 
{
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    text-decoration: none;
    color: #6b7280;
    font-weight: 500;
}

.mobile-nav-link:hover 
{
    color: #374151;
    background-color: #f3f4f6;
}

.mobile-nav-link.active 
{
    color: #3b82f6;
    background-color: #eff6ff;
}

/* Button Styles */
.btn-secondary 
{
    background-color: #6b7280;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    border: none;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-secondary:hover 
{
    background-color: #4b5563;
}

.btn-danger 
{
    background-color: #dc2626;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    border: none;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-danger:hover 
{
    background-color: #b91c1c;
}

/* Filter and Sort Controls */
.filter-select 
{
    padding: 0.375rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background-color: white;
    font-size: 0.875rem;
    min-width: 120px;
}

.sort-btn 
{
    padding: 0.25rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background-color: white;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.sort-btn:hover 
{
    background-color: #f3f4f6;
}

.sort-btn.active 
{
    background-color: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.kbd 
{
    background-color: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    padding: 0.125rem 0.375rem;
    font-size: 0.75rem;
    font-family: monospace;
}

/* File List Styles */
.file-row 
{
    padding: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.file-row:hover 
{
    background-color: #f9fafb;
}

.file-row-content 
{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.file-info 
{
    flex: 1;
    min-width: 0;
}

.file-dialog 
{
    font-weight: 500;
    color: #111827;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.file-metadata 
{
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.filename 
{
    font-family: monospace;
}

.narrator 
{
    background-color: #eff6ff;
    color: #1d4ed8;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 500;
}

.file-actions 
{
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* Star Rating Styles */
.star-rating 
{
    display: flex;
    gap: 0.125rem;
}

.star 
{
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.star.filled 
{
    color: #fbbf24;
}

.star.empty 
{
    color: #d1d5db;
}

.star:hover,
.star.highlighted 
{
    color: #f59e0b;
    transform: scale(1.1);
}

/* Action Button Styles */
.btn-play,
.btn-delete 
{
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-play 
{
    background-color: #3b82f6;
    color: white;
}

.btn-play.is-playing 
{
    background-color: #10b981;
}

.btn-play:hover 
{
    background-color: #2563eb;
    transform: scale(1.05);
}

.btn-delete 
{
    background-color: #ef4444;
    color: white;
}

.btn-delete:hover 
{
    background-color: #dc2626;
    transform: scale(1.05);
}

/* Modal Styles */
.modal 
{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active 
{
    opacity: 1;
    visibility: visible;
}

.modal-content 
{
    background: white;
    border-radius: 0.5rem;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.active .modal-content 
{
    transform: scale(1);
}

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

.modal-title 
{
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
}

.modal-close 
{
    width: 2rem;
    height: 2rem;
    border: none;
    background: none;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
    color: #6b7280;
    transition: all 0.2s;
}

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

.modal-body 
{
    padding: 1.5rem;
    overflow-y: auto;
    max-height: calc(90vh - 8rem);
}

.dialog-display 
{
    margin-bottom: 1.5rem;
}

.dialog-text 
{
    font-size: calc(1.125rem * 0.9);
    line-height: 1.6;
    color: #111827;
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: #f9fafb;
    border-radius: 0.5rem;
    border-left: 4px solid #3b82f6;
}

.dialog-metadata 
{
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.dialog-metadata .filename 
{
    font-family: monospace;
    background-color: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.dialog-metadata .narrator 
{
    background-color: #eff6ff;
    color: #1d4ed8;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 500;
}

.player-container 
{
    margin-bottom: 1.5rem;
}

.modal-actions 
{
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.modal-actions .rating-container .star-rating 
{
    justify-content: flex-start;
}

.action-buttons 
{
    display: flex;
    gap: 0.75rem;
}

/* Audio Player Styles */
.audio-player 
{
    background: white;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.player-compact 
{
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
}

.player-full 
{
    padding: 1rem;
}

.player-info 
{
    margin-bottom: 1rem;
    text-align: center;
}

.track-title 
{
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.25rem;
}

.track-metadata 
{
    font-size: 0.875rem;
    color: #6b7280;
}

.player-controls 
{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.player-controls button 
{
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: none;
    background-color: #f3f4f6;
    color: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.player-controls .btn-play-pause 
{
    width: 3rem;
    height: 3rem;
    background-color: #3b82f6;
    color: white;
}

.player-controls button:hover 
{
    transform: scale(1.05);
}

.player-controls .btn-play-pause:hover 
{
    background-color: #2563eb;
}

.progress-container 
{
    margin-bottom: 0.75rem;
}

.progress-bar 
{
    width: 100%;
    height: 0.5rem;
    background-color: #e5e7eb;
    border-radius: 0.25rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.progress-fill 
{
    height: 100%;
    background-color: #3b82f6;
    border-radius: 0.25rem;
    transition: width 0.1s ease;
    width: 0%;
}

.progress-handle 
{
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 0.75rem;
    height: 0.75rem;
    background-color: white;
    border: 2px solid #3b82f6;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
}

.progress-bar:hover .progress-handle 
{
    opacity: 1;
}

.time-display 
{
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #6b7280;
    font-family: monospace;
}

.player-options 
{
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
}

.volume-control,
.speed-control 
{
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.volume-slider 
{
    width: 80px;
}

.speed-selector 
{
    padding: 0.25rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    background: white;
    font-size: 0.75rem;
}

/* Empty State */
.no-files 
{
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

.btn-clear-filters 
{
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.875rem;
}

.btn-clear-filters:hover 
{
    background-color: #2563eb;
}

/* Responsive Design */
@media (max-width: 768px) 
{
    .file-row-content 
    {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .file-actions 
    {
        width: 100%;
        justify-content: space-between;
    }
    
    .modal-content 
    {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-body 
    {
        padding: 1rem;
    }
    
    .modal-actions 
    {
        flex-direction: column;
        align-items: stretch;
    }
    
    .action-buttons 
    {
        justify-content: center;
    }
    
    .player-options 
    {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .file-metadata 
    {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .filter-select 
    {
        min-width: auto;
        flex: 1;
    }
}

@media (max-width: 480px) 
{
    .file-dialog 
    {
        font-size: 0.875rem;
    }
    
    .star 
    {
        font-size: 1.125rem;
    }
    
    .btn-play,
    .btn-delete 
    {
        width: 2.25rem;
        height: 2.25rem;
        font-size: 0.875rem;
    }
    
    .sort-btn 
    {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) 
{
    /* Add dark mode styles here if needed */
}

/* Animation Classes */
@keyframes fadeIn 
{
    from { opacity: 0; transform: translateY(0.5rem); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in 
{
    animation: fadeIn 0.3s ease-out;
}

/* Focus styles for accessibility */
.btn-play:focus,
.btn-delete:focus,
.star:focus 
{
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Loading states */
.loading 
{
    opacity: 0.6;
    pointer-events: none;
}

.loading::after 
{
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1rem;
    height: 1rem;
    margin: -0.5rem 0 0 -0.5rem;
    border: 2px solid transparent;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin 
{
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}