/* ISPBF chat toolbar UI — isolated selectors */
:root{--ispbf-tool-green:#07856c;--ispbf-tool-dark:#075e54}
.ispbf-chat .ispbf-chat-composer{border-top:1px solid #e7ecec;align-items:center;gap:8px;padding:10px 12px;background:#fff}
.ispbf-chat .ispbf-chat-send,.ispbf-agent-send{width:46px;height:46px;min-width:46px;border:0;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:var(--ispbf-tool-green);color:#fff;box-shadow:0 4px 12px #075e542a;cursor:pointer;transition:transform .18s,background .18s}
.ispbf-chat .ispbf-chat-send:hover,.ispbf-agent-send:hover{background:var(--ispbf-tool-dark);transform:translateY(-1px)}
.ispbf-chat .ispbf-chat-send:disabled,.ispbf-agent-send:disabled{opacity:.5;cursor:not-allowed}
.ispbf-chat .ispbf-chat-send svg,.ispbf-agent-send svg{width:21px;height:21px;transform:rotate(180deg)}
.chat-extra-tools{display:flex;align-items:center;gap:8px;padding:7px 12px 3px;background:#fff;position:relative;flex-wrap:wrap}
.chat-extra-tools .chat-tool-btn{width:42px;height:42px;flex:0 0 42px;border:1px solid #e6eceb;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:#f5f8f7;color:#38534c;cursor:pointer;transition:background .16s,transform .16s,border-color .16s}
.chat-extra-tools .chat-tool-btn:hover{background:#e7f5ef;border-color:#b7e5d0;transform:translateY(-1px)}
.chat-extra-tools .chat-tool-btn:focus-visible,.ispbf-chat-send:focus-visible,.ispbf-agent-send:focus-visible{outline:3px solid #6bd4b5;outline-offset:2px}
.chat-extra-tools .chat-tool-btn svg{width:20px;height:20px}
.chat-extra-tools .chat-record.is-recording{background:#ffe7e8;border-color:#ffc0c5;color:#cf293b;animation:ispbf-record-pulse 1.5s infinite}
@keyframes ispbf-record-pulse{50%{box-shadow:0 0 0 5px #e83d491c}}
.chat-extra-info{font-size:12px;color:#5b6b65;min-width:0;flex:1;overflow-wrap:anywhere}
.chat-tool-menu{position:absolute;bottom:calc(100% + 5px);inset-inline-start:12px;width:min(255px,calc(100vw - 40px));padding:7px;border-radius:16px;background:#fff;box-shadow:0 12px 40px #0b28282c;border:1px solid #e7edeb;z-index:50}
.chat-tool-menu[hidden],.chat-audio-preview[hidden]{display:none!important}
.chat-tool-menu button{width:100%;display:flex;align-items:center;gap:12px;padding:11px;border:0;border-radius:10px;background:transparent;color:#243a33;text-align:start;cursor:pointer;font-size:13px}
.chat-tool-menu button:hover{background:#edf7f2}
.chat-tool-menu button svg{width:19px;height:19px;color:var(--ispbf-tool-green)}
.chat-audio-preview{display:flex;align-items:center;gap:7px;flex-wrap:wrap;flex-basis:100%;padding:8px 0}
.chat-audio-preview audio{height:37px;max-width:100%;flex:1;min-width:145px}
.chat-audio-preview .chat-preview-btn{border:0;border-radius:20px;padding:8px 11px;background:#e6f5ee;color:#096448;font-size:12px;display:inline-flex;gap:5px;align-items:center;cursor:pointer}
.chat-audio-preview .chat-preview-btn.is-danger{background:#ffeded;color:#b52732}
.chat-audio-preview .chat-preview-btn svg{width:15px;height:15px}
.chat-record-clock{font-size:12px;font-variant-numeric:tabular-nums;color:#bd2530;font-weight:700}
#agent-form.ispbf-agent-composer{display:flex!important;align-items:center;gap:8px!important;padding:8px 10px;border:1px solid #e7ecec;border-radius:16px;background:#fff}
#agent-form.ispbf-agent-composer input[name=body]{border:0;box-shadow:none;min-width:0;background:transparent}
#agent-form.ispbf-agent-composer .ispbf-agent-send{flex:0 0 43px;width:43px;height:43px}
#agent-form+.chat-extra-tools{margin-top:6px}
.chat-attachment-item{max-width:min(300px,85%);padding:9px 11px;border-radius:14px;overflow-wrap:anywhere}
.chat-attachment-item.mine{margin-inline-start:auto;background:#dcf8e8;color:#174e36}
.chat-attachment-item.theirs{margin-inline-end:auto;background:#f3f5f5;color:#273b36}
.chat-attachment-item img,.chat-attachment-item video{display:block;border-radius:10px}
.chat-attachment-item a{color:#096c56;text-decoration:underline}
@media(max-width:480px){.chat-extra-tools{gap:6px;padding:6px 9px 2px}.chat-extra-tools .chat-tool-btn{width:39px;height:39px;flex-basis:39px}.chat-extra-info{font-size:11px}.ispbf-chat .ispbf-chat-composer{padding:8px}}
@media(prefers-reduced-motion:reduce){.chat-extra-tools .chat-tool-btn,.ispbf-chat-send,.ispbf-agent-send{transition:none}.chat-extra-tools .chat-record.is-recording{animation:none}}
