/* ============================================================
   Voice typing (site-wide) - styles
   Works alongside existing form-control / grid / flex layouts
   without changing their structure: the input keeps its normal
   width, we just overlay a small mic button inside it.
   ============================================================ */

.voice-wrap{
    position:relative;
    display:block;
    width:100%;
}
.voice-wrap > input,
.voice-wrap > textarea{
    width:100%;
    padding-right:36px !important;
}
/* hide native number spinners since our mic sits in that corner */
.voice-wrap > input[type="number"]{
    -moz-appearance:textfield;
}
.voice-wrap > input[type="number"]::-webkit-outer-spin-button,
.voice-wrap > input[type="number"]::-webkit-inner-spin-button{
    -webkit-appearance:none;
    margin:0;
}

.voice-mic-btn{
    position:absolute;
    right:4px;
    top:50%;
    transform:translateY(-50%);
    width:28px;
    height:28px;
    border:none;
    border-radius:7px;
    background:transparent;
    color:#9aa4b2;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:13px;
    cursor:pointer;
    padding:0;
    transition:background .15s, color .15s;
}
.voice-wrap > textarea ~ .voice-mic-btn{
    top:8px;
    transform:none;
}
.voice-mic-btn:hover{
    background:#f3f4f6;
    color:#4b5563;
}
.voice-mic-btn.listening{
    background:#fee2e2;
    color:#dc2626;
    animation:voiceMicPulse 1s infinite;
}
.voice-mic-btn[disabled]{
    opacity:.35;
    cursor:not-allowed;
}
@keyframes voiceMicPulse{
    0%{ box-shadow:0 0 0 0 rgba(220,38,38,.35); }
    70%{ box-shadow:0 0 0 7px rgba(220,38,38,0); }
    100%{ box-shadow:0 0 0 0 rgba(220,38,38,0); }
}

/* Floating global language switch: Gujarati / English.
   Voice typing language is one setting for the whole app,
   saved on this device, so every mic button in every form
   uses whichever language you last picked here. */
.voice-lang-fab{
    position:fixed;
    right:16px;
    bottom:20px;
    z-index:1080;
    display:flex;
    align-items:center;
    gap:7px;
    background:#111c2b;
    color:#fff;
    border:none;
    border-radius:999px;
    padding:10px 16px 10px 14px;
    font-size:13px;
    font-weight:700;
    box-shadow:0 6px 18px rgba(17,28,43,.35);
    cursor:pointer;
}
.voice-lang-fab i{ font-size:13px; color:#fdba74; }
.voice-lang-fab:active{ transform:scale(0.97); }
@media (max-width: 991.98px){
    .voice-lang-fab{ bottom:calc(64px + 14px + env(safe-area-inset-bottom)); }
}
