/* Original implementation inspired by Uiverse chat patterns; HabilitaPro palette. */
.hpchat{position:fixed;right:24px;bottom:24px;z-index:1000;font-family:Barlow,Arial,sans-serif;color:#173247;line-height:1.5;font-size:15px}
.hpchat *{box-sizing:border-box}
.hpchat [hidden],.hpchat[hidden]{display:none!important}
.hpchat button,.hpchat textarea{font:inherit}
.hpchat button{cursor:pointer}
.hpchat button:focus-visible,.hpchat a:focus-visible,.hpchat textarea:focus-visible{outline:3px solid #1815c7;outline-offset:4px}
.hpchat-launcher{display:flex;align-items:center;gap:12px;min-height:60px;padding:8px 22px 8px 9px;border:1px solid #c95008;border-radius:40px;background:#f57822;color:#10283e;font-weight:700;box-shadow:0 8px 25px #10283e26}
.hpchat-launcher-icon{width:42px;height:42px;display:grid;place-items:center;background:#173247;color:#fff;border-radius:50%}
.hpchat svg{display:block;width:23px;height:23px;flex-shrink:0}
.hpchat-badge{border-radius:50%;width:23px;height:23px;display:grid;place-items:center;background:#fff;font-size:12px}
.hpchat-panel{position:absolute;bottom:76px;right:0;width:385px;height:min(590px,calc(100dvh - 132px));display:flex;flex-direction:column;overflow:hidden;border:1px solid #d5e0e7;border-radius:20px;background:#fff;box-shadow:0 18px 65px #10283e33}
.hpchat-header{display:flex;align-items:center;gap:12px;padding:19px 16px;background:#10283e;color:#fff;flex-shrink:0}
.hpchat-mark{width:38px;height:38px;border-radius:11px;background:#fff;color:#173247;display:flex;align-items:center;justify-content:center;font-weight:800;letter-spacing:-1px;font-size:18px;flex-shrink:0}
.hpchat-mark>span{color:#de631b}
.hpchat-header>div:nth-child(2){flex:1;min-width:0}
.hpchat-header h2{font-size:17px;line-height:1.25;letter-spacing:-.02em;margin:0;color:#fff;font-weight:600}
.hpchat-header p{font-size:12px;color:#c9d8e2;margin:4px 0 0}
.hpchat-close{font-size:28px!important;line-height:1;border:0;background:transparent;color:#fff;width:34px;height:34px;border-radius:50%;padding:0;flex-shrink:0}
.hpchat-close:hover{background:#ffffff18}
.hpchat-messages{flex:1;min-height:80px;overflow:auto;overscroll-behavior:contain;padding:20px 16px;background:#f3f7fa;scrollbar-width:thin}
.hpchat-welcome{margin:0 0 20px;border-left:3px solid #f57822;padding-left:13px}
.hpchat-welcome p{font-size:18px;color:#173247;margin:0 0 6px;font-weight:600}
.hpchat-welcome>span{font-size:14px;line-height:1.55;display:block;color:#5b6b77;max-width:290px}
.hpchat-message{width:fit-content;max-width:90%;padding:11px 13px;margin:12px 0;border-radius:13px;background:#fff;border:1px solid #e0e7ed;overflow-wrap:anywhere}
.hpchat-message-visitor{margin-left:auto;background:#173247;color:#fff;border-color:#173247;border-bottom-right-radius:3px}
.hpchat-message-reply{border-bottom-left-radius:3px}
.hpchat-message-name{display:block;font-size:11px;font-weight:600;margin-bottom:5px;color:#657581}
.hpchat-message-visitor .hpchat-message-name{color:#cbd8e4}
.hpchat-message p{margin:0;font-size:14px;line-height:1.55;color:inherit;white-space:pre-wrap}
.hpchat-message time{display:block;text-align:right;font-size:10px;opacity:.65;margin-top:6px}
.hpchat-topics{display:flex;gap:7px;flex-wrap:wrap;padding:13px 16px 0;background:#fff}
.hpchat-topics button{padding:6px 10px;border-radius:20px;border:1px solid #d4e0e8;background:#fff;color:#173247;font-size:12px;font-weight:600}
.hpchat-topics button:hover{background:#edf3f7}
.hpchat-status{padding:11px 17px 9px;margin:0;color:#667884;font-size:12px;line-height:1.4;flex-shrink:0}
.hpchat-status.hpchat-error{color:#a53b20}
.hpchat-form{display:flex;gap:10px;align-items:flex-end;padding:10px 13px;border-top:1px solid #e0e7ed;margin:0;background:white;flex-shrink:0}
.hpchat textarea{display:block;min-height:42px;max-height:100px;flex:1;min-width:0;resize:none;border:1px solid #d4dfe6;background:#f7f9fb;border-radius:12px;padding:10px 12px;color:#173247;font-size:14px;line-height:1.5}
.hpchat textarea::placeholder{color:#687b88}
.hpchat-send{display:grid;place-items:center;width:43px;height:43px;border:0;border-radius:12px;background:#f57822;color:#10283e;flex-shrink:0}
.hpchat-send:disabled,.hpchat-new:disabled{opacity:.5;cursor:wait}
.hpchat-footer{display:flex;gap:15px;align-items:center;justify-content:space-between;padding:0 16px 12px;background:#fff;font-size:11px;flex-shrink:0}
.hpchat-new{padding:0;border:0;background:none;color:#647583;font-size:11px}
.hpchat-whatsapp{color:#173247;border-bottom:1px solid #c5d2db;text-decoration:none}
.hpchat-sr,.hpchat-trap{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:680px){.hpchat{right:15px;bottom:max(15px,env(safe-area-inset-bottom));font-size:14px}.hpchat-launcher{min-height:54px;padding:7px 17px 7px 7px;gap:9px}.hpchat-launcher-icon{width:38px;height:38px}.hpchat-panel{width:min(385px,calc(100vw - 30px));bottom:67px;height:min(560px,calc(100dvh - 100px));border-radius:17px}.hpchat textarea{font-size:16px}.hpchat-header{padding:16px 13px}.hpchat-header h2{font-size:16px}}
@media(max-height:500px){.hpchat-panel{height:calc(100dvh - 30px);bottom:0}.hpchat-is-open .hpchat-launcher{visibility:hidden}.hpchat-header{padding:12px}.hpchat-welcome{margin-bottom:10px}}
@media(prefers-reduced-motion:no-preference){.hpchat-launcher,.hpchat-send{transition:background 180ms,transform 180ms}.hpchat-panel{animation:hpchat-open 220ms ease-out}@keyframes hpchat-open{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}}
@media(hover:hover) and (pointer:fine){.hpchat-launcher:hover{background:#ff8b36;transform:translateY(-2px)}.hpchat-send:hover:not(:disabled){background:#ff8b36}}
@media print{.hpchat{display:none!important}}
