/* ═══════════════════════════════════════════════════════════════════
   VOICE INPUT - Compact Pill Style (Like "Đặt lịch ngay" button)
   ═══════════════════════════════════════════════════════════════════ */

/* Container */
.voice-input-compact {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.voice-btn-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Main Pill Button - Red style like reference */
.voice-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #dc4a4a 0%, #c53030 100%);
    border: none;
    border-radius: 24px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 14px rgba(220, 74, 74, 0.35);
    white-space: nowrap;
}

.voice-pill-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 74, 74, 0.45);
    background: linear-gradient(135deg, #e55656 0%, #d43c3c 100%);
}

.voice-pill-btn:active {
    transform: translateY(0) scale(0.98);
}

.voice-pill-icon {
    width: 18px;
    height: 18px;
    stroke: white;
    stroke-width: 2.5;
    flex-shrink: 0;
}

.voice-pill-text {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* Recording State - Pulsing animation */
.voice-pill-btn.recording {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    animation: pill-pulse 1.2s ease-in-out infinite;
}

@keyframes pill-pulse {

    0%,
    100% {
        box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
    }

    50% {
        box-shadow: 0 4px 24px rgba(239, 68, 68, 0.6);
    }
}

/* Processing State */
.voice-pill-btn.processing {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
    pointer-events: none;
}

.voice-pill-btn.processing .voice-pill-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

/* Inline Status (Recording indicator) */
.voice-status-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.voice-wave-mini {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 16px;
}

.voice-wave-mini span {
    width: 3px;
    height: 100%;
    background: #ef4444;
    border-radius: 2px;
    animation: wave-mini 0.6s ease-in-out infinite;
}

.voice-wave-mini span:nth-child(1) {
    animation-delay: 0s;
}

.voice-wave-mini span:nth-child(2) {
    animation-delay: 0.15s;
}

.voice-wave-mini span:nth-child(3) {
    animation-delay: 0s;
}

@keyframes wave-mini {

    0%,
    100% {
        height: 4px;
    }

    50% {
        height: 16px;
    }
}

.voice-status-text {
    font-size: 13px;
    font-weight: 500;
    color: #ef4444;
}

/* Result Tags - Inline pills */
.voice-result-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    animation: fade-in 0.3s ease;
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.voice-result-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid #10b981;
    border-radius: 16px;
    font-size: 13px;
    color: #047857;
}

.voice-result-tag strong {
    font-weight: 600;
    color: #059669;
}

.voice-result-tag span {
    font-weight: 500;
    color: #047857;
}

/* Form Field Highlight Animation */
input.voice-filled,
textarea.voice-filled {
    animation: field-highlight 0.6s ease-out;
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2) !important;
}

@keyframes field-highlight {
    0% {
        border-color: #10b981;
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.2);
    }

    100% {
        box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
    }
}

/* Responsive - Even more compact on mobile */
@media (max-width: 480px) {
    .voice-pill-btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .voice-pill-icon {
        width: 16px;
        height: 16px;
    }

    .voice-result-tag {
        padding: 5px 10px;
        font-size: 12px;
    }
}