/* Audio Player Styles */

.audio-player-container {
    border-radius: 0.5rem;
}

.audio-player .card {
    border: 1px solid #e0e6ed;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease;
}

.audio-player .card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.audio-play-btn {
    min-width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.audio-play-btn:hover:not(:disabled) {
    transform: scale(1.05);
}

.audio-play-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.audio-info h6 {
    margin-bottom: 0.25rem;
    font-weight: 600;
    color: #2c3e50;
}

.audio-status {
    font-size: 0.875rem;
    line-height: 1.2;
}

.audio-progress-wrapper {
    width: 200px;
    margin: 0 0.5rem;
}

.audio-progress {
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.audio-progress::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #0d6efd;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.audio-progress::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #0d6efd;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.audio-time-current,
.audio-time-total {
    font-size: 0.875rem;
    color: #6c757d;
    font-family: 'Courier New', monospace;
    min-width: 35px;
    text-align: center;
}

.audio-generate-btn {
    transition: all 0.2s ease;
}

.audio-generate-btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.audio-generation-progress .progress {
    height: 6px;
    background-color: #e9ecef;
    border-radius: 3px;
}

.audio-generation-progress .progress-bar {
    background: linear-gradient(45deg, #0d6efd 25%, transparent 25%),
                linear-gradient(-45deg, #0d6efd 25%, transparent 25%),
                linear-gradient(45deg, transparent 75%, #0d6efd 75%),
                linear-gradient(-45deg, transparent 75%, #0d6efd 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    animation: move 2s linear infinite;
}

@keyframes move {
    0% {
        background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    }
    100% {
        background-position: 20px 20px, 20px 30px, 30px 10px, 10px 20px;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .audio-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .audio-progress-wrapper {
        width: 100%;
        margin: 0;
    }
    
    .audio-progress-container .d-flex {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .audio-time-current,
    .audio-time-total {
        min-width: auto;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .audio-player .card {
        background-color: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .audio-info h6 {
        color: #e2e8f0;
    }
    
    .audio-progress {
        background: #4a5568;
    }
    
    .audio-time-current,
    .audio-time-total {
        color: #a0aec0;
    }
}

/* Animation for loading states */
.audio-loading {
    opacity: 0.7;
    pointer-events: none;
}

.audio-loading .audio-play-btn {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}
