#mbr-support-launcher{position:fixed;right:22px;bottom:24px;z-index:9990;border:0;color:#fff;background:linear-gradient(135deg,#11588f,#0874b3);box-shadow:0 10px 24px #072b4680;border-radius:999px;padding:12px 17px;display:flex;align-items:center;gap:10px;cursor:pointer;font-weight:700;font-size:14px}#mbr-support-launcher .mbr-support-dot{width:8px;height:8px;border-radius:50%;background:#f69c69}#mbr-support-launcher .mbr-support-dot.online{background:#39d58b}#mbr-support-panel{position:fixed;right:22px;bottom:85px;width:min(375px,calc(100vw - 24px));height:min(560px,calc(100dvh - 115px));background:#fff;border-radius:18px;z-index:9991;box-shadow:0 18px 55px #132e4e66;display:none;overflow:hidden;flex-direction:column;font-family:system-ui,Arial}#mbr-support-panel.open{display:flex;animation:mbrSupIn .18s ease-out}@keyframes mbrSupIn{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:none}}#mbr-support-panel header{display:flex;align-items:center;justify-content:space-between;padding:17px;background:#125a90;color:#fff}#mbr-support-panel header button{color:#fff;background:transparent;border:0;font-size:22px;cursor:pointer}#mbr-support-panel form{display:flex;flex-direction:column;gap:10px;padding:13px}#mbr-support-panel input,#mbr-support-panel textarea{width:100%;box-sizing:border-box;padding:11px;border:1px solid #cbdbe7;border-radius:10px;font:inherit}#mbr-support-panel button.sup-send{background:#1267a3;color:white;border:0;border-radius:10px;padding:11px;cursor:pointer;font-weight:700}#mbr-support-chat{flex:1;overflow-y:auto;background:#ecf3f9;padding:12px;display:flex;flex-direction:column;gap:8px;min-height:0}#mbr-support-chat .sup-msg{background:white;color:#17314b;align-self:flex-start;padding:10px;border-radius:10px;max-width:85%;overflow-wrap:anywhere;white-space:pre-wrap}#mbr-support-chat .sup-msg.visitor{background:#1267a3;color:white;align-self:flex-end}#mbr-support-chat .sup-msg.system{background:#fff5da;align-self:center}#mbr-support-panel .sup-hidden{display:none} @media(max-width:520px){#mbr-support-launcher{right:12px;bottom:16px}#mbr-support-panel{right:2%;width:96%;bottom:70px;height:calc(100dvh - 87px);border-radius:14px}}

#mbr-support-chat .sup-typing{display:flex;align-items:center;gap:3px;background:#fff;color:#61717e;align-self:flex-start;border-radius:12px;padding:10px}#mbr-support-chat .sup-typing i{width:6px;height:6px;border-radius:50%;background:#61717e;animation:mbrdot 1.1s infinite}#mbr-support-chat .sup-typing i:nth-child(2){animation-delay:.14s}#mbr-support-chat .sup-typing i:nth-child(3){animation-delay:.28s}#mbr-support-chat .sup-typing small{margin-left:5px}@keyframes mbrdot{30%{transform:translateY(-4px)}}#mbr-support-chat .sup-receipt{color:#a7d3e6;font-weight:800;letter-spacing:-3px;margin-left:6px}#mbr-support-chat .sup-receipt.read{color:#48f2a1}

#mbr-sup-new.sup-restart{display:block;margin:8px 12px 14px;width:calc(100% - 24px);background:#166b9e;color:#fff;border:0;border-radius:10px;padding:13px;font-weight:700;cursor:pointer}

#mbr-sup-compose{display:flex!important;flex-direction:row!important;align-items:center;flex-wrap:wrap}#mbr-sup-compose.sup-hidden{display:none!important}#mbr-sup-compose #mbr-sup-attach,#mbr-sup-compose #mbr-sup-record{border:0;background:transparent;font-size:19px;cursor:pointer}#mbr-sup-compose input[name=message]{flex:1;min-width:110px;width:auto}#mbr-support-chat .sup-file-link,#mbr-support-chat a{color:inherit;font-weight:700}#mbr-support-chat .sup-typing small{display:none}

/* V3.1.82: notificações no balão, status e confirmação fora da mensagem */
#mbr-support-launcher{overflow:visible}
#mbr-support-launcher .mbr-support-unread{position:absolute;top:-9px;right:5px;min-width:23px;height:23px;border-radius:999px;padding:0 6px;display:flex;align-items:center;justify-content:center;background:#e8304f;color:#fff;box-shadow:0 2px 7px #0003;font-size:12px;font-weight:800;border:2px solid #fff}
#mbr-support-launcher .mbr-support-unread[hidden]{display:none!important}
#mbr-support-launcher.mbr-support-attention{animation:mbrSupportShake 1s ease-in-out infinite}
@keyframes mbrSupportShake{0%,60%,100%{transform:rotate(0)}67%,83%{transform:rotate(-6deg)}75%,91%{transform:rotate(6deg)}}
#mbr-support-panel header .mbr-header-dot{display:inline-block;vertical-align:middle;margin-left:7px;background:#f56b65;width:9px;height:9px;border-radius:50%}
#mbr-support-panel header .mbr-header-dot.online{background:#42db8f}
#mbr-support-chat .sup-msg.visitor{position:relative;margin-bottom:12px}
#mbr-support-chat .sup-msg.visitor .sup-receipt{position:absolute;right:4px;bottom:-16px;color:#54829a;letter-spacing:-2px;font-size:13px;line-height:14px}
#mbr-support-chat .sup-msg.visitor .sup-receipt.read{color:#148c6a}

/* V3.1.82: notificações no balão, status e confirmação fora da mensagem */
#mbr-support-launcher{overflow:visible}
#mbr-support-launcher .mbr-support-unread{position:absolute;top:-9px;right:5px;min-width:23px;height:23px;border-radius:999px;padding:0 6px;display:flex;align-items:center;justify-content:center;background:#e8304f;color:#fff;box-shadow:0 2px 7px #0003;font-size:12px;font-weight:800;border:2px solid #fff}
#mbr-support-launcher .mbr-support-unread[hidden]{display:none!important}
#mbr-support-launcher.mbr-support-attention{animation:mbrSupportShake 1s ease-in-out infinite}
@keyframes mbrSupportShake{0%,60%,100%{transform:rotate(0)}67%,83%{transform:rotate(-6deg)}75%,91%{transform:rotate(6deg)}}
#mbr-support-panel header .mbr-header-dot{display:inline-block;vertical-align:middle;margin-left:7px;background:#f56b65;width:9px;height:9px;border-radius:50%}
#mbr-support-panel header .mbr-header-dot.online{background:#42db8f}
#mbr-support-chat .sup-msg.visitor{position:relative;margin-bottom:12px}
#mbr-support-chat .sup-msg.visitor .sup-receipt{position:absolute;right:4px;bottom:-16px;color:#54829a;letter-spacing:-2px;font-size:13px;line-height:14px}
#mbr-support-chat .sup-msg.visitor .sup-receipt.read{color:#148c6a}

/* V3.1.84 — composição, mídias e identidade */
#mbr-sup-compose input[type=file]{display:none!important;position:absolute!important;width:0!important;height:0!important;opacity:0!important;pointer-events:none!important}
#mbr-sup-compose{display:flex!important;flex-wrap:nowrap!important;gap:7px!important;align-items:center!important;padding:12px!important;background:#f4f7fa!important}
#mbr-sup-compose.sup-hidden{display:none!important}
#mbr-sup-compose #mbr-sup-attach,#mbr-sup-compose #mbr-sup-record{display:grid;place-items:center;flex:0 0 34px;height:34px;width:34px;padding:0;border-radius:50%;border:1px solid #cbd9e4;background:#fff;color:#17618a;font-size:19px;cursor:pointer}
#mbr-sup-compose input[name=message]{min-width:0!important;flex:1 1 auto!important;padding:10px 12px!important;border-radius:17px!important}
#mbr-sup-compose button[type=submit]{flex:0 0 auto!important;min-width:64px!important;padding:11px 12px!important;border-radius:14px!important}
#mbr-support-chat .mbr-media-image{display:block;max-width:min(100%,240px);max-height:260px;object-fit:contain;border-radius:10px}
#mbr-support-chat .mbr-media-audio{width:min(100%,255px);max-width:100%;height:40px}
#mbr-support-chat .mbr-media-doc{display:block;padding:10px;background:#ffffff1f;border:1px solid #c1d5e5;border-radius:9px;overflow-wrap:anywhere}
#mbr-support-chat .mbr-incoming-row{display:flex;align-items:flex-end;gap:6px;align-self:flex-start;max-width:95%}
#mbr-support-chat .mbr-incoming-row .sup-msg{max-width:calc(100% - 30px)}
#mbr-support-chat .mbr-agent-avatar{width:25px;height:25px;object-fit:contain;border-radius:50%;background:#e1ebf4;flex-shrink:0;padding:3px}


/* V3.1.88: gravacao com microfone, forma de onda real e cronometro */
.mbr-voice-wave{display:none;align-items:center;justify-content:center;gap:8px;min-width:0;flex:1 1 auto;height:42px;border-radius:24px;background:#fff0f1;border:1px solid #f7d1d8;padding:3px 12px}
.mbr-voice-wave canvas{width:100%;height:32px;max-width:190px;min-width:36px;flex:1 1 auto}
.mbr-voice-time{font:700 12px/1 Arial,sans-serif;color:#d12943;white-space:nowrap;font-variant-numeric:tabular-nums}
.mbr-voice-stop{color:#d12943;font-size:17px;line-height:1}
.mbr-voice-active .mbr-voice-wave{display:flex}
.mbr-voice-active input[name=message],.mbr-voice-active #sup-text,.mbr-voice-active button[type=submit]{display:none!important}
.mbr-voice-red{background:#e43649!important;color:#fff!important;border-color:#e43649!important;box-shadow:0 0 0 3px #fae0e4!important}
.mbr-voice-red svg{stroke:#fff!important}
.mbr-voice-stop-icon{font-size:14px;color:inherit}
@media(max-width:430px){.mbr-voice-wave{padding:3px 7px;gap:5px}.mbr-voice-wave canvas{max-width:115px}}

/* V3.1.89 — prévia de áudio antes do envio */
.mbr-voice-preview-active{position:relative}
.mbr-voice-preview-active .mbr-voice-preview{display:flex;align-items:center;gap:7px;flex:1 1 100%;width:100%;min-width:0;padding:7px;background:#edf5f9;border:1px solid #b8d6e5;border-radius:13px}
.mbr-voice-preview audio{flex:1 1 130px;min-width:90px;max-width:100%;height:36px}
.mbr-voice-preview button{border:0!important;cursor:pointer;font-weight:700;border-radius:10px!important;padding:10px 9px!important;min-width:0!important;height:36px!important;white-space:nowrap;font-size:12px}
.mbr-voice-preview .mbr-voice-preview-send{background:#126298!important;color:#fff!important}
.mbr-voice-preview .mbr-voice-preview-cancel{background:#e5e8ed!important;color:#34465b!important}
.mbr-voice-preview button:disabled{opacity:.5;cursor:wait}
#mbr-sup-compose.mbr-voice-preview-active,.sup-send.mbr-voice-preview-active{flex-wrap:wrap!important}
@media(max-width:470px){.mbr-voice-preview{flex-wrap:wrap}.mbr-voice-preview audio{flex-basis:100%}.mbr-voice-preview button{flex:1 1 auto}}

/* V3.1.90: player estável após renderização; nunca animar bolha de anexo. */
#mbr-support-chat .mbr-media{min-width:180px;max-width:100%;min-height:45px;overflow:hidden}
#mbr-support-chat .mbr-media-audio{display:block;width:min(265px,100%);max-width:100%;height:46px}
#mbr-support-chat .mbr-media audio{display:block;width:min(265px,100%);max-width:100%;min-width:0}



/* Player de voz com contraste no padrão WhatsApp */
.mbr-voice-player{display:flex;align-items:center;gap:10px;width:min(276px,100%);max-width:100%;min-width:190px;padding:8px 10px;border-radius:18px;box-sizing:border-box}
.mbr-voice-player.in{background:#f0f2f5;color:#54656f;border:1px solid #dfe5e8}
.mbr-voice-player.out{background:rgba(255,255,255,.18);color:#fff;border:1px solid rgba(255,255,255,.18)}
.mbr-voice-play{border:0!important;display:grid;place-items:center;border-radius:50%!important;width:36px!important;height:36px!important;min-width:36px!important;padding:0!important;font-size:15px;cursor:pointer;box-shadow:0 1px 2px rgba(0,0,0,.12)}
.mbr-voice-player.in .mbr-voice-play{background:#25d366!important;color:#fff!important}
.mbr-voice-player.out .mbr-voice-play{background:#fff!important;color:#0b8f68!important}
.mbr-voice-progress{flex:1 1 auto;min-width:54px;width:100%;height:18px;cursor:pointer;background:transparent;-webkit-appearance:none;appearance:none}
.mbr-voice-progress:focus{outline:none}
.mbr-voice-progress::-webkit-slider-runnable-track{height:4px;border-radius:999px}
.mbr-voice-progress::-moz-range-track{height:4px;border-radius:999px;border:0}
.mbr-voice-progress::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:14px;height:14px;border-radius:50%;margin-top:-5px;border:0;box-shadow:0 1px 2px rgba(0,0,0,.2)}
.mbr-voice-progress::-moz-range-thumb{width:14px;height:14px;border-radius:50%;border:0;box-shadow:0 1px 2px rgba(0,0,0,.2)}
.mbr-voice-player.in .mbr-voice-progress{accent-color:#25d366}
.mbr-voice-player.in .mbr-voice-progress::-webkit-slider-runnable-track{background:#cfd8dc}
.mbr-voice-player.in .mbr-voice-progress::-moz-range-track{background:#cfd8dc}
.mbr-voice-player.in .mbr-voice-progress::-webkit-slider-thumb{background:#fff}
.mbr-voice-player.in .mbr-voice-progress::-moz-range-thumb{background:#fff}
.mbr-voice-player.out .mbr-voice-progress{accent-color:#fff}
.mbr-voice-player.out .mbr-voice-progress::-webkit-slider-runnable-track{background:rgba(255,255,255,.45)}
.mbr-voice-player.out .mbr-voice-progress::-moz-range-track{background:rgba(255,255,255,.45)}
.mbr-voice-player.out .mbr-voice-progress::-webkit-slider-thumb{background:#fff}
.mbr-voice-player.out .mbr-voice-progress::-moz-range-thumb{background:#fff}
.mbr-voice-clock{min-width:33px;font-size:12px;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}
.mbr-voice-player.in .mbr-voice-clock{color:#667781}
.mbr-voice-player.out .mbr-voice-clock{color:#fff}
.mbr-voice-player audio[hidden]{display:none!important}


/* V3.1.92 — Composer de atendimento unificado Master/Tenant */
#sup-send>button[type="submit"],
#mbr-sup-compose>button[type="submit"]{
  flex:0 0 82px!important; width:82px!important; min-width:82px!important;
  height:44px!important; min-height:44px!important;
  padding:0 12px!important; border:0!important; border-radius:24px!important;
  background:#0b5c4b!important; color:#fff!important;
  font:700 13px/1.2 system-ui,Arial,sans-serif!important;
  box-shadow:none!important; white-space:nowrap!important;
}
#sup-send>button[type="submit"]:disabled,
#mbr-sup-compose>button[type="submit"]:disabled{opacity:.48!important;cursor:not-allowed!important}
#sup-send input[type="file"],#mbr-sup-compose input[type="file"]{
  display:none!important; position:absolute!important; visibility:hidden!important;
  opacity:0!important; width:0!important; height:0!important;
  overflow:hidden!important; pointer-events:none!important;
}
@media(max-width:440px){
 #sup-send>button[type="submit"],#mbr-sup-compose>button[type="submit"]{
   flex-basis:70px!important;width:70px!important;min-width:70px!important;
   padding:0 8px!important;
 }
}

/* 3.1.93: Widget flutuante Tenant — mesmos controles e player do Chat Master */
#mbr-support-panel #mbr-sup-compose{flex:0 0 auto!important;display:flex!important;align-items:center!important;flex-wrap:nowrap!important;gap:7px!important;padding:10px 12px!important;background:#f0f2f5!important;border-top:1px solid #d9e1e5!important;box-sizing:border-box!important;min-width:0!important;width:100%!important}
#mbr-support-panel #mbr-sup-compose>button#mbr-sup-attach,
#mbr-support-panel #mbr-sup-compose>button#mbr-sup-record{display:grid!important;place-items:center!important;flex:0 0 43px!important;width:43px!important;height:43px!important;min-width:43px!important;border:1px solid #d2dce2!important;border-radius:999px!important;color:#24566e!important;background:#fff!important;padding:0!important;line-height:1!important;font-size:24px!important;cursor:pointer!important;transition:background .15s,box-shadow .15s!important}
#mbr-support-panel #mbr-sup-compose>button#mbr-sup-attach:hover,
#mbr-support-panel #mbr-sup-compose>button#mbr-sup-record:hover{background:#e5f1f5!important;box-shadow:0 2px 8px #1233!important}
#mbr-support-panel #mbr-sup-compose>button#mbr-sup-record svg{width:22px!important;height:22px!important;stroke-width:1.9!important}
#mbr-support-panel #mbr-sup-compose>input[name=message]{flex:1 1 auto!important;min-width:0!important;width:0!important;height:43px!important;padding:0 12px!important;background:#fff!important;border:1px solid #cdd8df!important;border-radius:999px!important;box-sizing:border-box!important;font-size:12px!important}
#mbr-support-panel #mbr-sup-compose>button.sup-send{flex:0 0 68px!important;width:68px!important;min-width:68px!important;height:43px!important;border:0!important;border-radius:999px!important;background:#0b5c4b!important;color:#fff!important;font-size:12px!important;font-weight:700!important;padding:0 7px!important}
#mbr-support-panel #mbr-sup-compose input[type=file]{display:none!important;visibility:hidden!important;position:absolute!important;width:0!important;height:0!important;opacity:0!important;pointer-events:none!important}
#mbr-support-panel #mbr-support-chat .sup-msg.visitor:has(.mbr-voice-player){background:#fff!important;color:#17314b!important;border-radius:12px!important;max-width:91%!important;padding:9px!important}
#mbr-support-panel #mbr-support-chat .sup-msg:has(.mbr-voice-player){min-width:0!important;overflow:visible!important;white-space:normal!important}
#mbr-support-panel #mbr-support-chat .mbr-media{min-width:0!important;max-width:100%!important;min-height:0!important;overflow:visible!important}
#mbr-support-panel #mbr-support-chat .mbr-voice-player{width:min(204px,100%)!important;min-width:0!important;max-width:100%!important;padding:7px 9px!important;display:flex!important;gap:9px!important;border-radius:18px!important;background:#eff3f5!important;color:#174860!important;border:0!important;box-sizing:border-box!important}
#mbr-support-panel #mbr-support-chat .mbr-voice-play{flex:0 0 35px!important;width:35px!important;height:35px!important;min-width:35px!important;background:#126f9d!important;color:#fff!important;box-shadow:none!important;border:0!important;font-size:15px!important;border-radius:50%!important}
#mbr-support-panel #mbr-support-chat .mbr-voice-progress{flex:1 1 auto!important;min-width:35px!important;width:65px!important;max-width:100%!important;height:18px!important;accent-color:#126f9d!important;cursor:pointer!important}
#mbr-support-panel #mbr-support-chat .mbr-voice-progress::-webkit-slider-runnable-track{height:4px;background:#cad5dc!important;border-radius:20px!important}
#mbr-support-panel #mbr-support-chat .mbr-voice-progress::-webkit-slider-thumb{-webkit-appearance:none!important;appearance:none!important;background:#126f9d!important;width:12px!important;height:12px!important;margin-top:-4px!important;border-radius:50%!important}
#mbr-support-panel #mbr-support-chat .mbr-voice-progress::-moz-range-track{height:4px;background:#cad5dc!important;border-radius:20px!important}
#mbr-support-panel #mbr-support-chat .mbr-voice-progress::-moz-range-thumb{background:#126f9d!important;width:12px!important;height:12px!important;border-radius:50%!important}
#mbr-support-panel #mbr-support-chat .mbr-voice-clock{font-size:10px!important;min-width:27px!important;color:#274c60!important;white-space:nowrap!important}
#mbr-support-panel #mbr-support-chat .mbr-voice-player audio[hidden]{display:none!important}
@media(max-width:390px){#mbr-support-panel #mbr-sup-compose{gap:5px!important;padding:8px!important}#mbr-support-panel #mbr-sup-compose>button#mbr-sup-attach,#mbr-support-panel #mbr-sup-compose>button#mbr-sup-record{flex-basis:38px!important;width:38px!important;height:38px!important;min-width:38px!important}#mbr-support-panel #mbr-sup-compose>button.sup-send{flex-basis:63px!important;width:63px!important;min-width:63px!important;height:39px!important}}

/* V3.1.94: mensagens do chat flutuante limitadas a 70% */
#mbr-support-chat>.sup-msg.visitor,#mbr-support-chat>.sup-msg.agent,#mbr-support-chat>.sup-msg.system{max-width:70%!important;min-width:0;box-sizing:border-box;overflow-wrap:anywhere}
#mbr-support-chat .mbr-incoming-row{max-width:70%!important;min-width:0}
#mbr-support-chat .mbr-incoming-row>.sup-msg{max-width:calc(100% - 32px)!important;min-width:0;box-sizing:border-box}
#mbr-support-chat .mbr-media{min-width:0;max-width:100%}
#mbr-support-chat .mbr-voice-player{min-width:0;width:100%;gap:5px;padding:6px}
#mbr-support-chat .mbr-voice-play{width:30px!important;min-width:30px!important;height:30px!important}
#mbr-support-chat .mbr-voice-progress{min-width:12px}
#mbr-support-chat .mbr-voice-clock{min-width:25px;font-size:10px}

/* V3.1.95 — recado fora do expediente */
#mbr-sup-start .mbr-offline-hint{background:#edf5fb;border:1px solid #cfe1f0;color:#244963;padding:12px;border-radius:10px;font-size:13px;line-height:1.55}#mbr-sup-start .mbr-offline-hint[hidden]{display:none!important}

/* V3.1.96: estado de gravação com envio imediato e opção de descarte */
#mbr-sup-compose.mbr-recording-layout,#sup-send.mbr-recording-layout{display:flex!important;align-items:center!important;flex-wrap:nowrap!important;gap:7px!important;min-width:0!important}
#mbr-sup-compose .mbr-rec-actions,#sup-send .mbr-rec-actions{display:none}
#mbr-sup-compose.mbr-recording-layout .mbr-rec-actions,#sup-send.mbr-recording-layout .mbr-rec-actions{display:contents!important}
#mbr-sup-compose.mbr-recording-layout>:is(input[name=message],button[type=submit],#mbr-sup-attach,#mbr-sup-record),
#sup-send.mbr-recording-layout>:is(#sup-text,#sup-attach,#sup-record,button[type=submit]){display:none!important}
#mbr-sup-compose.mbr-recording-layout .mbr-voice-wave,#sup-send.mbr-recording-layout .mbr-voice-wave{display:flex!important;position:static!important;order:1!important;flex:1 1 auto!important;min-width:0!important;width:auto!important;max-width:none!important;margin:0!important;padding:4px 7px!important;height:43px!important;box-sizing:border-box!important}
#mbr-sup-compose.mbr-recording-layout .mbr-rec-send,#sup-send.mbr-recording-layout .mbr-rec-send{order:0!important}
#mbr-sup-compose.mbr-recording-layout .mbr-rec-discard,#sup-send.mbr-recording-layout .mbr-rec-discard{order:2!important}
#mbr-sup-compose .mbr-rec-actions button,#sup-send .mbr-rec-actions button{display:grid!important;place-items:center!important;flex:0 0 39px!important;width:39px!important;min-width:39px!important;height:39px!important;border-radius:50%!important;cursor:pointer!important;padding:0!important;border:1px solid #ccd9e1!important;background:#fff!important;color:#c52745!important}
#mbr-sup-compose .mbr-rec-actions .mbr-rec-send,#sup-send .mbr-rec-actions .mbr-rec-send{color:#fff!important;background:#0b5c4b!important;border-color:#0b5c4b!important}
#mbr-sup-compose.mbr-recording-layout .mbr-voice-stop,#sup-send.mbr-recording-layout .mbr-voice-stop{display:none!important}
#mbr-sup-compose.mbr-recording-layout .mbr-voice-wave canvas,#sup-send.mbr-recording-layout .mbr-voice-wave canvas{display:block!important;flex:1 1 auto!important;min-width:0!important;width:100%!important;max-width:none!important;height:32px!important}
#mbr-sup-compose.mbr-recording-layout .mbr-voice-time,#sup-send.mbr-recording-layout .mbr-voice-time{flex:0 0 auto!important;font-size:11px!important}
#mbr-sup-compose.mbr-audio-uploading .mbr-rec-actions button,#sup-send.mbr-audio-uploading .mbr-rec-actions button{pointer-events:none!important}
#mbr-sup-compose>button.sup-send{flex:0 0 43px!important;min-width:43px!important;width:43px!important;height:43px!important;display:grid!important;place-items:center!important;border-radius:50%!important;padding:0!important}
#mbr-sup-compose>button#mbr-sup-attach{font-family:Arial,sans-serif!important;font-size:26px!important;font-weight:400!important}

/* V3.1.98 — restaura o player original; só limita a bolha sem alterar o seu interior. */
#mbr-support-panel #mbr-support-chat .sup-msg:has(.mbr-voice-player){
  max-width:70%!important;box-sizing:border-box!important;
}
#mbr-support-panel #mbr-support-chat .mbr-incoming-row>.sup-msg:has(.mbr-voice-player){
  max-width:70%!important;box-sizing:border-box!important;
}
/* Mantém o favicon maior, sem mudar o visual dos controles de áudio. */
#mbr-support-panel #mbr-support-chat .mbr-incoming-row{gap:7px!important;align-items:flex-end!important}
#mbr-support-panel #mbr-support-chat .mbr-agent-avatar{
  width:34px!important;height:34px!important;min-width:34px!important;
  box-sizing:border-box!important;object-fit:contain!important;
  padding:4px!important;border-radius:50%!important;
  background:#e1ebf4!important;flex-shrink:0!important;
}

/* 3.1.99: ampliar ícone nas mensagens recebidas do Tenant */
#mbr-support-panel #mbr-support-chat .mbr-agent-avatar{width:55px!important;height:55px!important;min-width:34px!important;box-sizing:border-box!important;object-fit:contain!important;padding:4px!important;border-radius:50%!important;background:#e1ebf4!important;flex-shrink:0!important}
#mbr-support-panel #mbr-support-chat .mbr-incoming-row{align-items:flex-end!important;gap:6px!important;max-width:100%!important}

/* V3.2.00 - estado de gravacao e circulos */
#mbr-support-panel #mbr-sup-compose>button#mbr-sup-record.mbr-voice-red,
#mbr-support-panel #mbr-sup-compose>button#mbr-sup-record.is-recording{background:#e43649!important;color:#fff!important;border-color:#e43649!important;box-shadow:0 0 0 3px rgba(228,54,73,.16)!important}
#mbr-support-panel #mbr-sup-compose>button#mbr-sup-record.mbr-voice-red svg,
#mbr-support-panel #mbr-sup-compose>button#mbr-sup-record.is-recording svg{stroke:#fff!important}
#mbr-support-panel #mbr-sup-compose>button#mbr-sup-attach,
#mbr-support-panel #mbr-sup-compose>button#mbr-sup-record,
#mbr-support-panel #mbr-sup-compose>button.sup-send{aspect-ratio:1!important;min-height:42px!important;max-height:42px!important;min-width:42px!important;max-width:42px!important;flex:0 0 42px!important;border-radius:50%!important;padding:0!important}
#mbr-support-panel #mbr-sup-compose.mbr-recording-layout .mbr-rec-actions button{aspect-ratio:1!important;width:39px!important;height:39px!important;min-width:39px!important;max-width:39px!important;min-height:39px!important;max-height:39px!important;flex:0 0 39px!important;border-radius:50%!important}
#mbr-support-panel #mbr-sup-compose.mbr-recording-layout .mbr-voice-wave{flex:1 1 auto!important;max-width:250px!important;min-width:0!important}


/* V3.2.02: faixa de áudio mais larga, com ondas reativas à reprodução */
.mbr-voice-player{width:100%!important;max-width:100%!important;box-sizing:border-box!important;gap:9px!important}
.mbr-voice-track{position:relative;flex:1 1 auto;min-width:60px;height:33px;display:flex;align-items:center}
.mbr-voice-playback-wave{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;border-radius:8px}
.mbr-voice-track .mbr-voice-progress{position:relative;z-index:1;width:100%!important;min-width:0!important;height:30px!important;margin:0!important;background:transparent!important;cursor:pointer}
.mbr-voice-track .mbr-voice-progress::-webkit-slider-runnable-track{background:transparent!important;height:7px!important}
.mbr-voice-track .mbr-voice-progress::-moz-range-track{background:transparent!important;height:7px!important}
.mbr-voice-track .mbr-voice-progress::-webkit-slider-thumb{background:#126f9d!important;border:2px solid #fff!important;width:15px!important;height:15px!important;box-shadow:0 0 0 1px #126f9d!important}
.mbr-voice-track .mbr-voice-progress::-moz-range-thumb{background:#126f9d!important;border:2px solid #fff!important;width:15px!important;height:15px!important;box-shadow:0 0 0 1px #126f9d!important}
#sup-messages .sup-msg:has(.mbr-voice-player){width:min(420px,70%)!important;max-width:70%!important;box-sizing:border-box!important;border-radius:16px!important}
#sup-messages .sup-incoming-row .sup-msg:has(.mbr-voice-player){width:min(420px,100%)!important;max-width:100%!important}
#mbr-support-panel #mbr-support-chat>.sup-msg:has(.mbr-voice-player){width:70%!important;max-width:70%!important}
#mbr-support-panel #mbr-support-chat .mbr-incoming-row>.sup-msg:has(.mbr-voice-player){width:100%!important;max-width:calc(100% - 60px)!important}
#mbr-support-panel #mbr-support-chat .mbr-voice-player{width:100%!important;max-width:none!important}

/* V3.2.03 — real-waveform playback and preloading, unchanged player palette */
.mbr-voice-player{width:100%!important;max-width:100%!important}
.mbr-voice-track{flex:1 1 auto;min-width:0;position:relative;height:34px}
.mbr-voice-playback-wave{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.mbr-voice-progress{position:relative;z-index:1;width:100%!important;height:32px!important;margin:0!important;appearance:none;-webkit-appearance:none;background:transparent!important}
.mbr-voice-progress::-webkit-slider-runnable-track{background:transparent!important;height:4px!important}
.mbr-voice-progress::-moz-range-track{background:transparent!important;height:4px!important}
.mbr-voice-progress::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;background:#126f9d!important;border:2px solid #fff!important;width:15px!important;height:15px!important;border-radius:50%!important;margin-top:-5px!important;box-shadow:0 0 0 1px #126f9d!important}
.mbr-voice-progress::-moz-range-thumb{background:#126f9d!important;border:2px solid #fff!important;width:15px!important;height:15px!important;border-radius:50%!important}
.mbr-voice-player:not(.mbr-audio-ready):not(.mbr-audio-failed){opacity:.8}
.mbr-voice-player:not(.mbr-audio-ready) .mbr-voice-clock{font-size:10px!important;min-width:72px!important;animation:mbr-preparing 1s ease-in-out infinite alternate}
@keyframes mbr-preparing{from{opacity:.5}to{opacity:1}}
.mbr-media-image,.sup-media-image{cursor:zoom-in}
.mbr-media-lightbox{position:fixed;z-index:2147483640;inset:0;background:rgba(0,0,0,.88);display:grid;place-items:center;padding:24px;cursor:zoom-out}
.mbr-media-lightbox img{max-width:95vw;max-height:90dvh;object-fit:contain;box-shadow:0 12px 48px #0008}
/* Keep footer copyright visible on small screens. The widget opens above its launcher. */
@media(max-width:520px){#mbr-support-launcher{bottom:calc(16px + 5dvh + env(safe-area-inset-bottom,0px))!important}
#mbr-support-panel{bottom:calc(70px + 5dvh + env(safe-area-inset-bottom,0px))!important;height:calc(100dvh - 87px - 5dvh - env(safe-area-inset-bottom,0px))!important}}

/* V3.2.04 — dimensão mobile preservada: janela sobre o botão, botão acima do copyright */
#mbr-support-launcher{bottom:calc(58px + env(safe-area-inset-bottom,0px))!important}
@media(max-width:520px){
 #mbr-support-launcher{right:12px!important;bottom:calc(58px + env(safe-area-inset-bottom,0px))!important}
 #mbr-support-panel{right:2%!important;width:96%!important;bottom:calc(12px + env(safe-area-inset-bottom,0px))!important;height:calc(100dvh - 32px - env(safe-area-inset-bottom,0px))!important;max-height:calc(100dvh - 32px - env(safe-area-inset-bottom,0px))!important;z-index:9991!important}
}
/* Wave begins and ends at the slider thumb centers (7.5px on each end). */
.mbr-voice-track .mbr-voice-playback-wave{left:7.5px!important;right:7.5px!important;width:calc(100% - 15px)!important;height:100%!important}

/* V3.2.05: botão acima do rodapé; janela desktop acima do botão. */
#mbr-support-launcher{bottom:calc(74px + env(safe-area-inset-bottom,0px))!important}
@media(min-width:521px){
 #mbr-support-panel{bottom:calc(136px + env(safe-area-inset-bottom,0px))!important;
  max-height:calc(100dvh - 156px - env(safe-area-inset-bottom,0px))!important}
}
@media(max-width:520px){
 #mbr-support-launcher{bottom:calc(92px + env(safe-area-inset-bottom,0px))!important}
 /* Mantém a janela móvel na dimensão aprovada e por cima do botão. */
 #mbr-support-panel{bottom:calc(12px + env(safe-area-inset-bottom,0px))!important;
  height:calc(100dvh - 32px - env(safe-area-inset-bottom,0px))!important;
  max-height:calc(100dvh - 32px - env(safe-area-inset-bottom,0px))!important}
}
#mbr-support-panel header .mbr-header-brand{display:inline-flex;align-items:center;gap:9px;min-width:0}
#mbr-support-panel header .mbr-header-favicon{display:block;width:27px;height:27px;min-width:27px;
 object-fit:contain;background:rgba(255,255,255,.95);border-radius:50%;padding:3px;box-sizing:border-box}

/* V3.2.06: ajuste fino da posição do botão no mobile; janela conserva dimensões. */
@media(max-width:520px){#mbr-support-launcher{bottom:calc(68px + env(safe-area-inset-bottom,0px))!important}}

/* V3.4.5 - rabinho ligado à bolha recebida, somente lado do cliente */
#mbr-support-chat .mbr-incoming-row>.sup-msg.agent{position:relative!important;overflow:visible!important;}
#mbr-support-chat .mbr-incoming-row>.sup-msg.agent::after{content:"";position:absolute;left:-11px;bottom:1px;width:18px;height:18px;background:#fff;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M18 0V18H0c4 0 6.8-1.5 8.6-4 .9-1.3 1.2-2.7 1.5-3.9.2-.8.4-1.6.8-2.2.5-.7 1.2-1.1 2.2-1.2-1-.2-1.7-.7-2.1-1.4-.4-.7-.6-1.4-.9-2.2-.4-1.2-.9-2.4-1.8-3.5C13.9 1.3 15.7.4 18 0z'/%3E%3C/svg%3E") no-repeat center/contain;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M18 0V18H0c4 0 6.8-1.5 8.6-4 .9-1.3 1.2-2.7 1.5-3.9.2-.8.4-1.6.8-2.2.5-.7 1.2-1.1 2.2-1.2-1-.2-1.7-.7-2.1-1.4-.4-.7-.6-1.4-.9-2.2-.4-1.2-.9-2.4-1.8-3.5C13.9 1.3 15.7.4 18 0z'/%3E%3C/svg%3E") no-repeat center/contain;pointer-events:none;}
#mbr-support-chat .sup-msg.visitor .sup-receipt.read{color:#39ff78!important;}

/* V5.0.7 - greeting, sector selector, finished chat and protocol layout */
#mbr-sup-start .mbr-greeting{padding:11px 12px;background:#e8f4ff;color:#17547b;border-radius:10px;font-size:13px;line-height:1.5}
#mbr-sup-start select{width:100%;min-height:42px;border:1px solid #cbdbe7;border-radius:10px;background:#fff;padding:9px 11px;font:inherit;color:#30445a}
#mbr-support-panel #mbr-sup-compose.sup-hidden{display:none!important}
#mbr-support-chat .sup-msg.system{font-size:clamp(9px,2.5vw,12px)!important;white-space:pre!important;max-width:none!important;line-height:1.55!important;text-align:left!important;width:max-content!important;overflow:visible!important}
#mbr-support-chat .sup-msg.system:has(.mbr-media){white-space:normal!important}

/* V5.2.2: campo de mensagem multilinha, sem recortar texto ou esconder caracteres. */
#mbr-support-panel #mbr-sup-compose{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:flex-end!important;min-width:0!important;gap:6px!important;padding:10px!important;box-sizing:border-box!important}
#mbr-support-panel #mbr-sup-compose textarea[name=message]{flex:1 1 0!important;min-width:0!important;width:0!important;max-width:none!important;min-height:42px!important;max-height:130px!important;height:42px;box-sizing:border-box!important;resize:none!important;overflow-y:auto!important;overflow-x:hidden!important;white-space:pre-wrap!important;overflow-wrap:anywhere!important;line-height:1.35!important;padding:10px 12px!important;font:inherit!important}
#mbr-support-panel #mbr-sup-start{overflow-y:auto!important;min-height:0!important;max-height:calc(100% - 70px)!important;overscroll-behavior:contain}
#mbr-support-panel #mbr-sup-start>textarea[name=message]{min-height:90px!important;max-height:190px!important;flex:0 0 auto!important;resize:vertical!important;overflow-y:auto!important}
#mbr-support-panel #mbr-sup-compose.mbr-recording-layout textarea[name=message]{display:none!important}
