
/* Font Awesome 6 Compatibility Fallback */
.fa-solid, .fas {
    font-family: "Font Awesome 5 Free", "Font Awesome 6 Pro", "Font Awesome 6 Free", sans-serif !important;
    font-weight: 900 !important;
    font-style: normal;
}
.fa-regular, .far {
    font-family: "Font Awesome 5 Free", "Font Awesome 6 Pro", "Font Awesome 6 Free", sans-serif !important;
    font-weight: 400 !important;
    font-style: normal;
}
/* ==========================================================================
   Malayalam Voice-Assisted Input & Speech-to-Text Styles
   Supports Malayalam (ml-IN) & English (en-IN) + AI Manglish Transliteration
   ========================================================================== */

/* Microphone Circle Button inside Input */
.voice-mic-circle-btn,
.voice-mic-trigger {
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 36px !important;
    height: 36px !important;
    background: #fdf2f8 !important;
    border: 1.5px solid #9e007e !important;
    color: #9e007e !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 99 !important;
    pointer-events: auto !important;
    outline: none !important;
    box-shadow: 0 2px 5px rgba(158, 0, 126, 0.15) !important;
    transition: all 0.2s ease-in-out !important;
    padding: 0 !important;
}

.voice-mic-circle-btn i,
.voice-mic-circle-btn em,
.voice-mic-trigger i,
.voice-mic-trigger em {
    font-size: 15px !important;
    color: inherit !important;
    pointer-events: none !important;
}

.voice-mic-circle-btn:hover,
.voice-mic-trigger:hover {
    background: #9e007e !important;
    color: #ffffff !important;
    transform: translateY(-50%) scale(1.12) !important;
    box-shadow: 0 4px 10px rgba(158, 0, 126, 0.3) !important;
}

/* Pulsing Active Listening State for Mic */
.voice-mic-circle-btn.recording,
.voice-mic-circle-btn.listening,
.voice-mic-trigger.recording,
.voice-mic-trigger.listening {
    background: #dc2626 !important;
    border-color: #b91c1c !important;
    color: #ffffff !important;
    animation: voiceBtnPulse 1.2s infinite alternate !important;
}

@keyframes voiceBtnPulse {
    0% { transform: translateY(-50%) scale(1); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.6); }
    100% { transform: translateY(-50%) scale(1.15); box-shadow: 0 0 0 10px rgba(220, 38, 38, 0); }
}

/* For inputs that also have a password toggle or eye icon */
.input-box .voice-mic-circle-btn.has-eye,
.position-relative .voice-mic-circle-btn.has-eye {
    right: 48px !important;
}

/* Microphone button inside Textarea Wrappers */
.voice-textarea-wrapper {
    position: relative;
    width: 100%;
}

.voice-textarea-wrapper .form-control {
    padding-bottom: 38px; /* Ensure text doesn't overlap bottom bar */
}

.voice-textarea-actions {
    position: absolute;
    right: 10px;
    bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.95);
    padding: 2px 8px;
    border-radius: 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    z-index: 4;
}

.voice-textarea-actions .voice-mic-trigger,
.voice-textarea-actions .voice-mic-circle-btn {
    position: relative !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
    width: 28px !important;
    height: 28px !important;
    font-size: 13px !important;
    box-shadow: none !important;
}

.voice-textarea-actions .voice-mic-trigger:hover,
.voice-textarea-actions .voice-mic-circle-btn:hover {
    transform: scale(1.1) !important;
}

/* Top Pill Voice Button */
.voice-top-pill-btn {
    background: #fdf2f8;
    color: #9e007e;
    border: 1px solid #fbcfe8;
    font-size: 11px;
    font-weight: 600;
    border-radius: 20px;
    cursor: pointer !important;
    pointer-events: auto !important;
    transition: all 0.2s ease;
    padding: 3px 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.voice-top-pill-btn:hover {
    background: #9e007e;
    color: #ffffff;
}

.voice-top-pill-btn:hover i {
    color: #ffffff !important;
}

.voice-top-pill-btn.recording {
    background: #dc2626 !important;
    color: #ffffff !important;
    border-color: #dc2626 !important;
}

.voice-top-pill-btn.recording i {
    color: #ffffff !important;
}

/* Language Toggle Switch: [ മലയാളം | English ] */
.voice-lang-switch {
    background: #fdf2f8;
    border: 1px solid #fbcfe8;
    border-radius: 20px;
    padding: 2px;
    display: inline-flex;
    align-items: center;
}

.voice-lang-opt {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 16px !important;
    border: none;
    background: transparent;
    color: #9e007e;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1.2;
}

.voice-lang-opt:hover {
    background: rgba(158, 0, 126, 0.08);
}

.voice-lang-opt.active {
    background: #9e007e !important;
    color: #ffffff !important;
    box-shadow: 0 1px 3px rgba(158, 0, 126, 0.25);
}

/* Manglish Typing Toggle Button */
.voice-manglish-btn {
    background: #fdf2f8;
    color: #9e007e;
    border: 1px solid #fbcfe8;
    font-size: 11px;
    font-weight: 600;
    border-radius: 20px;
    padding: 3px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    outline: none;
}

.voice-manglish-btn:hover {
    background: #fce7f3;
    color: #831843;
}

.voice-manglish-btn.active {
    background: #059669 !important;
    border-color: #047857 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(5, 150, 105, 0.3);
}

/* Live Voice Status Banner */
.voice-live-banner {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-radius: 8px;
    padding: 8px 12px;
    color: #9f1239;
    box-shadow: 0 2px 8px rgba(225, 29, 72, 0.08);
}

.voice-live-indicator-dot {
    width: 9px;
    height: 9px;
    background-color: #e11d48;
    border-radius: 50%;
    display: inline-block;
    animation: blink 0.8s infinite alternate;
}

@keyframes blink {
    from { opacity: 0.2; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1.2); }
}

/* Helper text below input */
.voice-hint-note {
    font-size: 11.5px;
    color: #6b7280;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.voice-hint-note i {
    color: #9e007e;
}

/* Floating Status Pill */
.voice-status-floating-pill {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 999999;
    background: #1e1b4b;
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    animation: fadeInDown 0.2s ease-out;
}

.voice-wave-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #ef4444;
    display: inline-block;
    animation: waveBlink 0.8s infinite alternate ease-in-out;
}

@keyframes waveBlink {
    0% { transform: scale(0.8); opacity: 0.5; }
    100% { transform: scale(1.3); opacity: 1; }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Predictive AI Styles (Email Typo & Location Auto-Fill)
   ========================================================================== */
.email-ai-suggestion {
    animation: fadeInDown 0.25s ease-out;
}

.email-ai-suggestion .border-warning {
    border-color: #fef08a !important;
    background-color: #fefce8 !important;
}

.ai-predict-badge {
    animation: fadeInDown 0.25s ease-out;
}

.ai-predict-badge .border-primary-subtle {
    border-color: #e0e7ff !important;
    background: #f8fafc !important;
}

.ai-autofilled-glow {
    animation: aiPulseGlow 1.5s ease-out;
}

@keyframes aiPulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.3); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
