.egwa-widget,.egwa-widget * { box-sizing: border-box; }
.egwa-widget { --egwa-wa: #128c4a; --egwa-text: #1b2a4a; position: fixed; right: 22px; bottom: calc(22px + env(safe-area-inset-bottom,0px)); z-index: 100; font: 400 16px/1.5 var(--sans),Arial,sans-serif; color: var(--egwa-text); }
.no-js #egwa-root { display: none; }
.egwa-chat-window { position: absolute; right: 0; bottom: 74px; width: 370px; max-width: calc(100vw - 36px); max-height: calc(100vh - 118px); max-height: calc(100dvh - 118px - env(safe-area-inset-bottom,0px)); display: grid; grid-template-rows: auto minmax(0,1fr) auto auto; background: #fffefa; border: 1px solid #d6dfda; border-radius: 18px; overflow: hidden; box-shadow: 0 16px 42px #101a2b30; }
.egwa-chat-window[hidden] { display: none!important; }
.egwa-header { background: #1b2a4a; color: #fffefa; padding: 20px 54px 20px 18px; display: flex; align-items: center; gap: 13px; position: relative; }
.egwa-avatar { display: block; width: 52px; height: 52px; flex: 0 0 52px; border-radius: 50%; object-fit: cover; object-position: 50% 18%; border: 2px solid #ffffffbb; }
.egwa-agent-info { min-width: 0; }
.egwa-agent-name { margin: 0; color: inherit; font: 600 17px/1.3 var(--sans),Arial,sans-serif; letter-spacing: 0; text-wrap: initial; }
.egwa-agent-status { margin: 6px 0 0; color: #d4b77d; font-size: 14px; line-height: 1.5; }
.egwa-close { position: absolute; right: 8px; top: 10px; width: 44px; height: 44px; border: 0; border-radius: 50%; color: #fff; background: transparent; display: grid; place-items: center; padding: 0; cursor: pointer; }
.egwa-close:hover { background: #ffffff17; color: #00c9e5; }
.egwa-body { min-height: 0; padding: 24px 18px 20px; background: #f3efe9; overflow-y: auto; overscroll-behavior: contain; }
.egwa-message { margin: 0; padding: 16px 18px; border-radius: 0 15px 15px; font: 400 16px/1.65 var(--sans),Arial,sans-serif; background: #fffefa; color: #1b2a4a; white-space: pre-line; box-shadow: 0 2px 8px #1b2a4a08; }
.egwa-contact-details { display: flex; flex-direction: column; gap: 5px; margin-top: 18px; font: 400 13px/1.7 var(--sans),Arial,sans-serif; color: #526075; }
.egwa-contact-details a { max-width: 100%; overflow-wrap: anywhere; }
.egwa-contact-details a:hover { text-decoration: underline; text-underline-offset: 3px; color: #00788a; }
.egwa-input-area { display: flex; align-items: center; gap: 12px; padding: 14px 14px 5px 18px; background: #fffefa; }
.egwa-input { flex: 1; min-width: 0; border: 0; border-bottom: 1px solid #c8d3ce; border-radius: 0; outline: none; padding: 9px 0; background: transparent; color: #1b2a4a; font: 400 16px/1.5 var(--sans),Arial,sans-serif; }
.egwa-input::placeholder { color: #68766f; }
.egwa-input:focus { border-color: #00788a; box-shadow: 0 1px 0 #00788a; }
.egwa-send { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 50%; border: 0; background: var(--egwa-wa); color: #fff; display: grid; place-items: center; padding: 0; cursor: pointer; }
.egwa-send:hover,.egwa-floating-btn:hover { background: #087c40; }
.egwa-open-note { margin: 0; padding: 7px 18px 12px; font-size: 13px; line-height: 1.6; color: #68746d; }
.egwa-footer { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 11px 14px; background: #f7f8f5; border-top: 1px solid #e0e5de; color: #59675f; font-size: 13px; line-height: 1.6; text-align: center; }
.egwa-footer>span:last-child { min-width: 0; }
.egwa-floating-btn { position: relative; width: 56px; height: 56px; margin-left: auto; padding: 0; display: grid; place-items: center; border-radius: 50%; border: 0; background: var(--egwa-wa); color: #fff; box-shadow: 0 6px 20px #128c4a35; cursor: pointer; transition: background .2s,transform .2s; }
.egwa-floating-btn:hover { transform: translateY(-2px); }
.egwa-floating-btn:focus-visible,.egwa-send:focus-visible { outline: 3px solid #1b2a4a; outline-offset: 4px; }
.egwa-close:focus-visible { outline: 2px solid #00c9e5; outline-offset: 0; }
.egwa-icon { display: block; flex-shrink: 0; }
.egwa-icon svg { display: block; width: 100%; height: 100%; stroke: none; stroke-width: 0; }
.egwa-floating-btn>.egwa-icon { width: 32px; height: 32px; }
.egwa-send>.egwa-icon { width: 22px; height: 22px; }
.egwa-close>.egwa-icon { width: 20px; height: 20px; }
.egwa-footer>.egwa-icon { width: 15px; height: 15px; }
.egwa-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
/* WhatsApp palette belongs only to the chat; business dialogs keep OTEJI colors. */
#egwa-root .egwa-widget { --egwa-wa: #128c7e; --egwa-text: #111b21; }
#egwa-root .egwa-chat-window { background: #f0f2f5; border-color: #d5d9d6; box-shadow: 0 18px 48px #0b141a30; }
#egwa-root .egwa-header { background: #075e54; color: #fff; }
#egwa-root .egwa-agent-status { color: #d9fdd3; }
#egwa-root .egwa-close:hover { background: #ffffff1f; color: #fff; }
#egwa-root .egwa-close:focus-visible { outline-color: #25d366; }
#egwa-root .egwa-body { background: #efeae2; }
#egwa-root .egwa-message { position: relative; background: #fff; color: #111b21; box-shadow: 0 1px 2px #0b141a26; }
#egwa-root .egwa-message::before { content: ''; position: absolute; top: 0; left: -8px; width: 0; height: 0; border-style: solid; border-width: 0 8px 10px 0; border-color: transparent #fff transparent transparent; }
#egwa-root .egwa-contact-details { color: #54656f; font-style: normal; }
#egwa-root .egwa-contact-details a:hover { color: #075e54; }
#egwa-root .egwa-contact-details a:focus-visible { outline-color: #075e54; }
#egwa-root .egwa-compose { background: #f0f2f5; }
#egwa-root .egwa-input-area { background: transparent; padding: 12px 12px 6px 16px; }
#egwa-root .egwa-input { padding: 11px 15px; border: 1px solid #d9dfdb; border-radius: 22px; background: #fff; color: #111b21; }
#egwa-root .egwa-input::placeholder { color: #667781; }
#egwa-root .egwa-input:focus { border-color: #075e54; box-shadow: 0 0 0 2px #075e5426; }
#egwa-root .egwa-send:hover,#egwa-root .egwa-floating-btn:hover { background: #075e54; }
#egwa-root .egwa-floating-btn { box-shadow: 0 6px 20px #075e5438; }
#egwa-root .egwa-send:focus-visible,#egwa-root .egwa-floating-btn:focus-visible { outline-color: #075e54; }
#egwa-root .egwa-open-note { background: transparent; color: #667781; }
#egwa-root .egwa-footer { background: #fff; border-color: #e4e7e5; color: #54656f; }
#egwa-root .egwa-footer>.egwa-icon { color: #128c7e; }
@media(max-width:480px) {
  .egwa-widget { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom,0px)); }
  .egwa-floating-btn { width: 52px; height: 52px; }
  .egwa-floating-btn>.egwa-icon { width: 30px; height: 30px; }
  .egwa-chat-window { width: min(370px,calc(100vw - 28px)); max-width: calc(100vw - 28px); bottom: 66px; max-height: calc(100vh - 96px); max-height: calc(100dvh - 96px - env(safe-area-inset-bottom,0px)); }
  .egwa-header { padding-top: 16px; padding-bottom: 16px; }
  .egwa-body { padding-top: 20px; }
}
@media(max-height:560px) {
  .egwa-chat-window { display: block; overflow-y: auto; overscroll-behavior: contain; }
  .egwa-header { position: sticky; top: 0; z-index: 1; }
  .egwa-body { overflow: visible; }
}
@media(prefers-reduced-motion:reduce) { .egwa-widget * { transition: none!important; animation: none!important; } }
