/* Single input row: editable text, transparent mic, existing send arrow. */
#savi-panel #savi-form.pv-chat-voice-form{display:grid;grid-template-columns:minmax(0,1fr) 40px 44px;align-items:center;gap:4px;padding-inline:8px}
#savi-panel #savi-form.pv-chat-voice-form #savi-input{grid-column:1;grid-row:1;min-width:0;width:100%;max-width:100%;box-sizing:border-box}
#savi-panel #savi-form>.pv-chat-microphone{grid-column:2;grid-row:1;width:40px;height:40px;min-width:40px;min-height:40px;display:grid;place-items:center;flex:none;padding:0;margin:0;border:0;border-radius:4px;background:transparent;color:#102e50;box-shadow:none;cursor:pointer;touch-action:manipulation}
#savi-panel #savi-form>.pv-chat-microphone:hover,#savi-panel #savi-form>.pv-chat-microphone[aria-pressed=true]{background:transparent;color:#0a66ac;box-shadow:none}
#savi-panel #savi-form>.pv-chat-microphone:focus-visible{outline:2px solid currentColor;outline-offset:1px}
#savi-panel #savi-form>.pv-chat-microphone svg{display:block;width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.55;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
#savi-panel #savi-form>.pv-chat-microphone[data-speech-state=error]{color:#a23b23}
#savi-panel #savi-form.pv-chat-voice-form>button[type=submit]{grid-column:3;grid-row:1}
#savi-panel .pv-chat-speech-status{padding:4px 14px 6px;font-size:12px;line-height:1.5;color:#102e50;background:transparent;overflow-wrap:anywhere}
#savi-panel .pv-chat-speech-status[hidden]{display:none!important}
#savi-panel .pv-chat-speech-status button{min-height:40px;border:0;background:transparent;color:inherit;cursor:pointer;text-decoration:underline}
#savi-panel .pv-chat-audio-menu{max-width:100%;min-width:0;padding:4px 0}
#savi-panel .pv-chat-audio-menu summary{min-height:40px;display:flex;align-items:center;cursor:pointer}
#savi-panel .pv-chat-audio-menu p{font-size:12px;line-height:1.5;white-space:normal;padding:4px 0}
#savi-panel .pv-chat-audio-menu select{max-width:100%;min-width:0;width:100%;min-height:40px}
#savi-panel .pv-chat-audio-menu label{display:flex;align-items:center;gap:6px;min-height:40px}
#savi-panel .pv-chat-listen{border:0;background:transparent;color:#0a66ac;cursor:pointer;min-height:40px;font-size:12px}
/* Off in the applied configuration means no dead microphone or reserved column. */
#savi-panel .pv-chat-microphone[hidden],#savi-panel .pv-chat-audio-menu[hidden]{display:none!important}

#savi-panel .pv-chat-listen{display:inline-flex;align-items:center;gap:6px;padding:4px 8px;min-height:40px;border-radius:6px;max-width:100%;line-height:1.4;touch-action:manipulation}
#savi-panel .pv-chat-listen[hidden]{display:none!important}
#savi-panel .pv-chat-listen svg{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
#savi-panel .pv-chat-listen[aria-pressed=true]{color:#102e50;background:#edf5fc}

#savi-panel .pv-chat-audio-menu button{min-height:40px;cursor:pointer}#savi-panel .pv-chat-audio-menu input[type=checkbox]{flex:none}#savi-panel .pv-chat-audio-menu [role=status]{overflow-wrap:anywhere}

/* The header is white-on-blue; its dropdown is navy-on-white. */
#savi-panel .pv-chat-more-items{color:#102e50;width:min(320px,calc(100vw - 48px));max-height:min(60vh,440px);overflow-y:auto;overscroll-behavior:contain}
#savi-panel .pv-chat-more-items summary,#savi-panel .pv-chat-more-items label,#savi-panel .pv-chat-more-items p,#savi-panel .pv-chat-more-items button{color:inherit}
#savi-panel .pv-chat-more-items summary{white-space:normal;line-height:1.4;padding:8px 6px;min-height:40px}

#savi-panel .pv-chat-audio-menu button{width:auto;height:auto;max-width:100%;min-height:40px;padding:8px 6px;font-family:inherit;font-size:14px;font-weight:400;line-height:1.4;text-align:left;white-space:normal;background:transparent;border:0;box-shadow:none}
#savi-panel .pv-chat-audio-menu select{font:inherit;font-size:14px;color:#102e50;background:#fff}

#savi-panel .savi-head .pv-chat-more{position:static}
#savi-panel .pv-chat-more-items{right:12px;left:auto;top:calc(100% - 4px)}

/* Device preference feedback: one polite toast per actual toggle, no overlay. */
.pv-chat-device-toast{padding:9px 12px;margin:4px 12px;color:#083d65;background:#eaf5ff;border-left:3px solid #0873ba;border-radius:5px;font-size:13px;line-height:1.45}.pv-chat-device-toast[hidden]{display:none}

/* Notices remain visible even when the message list or mobile chat panel scrolls. */
.pv-chat-device-toast{position:fixed;top:calc(12px + env(safe-area-inset-top,0px));left:50%;transform:translateX(-50%);z-index:2147483000;box-sizing:border-box;width:max-content;max-width:min(520px,calc(100vw - 24px));margin:0;padding:12px 16px;background:#eaf5ff;color:#083d65;border:1px solid #b7d8ed;border-left:3px solid #0873ba;border-radius:8px;box-shadow:0 6px 22px #102e5026;font-size:14px;line-height:1.5;overflow-wrap:anywhere;pointer-events:none}.pv-chat-device-toast[hidden]{display:none!important}
