/**
 * Amazon Polly Audio Player Styles
 */

.aptt-player-container {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.aptt-player {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.aptt-play-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #007bff;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.aptt-play-btn:hover {
    background: #0056b3;
    transform: scale(1.05);
}

.aptt-play-btn:active {
    transform: scale(0.95);
}

.aptt-progress-container {
    flex: 1;
    min-width: 200px;
}

.aptt-progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.aptt-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #0056b3);
    border-radius: 4px;
    width: 0%;
    transition: width 0.1s linear;
}

.aptt-time-display {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

.aptt-controls {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.aptt-controls button {
    padding: 8px 12px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.aptt-controls button:hover {
    background: #f0f0f0;
    border-color: #007bff;
}

.aptt-speed-btn {
    min-width: 45px;
    font-weight: 600;
}

.aptt-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    color: #856404;
    font-size: 14px;
}

.aptt-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffc107;
    border-top-color: transparent;
    border-radius: 50%;
    animation: aptt-spin 0.8s linear infinite;
}

@keyframes aptt-spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .aptt-player {
        flex-direction: column;
        align-items: stretch;
    }
    
    .aptt-controls {
        justify-content: center;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .aptt-player-container {
        background: #1e1e1e;
    }
    
    .aptt-progress-bar {
        background: #333;
    }
    
    .aptt-controls button {
        background: #2a2a2a;
        border-color: #444;
        color: #fff;
    }
    
    .aptt-time-display {
        color: #aaa;
    }
}
