.voice-input-button{display:inline-flex;align-items:center;justify-content:center;gap:.4rem;min-height:44px;padding:.45rem .75rem;margin-top:.35rem;border:1px solid #c8d2d8;border-radius:8px;background:#f4f8fa;color:#243d48;font:inherit;font-size:.9rem;cursor:pointer}.voice-input-button:hover{background:#e7f1f5}.voice-input-button:focus-visible{outline:3px solid #167b91;outline-offset:2px}

/* Compact dictation controls remain inside contact inputs and note textareas. */
.voice-input-field{display:block;position:relative;min-width:0;width:100%;font:inherit}
.voice-input-field>textarea,.voice-input-field.voice-input-field-phone>input,.voice-input-field.voice-input-field-name>input{display:block;width:100%;box-sizing:border-box;padding-right:56px}
.voice-input-field-note>textarea{min-height:48px}
.voice-input-field>.voice-input-button{position:absolute;top:2px;right:2px;bottom:auto;left:auto;flex:none;transform:none;width:44px;min-width:44px;max-width:44px;height:44px;min-height:44px;max-height:44px;padding:10px;margin:0;border:0;background:transparent}
.voice-input-field-phone,.voice-input-field-name{display:grid;grid-template-columns:minmax(0,1fr)}
.voice-input-field-phone>input,.voice-input-field-name>input{grid-area:1/1}
.voice-input-field-phone>.voice-input-button,.voice-input-field-name>.voice-input-button{position:relative;grid-area:1/1;justify-self:end;align-self:center;top:auto;right:2px;transform:none}
.voice-input-field-phone>.voice-input-status,.voice-input-field-name>.voice-input-status{grid-row:2}
.voice-input-field>.voice-input-button:hover{background:#e7f1f5}
.voice-input-icon{width:22px;height:22px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

.voice-input-button[data-state="listening"],.voice-input-button[data-state="starting"],.voice-input-button[data-state="transcribing"]{color:#087d72;background:#e5f4ec}
.voice-input-button[data-state="listening"] .voice-input-icon,.voice-input-button[data-state="starting"] .voice-input-icon,.voice-input-button[data-state="transcribing"] .voice-input-icon{animation:voice-listening-spin 1.8s linear infinite}
@keyframes voice-listening-spin{to{transform:rotate(360deg)}}
.voice-input-status{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.voice-input-status.voice-input-error{position:static;display:block;width:auto;height:auto;margin:6px 0 0;overflow:visible;clip-path:none;white-space:normal;color:#b42318;font-size:.85rem;line-height:1.4}
@media(prefers-reduced-motion:reduce){.voice-input-button .voice-input-icon{animation:none!important}}

.voice-recordings{display:grid;gap:8px;margin-top:8px}.voice-recording{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 12px;padding:10px;border:1px solid #c8d2d8;border-radius:8px;background:#f4f8fa;font-size:.85rem}.voice-recording>span,.voice-recording>audio{grid-column:1/-1}.voice-recording>audio{width:100%;max-width:100%;height:40px}.voice-recording>a{color:#087d72;justify-self:start}.voice-recording>button{font-size:.85rem;min-height:44px;min-width:44px;padding:6px 10px}

.voice-recording>a{display:inline-flex;align-items:center;min-height:44px;min-width:44px}

.voice-recording-recovery{padding:14px;margin:14px 0;border:1px solid #dfb85b;border-radius:10px;background:#fff8e5;color:#243d48;max-height:40vh;overflow:auto}.voice-recording-recovery>p{font-size:.85rem;margin:6px 0 12px;line-height:1.4}.voice-recording-recovery>.voice-recording{margin-top:8px}.voice-recording-recovery-floating{position:fixed;right:12px;bottom:12px;z-index:50;width:min(360px,calc(100vw - 24px));box-sizing:border-box;box-shadow:0 4px 20px #243d4826}
