/* the WhatsApp button and the chat window above it */
/* the window measures its boxes with their padding, whatever the page around it does, so nothing spills sideways */
.wa-panel,.wa-panel *,.wa-teaser,.wa-teaser *,.wa-float{box-sizing:border-box}
.wa-float{position:fixed;bottom:calc(20px + env(safe-area-inset-bottom));inset-inline-end:20px;z-index:60;display:grid;place-items:center;width:58px;height:58px;border:0;border-radius:50%;background:#25D366;color:#fff;cursor:pointer;box-shadow:0 10px 30px -8px rgba(18,140,74,.55);transition:transform .2s ease,box-shadow .2s ease}
.wa-float:hover{transform:translateY(-2px) scale(1.04);box-shadow:0 14px 34px -8px rgba(18,140,74,.65)}
.wa-float:focus-visible{outline:3px solid #9BE7B5;outline-offset:3px}
.wa-float svg{width:32px;height:32px}
.wa-float .wa-x{display:none;width:26px;height:26px}
.wa-float[aria-expanded="true"] .wa-logo{display:none}
.wa-float[aria-expanded="true"] .wa-x{display:block}
.wa-dot{position:absolute;top:2px;inset-inline-end:2px;width:14px;height:14px;border:2px solid #fff;border-radius:50%;background:#E5484D}

.wa-teaser{position:fixed;bottom:calc(92px + env(safe-area-inset-bottom));inset-inline-end:20px;z-index:60;display:flex;align-items:center;gap:10px;max-width:min(300px,calc(100vw - 40px));padding:12px 14px;border-radius:16px 16px 4px 16px;background:#fff;color:#15234A;font-size:14px;font-weight:600;line-height:1.5;box-shadow:0 14px 40px -12px rgba(21,35,74,.35);cursor:pointer;animation:wa-in .35s ease both}
[dir="rtl"] .wa-teaser{border-radius:16px 16px 16px 4px}
.wa-teaser img{width:30px;height:30px;border-radius:50%;object-fit:cover;flex:none}
.wa-teaser button{flex:none;display:grid;place-items:center;width:24px;height:24px;margin-inline-start:2px;border:0;border-radius:50%;background:#F1F3F8;color:#5B6478;cursor:pointer}
.wa-teaser button svg{width:12px;height:12px}

.wa-panel{position:fixed;bottom:calc(92px + env(safe-area-inset-bottom));inset-inline-end:20px;z-index:61;display:flex;flex-direction:column;width:360px;max-height:min(600px,calc(100vh - 120px));overflow:hidden;border-radius:20px;background:#fff;color:#15234A;box-shadow:0 24px 60px -16px rgba(21,35,74,.45);animation:wa-in .25s ease both}
.wa-panel[hidden],.wa-teaser[hidden]{display:none}
.wa-head{display:flex;align-items:center;gap:12px;padding:16px 16px 18px;background:linear-gradient(135deg,#15234A,#1F3368);color:#fff}
.wa-head img{width:46px;height:46px;border-radius:50%;object-fit:cover;flex:none;background:#fff;border:2px solid rgba(255,255,255,.25)}
.wa-head-t{min-width:0;flex:1}
.wa-name{font-size:16px;font-weight:700;line-height:1.3}
.wa-status{display:flex;align-items:center;gap:6px;margin-top:3px;font-size:12px;opacity:.85}
.wa-status i{width:8px;height:8px;border-radius:50%;background:#9AA3B5;flex:none}
.wa-status.is-on i{background:#3DDC84;box-shadow:0 0 0 3px rgba(61,220,132,.25)}
.wa-close{display:grid;place-items:center;width:34px;height:34px;border:0;border-radius:50%;background:rgba(255,255,255,.12);color:#fff;cursor:pointer;flex:none}
.wa-close:hover{background:rgba(255,255,255,.22)}
.wa-close svg{width:16px;height:16px}

.wa-body{flex:1;overflow-y:auto;overflow-x:hidden;padding:18px 16px 8px;background:#EFEAE2 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Ccircle cx='2' cy='2' r='1.2' fill='%23d9d1c5'/%3E%3C/svg%3E")}
.wa-bubble{position:relative;max-width:88%;padding:10px 12px 8px;border-radius:4px 14px 14px 14px;background:#fff;color:#111B21;font-size:14px;line-height:1.65;white-space:pre-line;box-shadow:0 1px 1px rgba(0,0,0,.08);animation:wa-in .3s ease both}
[dir="rtl"] .wa-bubble{border-radius:14px 4px 14px 14px}
.wa-bubble small{display:block;margin-top:2px;color:#667781;font-size:11px;text-align:end}
.wa-topics{display:flex;flex-direction:column;gap:8px;margin-top:14px}
.wa-topic{display:flex;align-items:center;gap:10px;width:100%;padding:11px 14px;border:1px solid #D7DCE6;border-radius:12px;background:#fff;color:#15234A;font:inherit;font-size:14px;font-weight:600;text-align:start;text-decoration:none;cursor:pointer;transition:border-color .15s,background .15s,transform .15s}
.wa-topic:hover{border-color:#18753C;background:#F3FAF5;transform:translateX(0)}
.wa-topic:focus-visible{outline:2px solid #18753C;outline-offset:2px}
.wa-topic span{flex:1}
.wa-topic svg{width:16px;height:16px;flex:none;color:#18753C}
[dir="rtl"] .wa-topic .wa-chev{transform:scaleX(-1)}
.wa-topic--book{border-style:dashed}

.wa-foot{padding:12px 16px calc(14px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid #EEF0F4}
.wa-start{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;height:48px;border-radius:12px;background:#25D366;color:#fff;font-size:15px;font-weight:700;text-decoration:none;transition:background .15s}
.wa-start:hover{background:#1EBE5A}
.wa-start svg{width:22px;height:22px}
.wa-note{margin-top:8px;color:#8A93A6;font-size:11px;text-align:center}

/* the website chat: messages, choices, the box to write in */
.wa-float.is-live{background:#18753C;box-shadow:0 10px 30px -8px rgba(24,117,60,.6)}
.wa-float.is-live:hover{box-shadow:0 14px 34px -8px rgba(24,117,60,.7)}
.wa-float.is-live .wa-logo{width:28px;height:28px}
.wa-body{display:flex;flex-direction:column;gap:8px}
.wa-welcome{align-self:flex-start}
.wa-msg{display:flex;flex-direction:column;align-items:flex-start;gap:6px}
.wa-msg.is-mine{align-items:flex-end}
.wa-msg.is-mine .wa-bubble{background:#D9FDD3;border-radius:14px 4px 14px 14px}
[dir="rtl"] .wa-msg.is-mine .wa-bubble{border-radius:4px 14px 14px 14px}
.wa-msg.is-pending .wa-bubble{opacity:.65}
.wa-who{display:block;margin-bottom:2px;color:#18753C;font-size:12px;font-weight:700}
.wa-text{display:block;white-space:pre-line;overflow-wrap:anywhere}
.wa-text a{color:#027EB5;text-decoration:underline}
.wa-img{display:block;max-width:220px;max-height:220px;margin-bottom:4px;border-radius:10px;object-fit:cover}
.wa-file{display:flex;align-items:center;gap:8px;margin-bottom:4px;padding:8px 10px;border-radius:10px;background:#F1F3F8;color:#15234A;font-size:13px;font-weight:600;text-decoration:none}
.wa-file svg{width:18px;height:18px;flex:none}
.wa-choices{display:flex;flex-wrap:wrap;gap:6px;max-width:92%}
.wa-choices button{padding:7px 12px;border:1px solid #18753C;border-radius:999px;background:#fff;color:#18753C;font:inherit;font-size:13px;font-weight:600;cursor:pointer;transition:background .15s,color .15s}
.wa-choices button:hover{background:#18753C;color:#fff}
.wa-intro{display:flex;flex-direction:column;gap:8px;margin-top:4px;padding:14px;border-radius:14px;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.08);animation:wa-in .25s ease both}
.wa-intro b{font-size:14px}
.wa-intro p{margin:0;color:#5B6478;font-size:12.5px;line-height:1.6}
.wa-intro input{width:100%;height:42px;padding:0 12px;border:1px solid #D7DCE6;border-radius:10px;font:inherit;font-size:14px;color:#15234A;background:#fff}
.wa-intro input:focus{outline:none;border-color:#18753C;box-shadow:0 0 0 3px rgba(24,117,60,.15)}
.wa-intro .wa-start{height:44px;border:0;font:inherit;font-weight:700;cursor:pointer;background:#18753C}
.wa-intro .wa-start:hover{background:#125E30}
/* the trap field for bots stays in place but takes no room, so it opens no sideways scroll */
.wa-phone{display:flex;gap:6px}
.wa-phone input{flex:1;min-width:0}
.wa-cc{display:flex;align-items:center;gap:6px;flex:none;height:42px;padding:0 10px;border:1px solid #D7DCE6;border-radius:10px;background:#F7F8FB;color:#15234A;font:inherit;font-size:14px;font-weight:600;cursor:pointer}
.wa-cc:hover,.wa-cc[aria-expanded="true"]{border-color:#18753C;background:#fff}
.wa-cc img,.wa-cc-list img{width:20px;height:20px;border-radius:50%;object-fit:cover;flex:none;box-shadow:0 0 0 1px rgba(0,0,0,.08)}
.wa-cc-chev{width:14px;height:14px;transform:rotate(90deg);color:#8A93A6}
.wa-cc-list{border:1px solid #D7DCE6;border-radius:12px;background:#fff;overflow:hidden;box-shadow:0 10px 24px -14px rgba(21,35,74,.4)}
.wa-cc-list input{width:100%;height:40px;padding:0 12px;border:0;border-bottom:1px solid #EEF0F4;font:inherit;font-size:14px;color:#15234A;background:#F7F8FB}
.wa-cc-list input:focus{outline:none;background:#fff}
.wa-cc-list ul{max-height:190px;margin:0;padding:4px;overflow-y:auto;list-style:none}
.wa-cc-list button{display:flex;align-items:center;gap:10px;width:100%;padding:8px 10px;border:0;border-radius:8px;background:none;color:#15234A;font:inherit;font-size:13.5px;text-align:start;cursor:pointer}
.wa-cc-list button:hover,.wa-cc-list [aria-selected="true"] button{background:#F3FAF5}
.wa-cc-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.wa-cc-dial{color:#5B6478;font-size:12.5px;font-variant-numeric:tabular-nums}
.wa-cc-none{padding:12px;color:#8A93A6;font-size:13px;text-align:center}
.wa-hp{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;border:0!important;overflow:hidden;clip-path:inset(50%);opacity:0;pointer-events:none}
.wa-err{color:#C2412D;font-size:12px}
.wa-compose{display:flex;align-items:flex-end;gap:8px}
.wa-compose textarea{flex:1;min-height:44px;max-height:120px;padding:11px 14px;border:1px solid #D7DCE6;border-radius:22px;font:inherit;font-size:14px;line-height:1.5;color:#15234A;resize:none;background:#F7F8FB}
.wa-compose textarea:focus{outline:none;border-color:#18753C;background:#fff}
.wa-compose textarea:disabled{opacity:.6}
.wa-send{display:grid;place-items:center;width:44px;height:44px;flex:none;border:0;border-radius:50%;background:#18753C;color:#fff;cursor:pointer}
.wa-send:disabled{opacity:.5;cursor:default}
.wa-send svg{width:19px;height:19px}
[dir="rtl"] .wa-send-ico{transform:scaleX(-1)}
.wa-alt{display:flex;align-items:center;justify-content:center;gap:6px;margin-top:10px;color:#128C4A;font-size:13px;font-weight:600;text-decoration:none}
.wa-alt svg{width:16px;height:16px}
.wa-alt:hover{text-decoration:underline}
.wa-alert{margin:8px 0 0;color:#C2412D;font-size:12.5px;text-align:center}

@keyframes wa-in{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}

@media (max-width:640px){
  .wa-float{width:54px;height:54px;bottom:calc(16px + env(safe-area-inset-bottom));inset-inline-end:16px}
  .wa-float svg{width:30px;height:30px}
  .wa-teaser{bottom:calc(82px + env(safe-area-inset-bottom));inset-inline-end:16px}
  .wa-panel{inset:auto 0 0 0;width:100%;max-height:min(85vh,640px);border-radius:20px 20px 0 0}
  .wa-panel ~ .wa-float[aria-expanded="true"]{display:none}
  /* 16px keeps iPhones from zooming in when the visitor taps to write */
  .wa-compose textarea,.wa-intro input,.wa-cc-list input{font-size:16px}
}
@media (prefers-reduced-motion:reduce){.wa-float,.wa-panel,.wa-teaser,.wa-bubble,.wa-topic{animation:none;transition:none}}
