/* White Fortress Academy - site assistant (all classes prefixed wfb-)
   Sits directly above the green WhatsApp button (bottom-right). Theme: navy #003366 + red #d32f2f. */
.wfb-fab,.wfb-panel,.wfb-nudge{--wfb-navy:#003366;--wfb-navy-d:#00244d;--wfb-red:#d32f2f;--wfb-red-d:#b71c1c;--wfb-text:#1a1a2e;--wfb-muted:#5a6a7a;--wfb-line:#e6ebf1;--wfb-soft:#f1f5fa;font-family:'DM Sans',system-ui,sans-serif;font-size:16px;line-height:1.5;box-sizing:border-box}
.wfb-panel *,.wfb-fab *{box-sizing:border-box}

/* floating button: WhatsApp is 58px at bottom 28px, so this sits 14px above it */
.wfb-fab{position:fixed;right:28px;bottom:100px;z-index:9998;width:58px;height:58px;border-radius:50%;border:0;padding:0;cursor:pointer;color:#fff;background:linear-gradient(135deg,var(--wfb-navy),#0a4c93);box-shadow:0 6px 20px rgba(0,51,102,.4);display:grid;place-items:center;transition:transform .2s,box-shadow .2s}
.wfb-fab:hover{transform:scale(1.1);box-shadow:0 8px 28px rgba(0,51,102,.55)}
.wfb-fab:focus-visible,.wfb-panel :focus-visible{outline:3px solid #4d9bff;outline-offset:2px}
.wfb-fab svg{width:30px;height:30px;fill:none;stroke:#fff;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.wfb-fab svg.wfb-mascot{width:52px;height:52px;stroke:none;overflow:visible;transform-origin:50% 90%}
.wfb-fab:hover svg.wfb-mascot{animation:wfb-wiggle .6s ease}
.wfb-fab .wfb-x{display:none}
.wfb-fab[aria-expanded="true"] .wfb-ic{display:none}
.wfb-fab[aria-expanded="true"] .wfb-x{display:block}
.wfb-dot{position:absolute;top:2px;right:2px;width:14px;height:14px;border-radius:50%;background:var(--wfb-red);border:2px solid #fff}
.wfb-fab[aria-expanded="true"] .wfb-dot{display:none}

/* small nudge bubble, shown once per visit */
.wfb-nudge{position:fixed;right:96px;bottom:108px;z-index:9998;max-width:220px;background:#fff;color:var(--wfb-text);border:1px solid var(--wfb-line);border-radius:14px 14px 4px 14px;padding:10px 30px 10px 14px;font-size:.88rem;box-shadow:0 10px 28px rgba(0,36,77,.18);cursor:pointer;animation:wfb-in .35s ease both}
.wfb-nudge button{position:absolute;top:4px;right:4px;width:24px;height:24px;border:0;background:none;color:var(--wfb-muted);font-size:1.1rem;line-height:1;cursor:pointer;border-radius:50%}
.wfb-nudge[hidden]{display:none}

/* panel */
.wfb-panel{position:fixed;right:28px;bottom:170px;z-index:9998;width:370px;max-width:calc(100vw - 24px);height:min(540px,calc(100vh - 200px));display:flex;flex-direction:column;background:#fff;border:1px solid var(--wfb-line);border-radius:18px;box-shadow:0 22px 60px rgba(0,36,77,.28);overflow:hidden;opacity:0;visibility:hidden;transform:translateY(10px) scale(.98);transform-origin:bottom right;transition:opacity .2s,transform .2s,visibility .2s}
.wfb-panel.is-open{opacity:1;visibility:visible;transform:none}
.wfb-head{display:flex;align-items:center;gap:12px;padding:14px 16px;background:linear-gradient(120deg,var(--wfb-navy-d),var(--wfb-navy) 60%,#8e1b1b);color:#fff;flex:none}
.wfb-av{width:40px;height:40px;border-radius:50%;background:rgba(255,255,255,.14);display:grid;place-items:center;flex:none}
.wfb-av{width:44px;height:44px}
.wfb-av svg{width:42px;height:42px}
.wfb-head b{display:block;font:700 1rem/1.2 'Poppins',sans-serif}
.wfb-head small{display:flex;align-items:center;gap:6px;font-size:.78rem;color:#cfe0f3}
.wfb-head small i{width:8px;height:8px;border-radius:50%;background:#2ee59d}
.wfb-close{margin-left:auto;width:34px;height:34px;border:0;border-radius:10px;background:rgba(255,255,255,.12);color:#fff;cursor:pointer;display:grid;place-items:center;flex:none}
.wfb-close:hover{background:rgba(255,255,255,.24)}
.wfb-close svg{width:16px;height:16px;fill:none;stroke:#fff;stroke-width:2.2;stroke-linecap:round}

.wfb-log{flex:1;overflow-y:auto;padding:16px;background:var(--wfb-soft);display:flex;flex-direction:column;gap:10px;scroll-behavior:smooth;overscroll-behavior:contain}
.wfb-msg{max-width:88%;padding:10px 14px;border-radius:14px;font-size:.93rem;line-height:1.5;word-wrap:break-word;animation:wfb-in .25s ease both}
.wfb-msg p{margin:0}.wfb-msg p+p{margin-top:6px}
.wfb-msg ul{margin:6px 0 0;padding-left:18px}
.wfb-msg a{color:var(--wfb-red);font-weight:600}
.wfb-bot{align-self:flex-start;background:#fff;color:var(--wfb-text);border:1px solid var(--wfb-line);border-bottom-left-radius:4px}
.wfb-user{align-self:flex-end;background:var(--wfb-navy);color:#fff;border-bottom-right-radius:4px}
.wfb-typing{align-self:flex-start;display:flex;gap:4px;padding:12px 14px;background:#fff;border:1px solid var(--wfb-line);border-radius:14px;border-bottom-left-radius:4px}
.wfb-typing i{width:7px;height:7px;border-radius:50%;background:#9db0c4;animation:wfb-bounce 1s infinite}
.wfb-typing i:nth-child(2){animation-delay:.15s}.wfb-typing i:nth-child(3){animation-delay:.3s}

.wfb-links{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.wfb-link{display:inline-flex;align-items:center;gap:6px;padding:7px 12px;border-radius:99px;font-size:.84rem;font-weight:600;text-decoration:none;border:1.5px solid var(--wfb-navy);color:var(--wfb-navy)!important;background:#fff}
.wfb-link:hover{background:var(--wfb-navy);color:#fff!important}
.wfb-link.wfb-wa{background:#25d366;border-color:#25d366;color:#06361a!important}
.wfb-link.wfb-wa:hover{background:#3be07b;border-color:#3be07b;color:#06361a!important}

.wfb-chips{display:flex;flex-wrap:nowrap;gap:8px;padding:10px 16px 10px;background:var(--wfb-soft);flex:none;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.wfb-chips::-webkit-scrollbar{display:none}
.wfb-chips:empty{display:none}
.wfb-chip{flex:none;white-space:nowrap;border:1.5px solid var(--wfb-line);background:#fff;color:var(--wfb-navy);font:600 .83rem 'DM Sans',sans-serif;padding:7px 13px;border-radius:99px;cursor:pointer;transition:background .15s,border-color .15s,color .15s}
.wfb-chip:hover{background:var(--wfb-navy);border-color:var(--wfb-navy);color:#fff}

.wfb-form{display:flex;gap:8px;padding:12px 14px;border-top:1px solid var(--wfb-line);background:#fff;flex:none}
.wfb-form input{flex:1;min-width:0;border:1.5px solid var(--wfb-line);border-radius:12px;padding:10px 14px;font:inherit;font-size:.93rem;color:var(--wfb-text);background:#fff}
.wfb-form input:focus{outline:none;border-color:var(--wfb-navy);box-shadow:0 0 0 3px rgba(0,51,102,.12)}
.wfb-form button{width:44px;border:0;border-radius:12px;background:var(--wfb-red);color:#fff;cursor:pointer;display:grid;place-items:center;flex:none;transition:background .2s}
.wfb-form button:hover{background:var(--wfb-red-d)}
.wfb-form button svg{width:19px;height:19px;fill:none;stroke:#fff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.wfb-foot{padding:0 14px 10px;background:#fff;font-size:.72rem;color:var(--wfb-muted);text-align:center;flex:none}

@keyframes wfb-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes wfb-bounce{0%,60%,100%{transform:none}30%{transform:translateY(-4px)}}

/* mobile: WhatsApp button becomes 52px at bottom 20px, so button goes to 84px; panel fills the screen width */
@media (max-width:480px){
  .wfb-fab{right:20px;bottom:84px;width:52px;height:52px}
  .wfb-fab svg{width:26px;height:26px}
  .wfb-fab svg.wfb-mascot{width:46px;height:46px}
  .wfb-nudge{right:84px;bottom:90px}
}
@media (max-width:640px){
  .wfb-panel{right:8px;left:8px;bottom:146px;width:auto;max-width:none;height:min(520px,calc(100vh - 170px))}
}
body.wf-drawer-open .wfb-fab,body.wf-drawer-open .wfb-panel,body.wf-drawer-open .wfb-nudge{display:none!important}
@media (prefers-reduced-motion:reduce){.wfb-panel,.wfb-fab,.wfb-msg,.wfb-nudge{transition:none!important;animation:none!important}.wfb-typing i{animation:none}.wfb-log{scroll-behavior:auto}}

/* ---- mascot + cute touches ---- */
.wfb-mascot .wfb-eyes{transform-box:fill-box;transform-origin:50% 50%;animation:wfb-blink 5s infinite}
.wfb-brow{display:flex;align-items:flex-end;gap:8px;align-self:flex-start;max-width:94%}
.wfb-brow>.wfb-msg,.wfb-brow>.wfb-typing{max-width:none;margin:0}
.wfb-mini{width:32px;height:32px;border-radius:50%;background:linear-gradient(135deg,var(--wfb-navy),#0a4c93);display:grid;place-items:center;flex:none;box-shadow:0 2px 6px rgba(0,51,102,.25)}
.wfb-mini svg{width:28px;height:28px;overflow:visible}
.wfb-msg{border-radius:16px}
.wfb-bot{border-bottom-left-radius:5px;box-shadow:0 1px 2px rgba(0,36,77,.06)}
.wfb-user{border-bottom-right-radius:5px;background:linear-gradient(135deg,var(--wfb-navy),#0a4c93)}
.wfb-chip{box-shadow:0 1px 2px rgba(0,36,77,.06)}
.wfb-chip:hover{transform:translateY(-1px)}
.wfb-nudge{border-radius:16px 16px 4px 16px}
@keyframes wfb-blink{0%,93%,100%{transform:scaleY(1)}96%{transform:scaleY(.1)}}
@keyframes wfb-wiggle{0%,100%{transform:rotate(0)}25%{transform:rotate(-9deg)}60%{transform:rotate(7deg)}}
@media (prefers-reduced-motion:reduce){.wfb-mascot .wfb-eyes,.wfb-fab:hover svg.wfb-mascot{animation:none!important}}
