/* /var/www/pavel-gorin.local/public/css/components/voice-recorder.css */
/**
* /var/www/pavel-gorin.local/public/css/components/voice-recorder.css
* Стили для модального окна голосового ввода — ТОЛЬКО позиционирование и анимация
* Кнопки в buttons.css, текст в typography.css
*/

/* === КОНТЕЙНЕР === */
.voice-recorder-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0;
    overflow: visible;
}

/* === СТАТУС === */
.voice-status {
    text-align: center;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    margin-bottom: 16px;
    width: 100%;
    flex-shrink: 0;
}

.voice-icon {
    transition: all 0.3s ease;
}

.voice-status-text {
    margin-top: 8px;
    margin-bottom: 0;
}

/* === СТАТУСЫ === */
.voice-status.recording .voice-icon {
    animation: voicePulseMic 1s infinite;
}

.voice-status.processing .voice-icon {
    animation: voiceSpin 1s linear infinite;
}

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

@keyframes voiceSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* === КНОПКИ УПРАВЛЕНИЯ (контейнер) === */
.voice-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 0 0 16px 0;
    flex-shrink: 0;
}

/* === ТАЙМЕР === */
.voice-timer {
    text-align: center;
    margin: 0 0 16px 0;
    flex-shrink: 0;
}

.timer-circle {
    display: inline-block;
    background: rgba(6, 25, 52, 0.8);
    border: 2px solid var(--color-primary-light);
    border-radius: 50%;
    width: 55px;
    height: 55px;
    line-height: 1;
    text-align: center;
    padding-top: 12px;
    margin-bottom: 6px;
}

.timer-seconds {
    display: block;
}

.timer-progress {
    width: 150px;
    height: 2px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    margin: 0 auto;
    overflow: hidden;
}

.timer-progress-bar {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
    border-radius: 2px;
    transition: width 1s linear;
}

/* === РЕЗУЛЬТАТ === */
.voice-result {
    width: 100%;
    margin-top: 0;
    flex-shrink: 0;
    margin-bottom: 8px;
}

.voice-text-result {
    background: rgba(6, 25, 52, 0.5);
    border: 1px solid rgba(149, 196, 250, 0.2);
    border-radius: 10px;
    padding: 10px 12px;
    min-height: 70px;
    text-align: left;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-y: auto;
    max-height: 120px;
}

/* Скролл для длинного текста */
.voice-text-result::-webkit-scrollbar {
    width: 4px;
}

.voice-text-result::-webkit-scrollbar-track {
    background: rgba(6, 25, 52, 0.5);
    border-radius: 3px;
}

.voice-text-result::-webkit-scrollbar-thumb {
    background: rgba(42, 87, 199, 0.5);
    border-radius: 3px;
}

.voice-text-result span {
    display: inline-block;
    animation: voiceFadeInChar 0.05s ease forwards;
    opacity: 0;
}

@keyframes voiceFadeInChar {
    from {
        opacity: 0;
        transform: translateY(3px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === РАЗМЕР МОДАЛКИ === */
#voiceRecorderModal {
    width: 450px;
    max-width: 500px;
    min-width: 300px;
    height: auto;
    max-height: 480px;
}

/* === АДАПТИВ === */
@media (max-width: 768px) {
    #voiceRecorderModal {
        width: calc(100% - 40px);
        max-width: none;
        min-width: auto;
        max-height: 460px;
    }
    
    .voice-icon {
        font-size: 2.2rem;
    }
    
    .timer-circle {
        width: 50px;
        height: 50px;
        padding-top: 11px;
    }
    
    .timer-progress {
        width: 130px;
    }
    
    .voice-text-result {
        padding: 8px 10px;
        max-height: 100px;
    }
}

@media (max-width: 576px) {
    #voiceRecorderModal {
        width: calc(100% - 20px);
        max-height: 440px;
    }
    
    .voice-controls {
        gap: 10px;
    }
    
    .voice-status {
        padding: 10px 12px;
        margin-bottom: 12px;
    }
    
    .timer-circle {
        width: 45px;
        height: 45px;
        padding-top: 10px;
    }
    
    .timer-progress {
        width: 110px;
    }
    
    .voice-text-result {
        max-height: 90px;
        margin-bottom: 4px;
    }
}