/* INSTAWHOLE | AI ASSISTANT. Namespaced; no changes to existing page CSS. */
#iwai-root { --iw-paper:#f9f7f3; --iw-ink:#171716; --iw-muted:#5c5954; --iw-border:#bcb7b0;
 --iw-white:#fffdf9; color:var(--iw-ink); font-family:inherit; font-size:15px;
 font-weight:400; line-height:1.5; isolation:isolate; position:relative; z-index:2147483000; }
#iwai-root *,#iwai-root *::before,#iwai-root *::after {box-sizing:border-box}
#iwai-root [hidden] {display:none!important}
#iwai-root button,#iwai-root textarea,#iwai-root a {font:inherit}
#iwai-root button {cursor:pointer}
#iwai-root button:disabled {cursor:not-allowed;opacity:.65}
#iwai-root :focus-visible{outline:3px solid #1b5e9b;outline-offset:3px}
#iwai-root .iwai-launch {position:fixed;z-index:2147483000;right:max(22px,env(safe-area-inset-right));
 bottom:max(22px,env(safe-area-inset-bottom));display:flex;align-items:center;gap:11px;
 background:var(--iw-ink);color:#fff;min-height:56px;border:1px solid var(--iw-ink);border-radius:100px;
 padding:12px 19px;box-shadow:0 8px 28px #1616162e;letter-spacing:.01em}
#iwai-root .iwai-launch:hover{background:#3e3c39}
#iwai-root .iwai-launch svg {height:22px;width:22px;flex:none}
#iwai-root .iwai-panel {position:fixed;z-index:2147483001;right:max(22px,env(safe-area-inset-right));
 bottom:calc(max(22px,env(safe-area-inset-bottom)) + 72px);width:min(392px,calc(100vw - 24px));
 height:min(618px,calc(100dvh - 110px));background:var(--iw-white);border:1px solid var(--iw-border);
 border-radius:20px;display:flex;flex-direction:column;overflow:hidden;
 box-shadow:0 22px 60px #1818182b}
#iwai-root .iwai-header{display:flex;align-items:center;gap:11px;border-bottom:1px solid var(--iw-border);
 background:var(--iw-paper);padding:17px 18px;flex:none}
#iwai-root .iwai-logo{width:42px;height:42px;border-radius:13px;border:1px solid #888279;
 display:grid;place-items:center;font-size:11px;font-weight:700;letter-spacing:-.05em}
#iwai-root .iwai-heading{flex:1;min-width:0}
#iwai-root .iwai-heading strong{font-size:14px;letter-spacing:.02em;display:block}
#iwai-root .iwai-heading small{font-size:12px;color:var(--iw-muted);display:block}
#iwai-root .iwai-close{width:38px;height:38px;display:grid;place-items:center;border:1px solid transparent;
 border-radius:50%;background:transparent;color:var(--iw-ink);font-size:24px}
#iwai-root .iwai-close:hover {border-color:var(--iw-border)}
#iwai-root .iwai-chat{flex:1;min-height:0;overflow-y:auto;padding:17px 16px;display:flex;
 flex-direction:column;gap:12px;scrollbar-color:#b5ada4 transparent;overscroll-behavior:contain}
#iwai-root .iwai-msg{white-space:pre-wrap;overflow-wrap:anywhere;padding:12px 14px;max-width:91%;
 border-radius:13px;font-size:14px;line-height:1.55}
#iwai-root .iwai-msg--bot{align-self:flex-start;background:#efede8;border:1px solid #ddd9d1;border-bottom-left-radius:3px}
#iwai-root .iwai-msg--user{align-self:flex-end;background:#252523;color:#fff;border-bottom-right-radius:3px}
#iwai-root .iwai-topics{display:grid;grid-template-columns:1fr 1fr;gap:7px}
#iwai-root .iwai-topic{background:transparent;color:var(--iw-ink);text-align:left;border:1px solid var(--iw-border);
 border-radius:10px;padding:10px 9px;font-size:12px;min-height:44px;transition:background .15s ease}
#iwai-root .iwai-topic:hover{background:#f0ede8}
#iwai-root .iwai-footer{padding:12px 15px 14px;border-top:1px solid var(--iw-border);background:var(--iw-white);flex:none}
#iwai-root .iwai-contact{display:flex;gap:14px;margin-bottom:9px;font-size:12px;flex-wrap:wrap}
#iwai-root a{color:#23476a;text-decoration:underline;text-underline-offset:2px}
#iwai-root .iwai-contact a{display:inline-block;padding:4px 0}
#iwai-root .iwai-form{display:flex;align-items:end;gap:8px}
#iwai-root .iwai-input{flex:1;min-width:0;resize:none;min-height:46px;max-height:100px;
 padding:11px 12px;border:1px solid #817e78;border-radius:11px;background:#fff;color:#171716;
 font-size:14px;line-height:1.4}
#iwai-root .iwai-send{min-height:46px;min-width:65px;padding:9px 11px;background:var(--iw-ink);
 color:white;border:1px solid var(--iw-ink);border-radius:11px;font-size:13px;font-weight:600}
#iwai-root .iwai-send:hover{background:#41403c}
#iwai-root .iwai-notice{font-size:11px;line-height:1.5;color:var(--iw-muted);margin:10px 1px 0}
#iwai-root .iwai-status{font-size:12px;color:#46413b;min-height:0;margin:0 0 4px}
#iwai-root .iwai-turnstile {display:flex;justify-content:center;min-height:0;margin:3px auto}
#iwai-root .iwai-lang{border:1px solid var(--iw-border);background:transparent;border-radius:7px;
 color:var(--iw-ink);padding:5px 7px;max-width:58px;font-size:12px}
@media (max-width:480px){#iwai-root .iwai-panel{right:8px;left:8px;width:auto;bottom:calc(env(safe-area-inset-bottom) + 82px);
 height:min(650px,calc(100dvh - 106px));border-radius:16px}#iwai-root .iwai-launch{right:12px;bottom:calc(env(safe-area-inset-bottom) + 12px)}}
@media (max-width:359px){#iwai-root .iwai-launch .iwai-launch-label{display:none}#iwai-root .iwai-topics{grid-template-columns:1fr}}
@media (prefers-reduced-motion:reduce){#iwai-root *,#iwai-root *::before,#iwai-root *::after{animation:none!important;transition:none!important}}
@media (forced-colors:active){#iwai-root .iwai-panel,#iwai-root .iwai-msg,#iwai-root .iwai-topic{border:1px solid CanvasText}}

/* Cookie consent stays on top; chat is not offered until the consent choice has been made. */
body:has(#cookie-notice:not([hidden])) #iwai-root {visibility:hidden;pointer-events:none}
@media(max-height:460px){#iwai-root .iwai-panel{bottom:6px;height:calc(100dvh - 12px);border-radius:10px}}
@media(max-width:480px){#iwai-root .iwai-panel{max-height:calc(100dvh - 100px)}}


/* Mobile viewport fix 2026-10-12: uses VisualViewport values from JS.
   Works at 100%-200% page zoom, when pinch-zoomed and with an iOS keyboard open.
   The page's desktop layout is deliberately untouched. */
#iwai-root.iwai-compact .iwai-panel{
 position:fixed;
 top:var(--iwai-vv-top,0px);
 left:var(--iwai-vv-left,0px);
 right:auto;
 bottom:auto;
 width:var(--iwai-vv-width,100vw);
 height:var(--iwai-vv-height,100dvh);
 min-width:0;
 max-width:none;
 max-height:none;
 border-radius:0;
 overflow:hidden;
 padding-bottom:env(safe-area-inset-bottom,0px);
}
#iwai-root.iwai-compact .iwai-header{min-width:0;gap:8px;padding:11px 12px}
#iwai-root.iwai-compact .iwai-heading{min-width:0;overflow:hidden}
#iwai-root.iwai-compact .iwai-heading strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#iwai-root.iwai-compact .iwai-chat{flex:1 1 auto;min-height:50px;padding:12px 11px;overflow-x:hidden}
#iwai-root.iwai-compact .iwai-msg{max-width:100%;min-width:0;overflow-wrap:anywhere}
#iwai-root.iwai-compact .iwai-footer{flex:0 1 auto;max-height:62%;min-width:0;overflow-y:auto;overscroll-behavior:contain;padding:10px 11px 12px}
#iwai-root.iwai-compact .iwai-topics{min-width:0}
#iwai-root.iwai-compact .iwai-form{min-width:0;align-items:stretch}
#iwai-root.iwai-compact .iwai-input{font-size:16px;min-width:0;width:0;flex:1 1 0;max-height:90px}
#iwai-root.iwai-compact .iwai-send{min-width:61px;flex:0 0 auto;padding:8px}
#iwai-root.iwai-compact .iwai-contact{gap:8px}
#iwai-root.iwai-compact .iwai-notice{overflow-wrap:anywhere}
#iwai-root.iwai-compact .iwai-launch{
 position:fixed;
 right:auto;
 bottom:auto;
 left:var(--iwai-launch-left,10px);
 top:var(--iwai-launch-top,10px);
 max-width:calc(var(--iwai-vv-width,100vw) - 18px);
 min-width:0;
 overflow:hidden;
}
#iwai-root.iwai-narrow .iwai-topics{grid-template-columns:minmax(0,1fr)}
#iwai-root.iwai-narrow .iwai-launch-label{display:none}
#iwai-root.iwai-narrow .iwai-logo,#iwai-root.iwai-narrow .iwai-heading small{display:none}
#iwai-root.iwai-narrow .iwai-lang{max-width:53px;padding:5px}
#iwai-root.iwai-narrow .iwai-close{width:35px;height:35px;flex:none}
#iwai-root.iwai-narrow .iwai-footer{max-height:66%}

/* At 200% zoom, reserve enough visible space for the composer and contact links. */
#iwai-root.iwai-zoomed .iwai-footer{height:56%;max-height:56%;flex:0 0 auto}
