/* ═══════════════════════════════════════════════════════════════════════════════
   16. GRABADORA DE VOZ
   Interfaz de grabación de audio con waveform y controles
   ═══════════════════════════════════════════════════════════════════════════════ */

.voice-recorder {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #202c33;
    padding: 20px;
    display: none;
    flex-direction: column;
    gap: 15px;
    border-top: 1px solid #313d45;
    z-index: 100;
    animation: slideUpIn 0.3s ease-out;
}

.voice-recorder.active {
    display: flex;
}

@keyframes slideUpIn {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.voice-recorder-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.recording-status {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e9edef;
    font-size: 14px;
}

.recording-indicator {
    width: 12px;
    height: 12px;
    background: #ff3b30;
    border-radius: 50%;
    animation: pulseRec 1.5s infinite;
}

.recording-indicator.paused {
    background: #ffa500;
    animation: none;
}

@keyframes pulseRec {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.1);
    }
}

.recording-time {
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: bold;
    color: #00a884;
}

.voice-recorder-actions {
    display: flex;
    gap: 8px;
}

.voice-recorder-actions button {
    background: none;
    border: none;
    color: #aebac1;
    font-size: 18px;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.voice-recorder-actions button:hover {
    background: #313d45;
    color: #e9edef;
}

.voice-recorder-actions button.delete-btn {
    color: #ff3b30;
}

.voice-recorder-actions button.delete-btn:hover {
    background: rgba(255, 59, 48, 0.1);
}

/* Visualizador de forma de onda */
.waveform-container {
    width: 100%;
    height: 80px;
    background: #111b21;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.waveform-canvas {
    width: 100%;
    height: 100%;
}

.waveform-placeholder {
    color: #aebac1;
    font-size: 14px;
}

/* Controles de grabación */
.voice-recorder-controls {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 20px;
}

.record-control-btn {
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.record-control-btn.cancel-btn {
    background: #ff3b30;
    color: white;
}

.record-control-btn.cancel-btn:hover {
    background: #ff2d20;
    transform: scale(1.1);
}

.record-control-btn.pause-btn {
    background: #ffa500;
    color: white;
}

.record-control-btn.pause-btn:hover {
    background: #ff9500;
    transform: scale(1.1);
}

.record-control-btn.send-btn {
    background: #00a884;
    color: white;
}

.record-control-btn.send-btn:hover {
    background: #008f6f;
    transform: scale(1.1);
}

.record-control-btn:active {
    transform: scale(0.95);
}

/* Modal de Preview de Audio */
.modal-voice-preview {
    max-width: 500px;
    width: 90%;
}

.voice-preview-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: rgba(0, 168, 132, 0.1);
    border-radius: 8px;
    color: #aebac1;
    font-size: 13px;
    margin-top: 15px;
}

.voice-preview-info i {
    color: #00a884;
    font-size: 16px;
}

.preview-waveform-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.voice-preview-player {
    display: flex;
    align-items: center;
    gap: 15px;
}

.preview-play-btn {
    width: 40px;
    height: 40px;
    background: #00a884;
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.preview-play-btn:hover {
    background: #008f6f;
    transform: scale(1.1);
}

.preview-waveform {
    flex: 1;
    height: 40px;
    background: #202c33;
    border-radius: 8px;
    position: relative;
    cursor: pointer;
}

.preview-waveform-progress {
    height: 100%;
    background: rgba(0, 168, 132, 0.3);
    border-radius: 8px;
    transition: width 0.1s;
}

.preview-time {
    color: #aebac1;
    font-size: 12px;
    font-family: 'Courier New', monospace;
}

/* Botón de micrófono en el input */
.voice-btn {
    background: none;
    border: none;
    color: #aebac1;
    font-size: 22px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 50%;
}

.voice-btn:hover {
    background: #313d45;
    color: #00a884;
}

.voice-btn.recording {
    color: #ff3b30;
    animation: pulseRec 1.5s infinite;
}

/* Slide to cancel */
.slide-to-cancel {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #aebac1;
    font-size: 13px;
    margin-top: 5px;
}

.slide-to-cancel i {
    font-size: 16px;
}

.slide-to-cancel-text {
    animation: slideHint 2s infinite;
}

@keyframes slideHint {
    0%, 100% {
        transform: translateX(0);
        opacity: 1;
    }
    50% {
        transform: translateX(-10px);
        opacity: 0.6;
    }
}

/* Estados de grabación */
.voice-recorder.recording .recording-indicator {
    animation: pulseRec 1.5s infinite;
}

.voice-recorder.paused .recording-indicator {
    animation: none;
    background: #ffa500;
}

/* Responsive para grabadora de voz */
@media (max-width: 768px) {
    .voice-recorder {
        padding: 15px;
    }
    
    .voice-recorder-controls {
        gap: 15px;
    }
    
    .record-control-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .waveform-container {
        height: 60px;
    }
}

