/**
 * Text to Speech Player Styles
 * @version 2.4.0
 */

.text-to-speech-player {
    margin: 20px 0;
    padding: 0;
}

.tts-container {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #00703b 0%, #00703b 100%);
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: 0 8px 24px rgba(0, 112, 59, 0.25);
    transition: all 0.3s ease;
    gap: 15px;
}

.tts-container:hover {
    box-shadow: 0 12px 32px rgba(0, 112, 59, 0.35);
    transform: translateY(-2px);
}

.tts-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.95);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.tts-btn:hover {
    background: #ffffff;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tts-btn:active {
    transform: scale(0.95);
}

.tts-btn-play {
    background: rgba(255, 255, 255, 0.95);
}

.tts-btn-play.playing {
    background: rgba(255, 255, 255, 0.95);
}

.tts-btn-stop {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.tts-btn-stop:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.8);
}

.tts-icon {
    width: 24px;
    height: 24px;
    color: #00703b;
}

.tts-btn-stop .tts-icon {
    color: #ffffff;
    width: 20px;
    height: 20px;
}

.tts-info {
    flex: 1;
    min-width: 0;
}

.tts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    gap: 10px;
}

.tts-label {
    display: block;
    color: #ffffff;
    font-weight: 600;
    font-size: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tts-voice-selector {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 4px 8px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    max-width: 200px;
}

.tts-voice-selector:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.tts-voice-selector option {
    background: #00703b;
    color: #ffffff;
}

.tts-progress-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tts-progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.tts-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ffffff 0%, #f0f0f0 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.tts-status {
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    font-weight: 500;
}

.tts-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.tts-speed-btn {
    padding: 8px 16px;
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tts-speed-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.05);
}

.tts-speed-value {
    display: inline-block;
}

/* Animación de pulso para cuando está reproduciendo */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(255, 255, 255, 0);
    }
}

.tts-btn-play.playing {
    animation: pulse 2s infinite;
}

/* Responsive */
@media (max-width: 768px) {
    .tts-container {
        padding: 14px 16px;
        gap: 12px;
    }
    
    .tts-btn {
        width: 44px;
        height: 44px;
    }
    
    .tts-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .tts-label {
        font-size: 14px;
    }
    
    .tts-voice-selector {
        width: 100%;
        max-width: 100%;
    }
    
    .tts-controls {
        flex-direction: column;
        gap: 8px;
    }
    
    .tts-btn-stop {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    .tts-container {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .tts-info {
        width: 100%;
        order: -1;
        margin-bottom: 8px;
        text-align: center;
    }
    
    .tts-header {
        align-items: center;
    }
    
    .tts-controls {
        flex-direction: row;
    }
}
