/* ברנדה – chat window */
#assistant-launch{position:fixed;inset-inline-start:18px;bottom:calc(88px + env(safe-area-inset-bottom));z-index:70;display:flex;align-items:center;gap:8px;border:0;border-radius:999px;background:linear-gradient(135deg,#0f2f3a,#0e6a7c);color:#fff;padding:12px 18px;font:700 15px var(--f-body,sans-serif);box-shadow:0 8px 28px #082d4045;cursor:pointer;transition:transform .15s}
#assistant-launch:hover{transform:translateY(-2px)}
#brandora-assistant{position:fixed;inset:auto 20px 20px auto;margin:0;z-index:90;box-sizing:border-box;width:min(440px,calc(100vw - 24px));height:min(680px,calc(100dvh - 40px));max-height:none;padding:0;border:0;border-radius:22px;background:var(--panel,#fff);color:var(--ink,#12232b);font-family:var(--f-body,sans-serif);box-shadow:0 24px 80px #00162650;overflow:hidden}
#brandora-assistant[open]{display:flex;flex-direction:column}
#brandora-assistant::backdrop{background:#07212d66;backdrop-filter:blur(2px)}
#brandora-assistant header{flex:none;display:flex;align-items:center;gap:12px;background:linear-gradient(135deg,#0f2f3a,#0e6a7c);color:#fff;padding:14px 16px}
.ab-ttl{flex:1;min-width:0}.ab-ttl strong{font-size:18px;display:block}.ab-ttl small{display:block;color:#cdeef5;font-size:12.5px;margin-top:2px}
.ab-avatar{flex:none;width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:#fff;color:#0e6a7c;font-weight:800;font-size:18px;box-shadow:0 0 0 3px #ffffff40}
.ab-avatar.sm{width:30px;height:30px;font-size:14px;background:linear-gradient(135deg,#0f2f3a,#0e6a7c);color:#fff;box-shadow:none;align-self:flex-end}
#brandora-assistant button{font:inherit;cursor:pointer;color:inherit}
#brandora-assistant #assistant-close{border:0;background:#ffffff1f;color:#fff;font-size:22px;width:36px;height:36px;border-radius:50%;line-height:1;padding:0}
#brandora-assistant #assistant-close:hover{background:#ffffff38}
#assistant-log{flex:1;overflow-y:auto;position:relative;padding:16px;display:flex;flex-direction:column;gap:12px;background:var(--bg,#f6f8f9);font-size:15px;line-height:1.6}
.ab-row{display:flex;gap:8px;align-items:flex-end;max-width:100%}
.ab-row.user{justify-content:flex-start;flex-direction:row-reverse}
.assistant-message{margin:0;padding:11px 14px;border-radius:18px;white-space:pre-wrap;overflow-wrap:anywhere;max-width:85%;box-shadow:0 1px 2px #00000012}
.assistant-message.assistant{background:var(--panel,#fff);border:1px solid var(--line,#e1e7eb);border-end-start-radius:6px}
.assistant-message.user{background:#0e6a7c;color:#fff;border-end-end-radius:6px}
.ab-typing{display:flex;align-items:center;gap:8px;color:var(--muted,#5d6b75)}
.ab-dots{display:inline-flex;gap:4px}.ab-dots i{width:7px;height:7px;border-radius:50%;background:#0e6a7c;animation:abdot 1.2s infinite ease-in-out}
.ab-dots i:nth-child(2){animation-delay:.15s}.ab-dots i:nth-child(3){animation-delay:.3s}
@keyframes abdot{0%,80%,100%{opacity:.25;transform:translateY(0)}40%{opacity:1;transform:translateY(-4px)}}
@media (prefers-reduced-motion:reduce){.ab-dots i{animation:none;opacity:.7}}
.ab-suggest{display:flex;flex-wrap:wrap;gap:8px;padding-inline-start:38px}
.ab-suggest button{border:1px solid #0e6a7c55;background:var(--panel,#fff);color:#0e6a7c;border-radius:999px;padding:7px 13px;font-size:14px}
.ab-suggest button:hover:not(:disabled){background:#0e6a7c12}
.ab-cards{display:grid;gap:8px;padding-inline-start:38px}
.assistant-card{display:grid;gap:4px;background:var(--panel,#fff);border:1px solid var(--line,#e1e7eb);border-radius:14px;padding:10px 12px}
.assistant-card>button{border:0;background:none;padding:0;text-align:start;font-weight:700;color:#0e6a7c;font-size:15px}
.assistant-card>button:hover{text-decoration:underline}
.assistant-meta{display:block;color:var(--muted,#5d6b75);font-size:12.5px}
.ab-tag{justify-self:start;font-size:11.5px;font-weight:700;border-radius:999px;padding:2px 9px;background:#f4b40022;color:#7a5a00}
.ab-tag.ok{background:#178a431a;color:#146c37}
.ab-cards>button{justify-self:start;border:0;border-radius:12px;background:#d6336c;color:#fff;padding:10px 16px;font-weight:700}
#assistant-form{flex:none;padding:10px 12px 6px;border-top:1px solid var(--line,#e1e7eb);background:var(--panel,#fff)}
.ab-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.ab-inputrow{display:flex;align-items:flex-end;gap:8px;border:1.5px solid var(--line,#dce4e7);border-radius:22px;padding:6px 6px 6px 8px;background:var(--panel,#fff)}
.ab-inputrow:focus-within{border-color:#0e6a7c;box-shadow:0 0 0 3px #0e6a7c22}
#assistant-input{flex:1;border:0;outline:0;resize:none;background:transparent;color:inherit;font:inherit;font-size:15px;line-height:1.5;padding:7px 8px;max-height:140px;min-height:24px}
#assistant-send,#assistant-mic{flex:none;width:40px;height:40px;border-radius:50%;border:0;display:grid;place-items:center;padding:0}
#assistant-send{background:#0e6a7c;color:#fff}
#assistant-send svg{transform:scaleX(-1)}
#assistant-send:disabled{background:#c9d5d9;cursor:default}
#assistant-mic{background:var(--soft,#eef5f7)}
.ab-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 6px 0}
#assistant-status{margin:0;font-size:12px;color:var(--muted,#65767b)}
#assistant-status.err{color:#b4233c;font-weight:700}
#assistant-mute{border:1px solid var(--line,#dce4e7);background:transparent;border-radius:999px;padding:3px 10px;font-size:12px}
.assistant-note{flex:none;display:block;padding:4px 16px 12px;color:var(--muted,#65767b);font-size:11px;line-height:1.5;background:var(--panel,#fff)}
#assistant-admin{flex:none;padding:8px 16px;border-top:1px solid var(--line,#ddd);font-size:12px}
#assistant-admin button{border:1px solid var(--line,#ddd);border-radius:10px;padding:4px 10px;margin-inline-start:8px;background:transparent}
@media (max-width:560px){
#assistant-launch{inset-inline-start:12px;padding:10px 14px;font-size:14px}
#brandora-assistant{width:100vw;height:100dvh;max-width:100vw;border-radius:0;margin:0}
.ab-suggest,.ab-cards{padding-inline-start:0}
.assistant-message{max-width:92%}
}
body:has(#brandora-assistant[open]) #assistant-launch{display:none}
@media (max-width:560px){#brandora-assistant{inset:0;width:100vw;height:100dvh}}

.ab-claim{background:none;border:0;padding:4px 0 0;color:#0e6a7c;font:inherit;font-size:12px;font-weight:600;text-decoration:underline;cursor:pointer;align-self:flex-start}
.ab-claim:hover{color:#0f2f3a}

/* Brenda: human handoff after repeated searches with no result */
.ab-handoff{margin:8px 0 4px;padding:10px 12px;border-radius:12px;background:#f1faf3;border:1px solid #bfe3c8}
.ab-handoff p{margin:0 0 8px}
.ab-wa{display:inline-block;background:#0f7a40;color:#fff;font-weight:700;border-radius:999px;padding:6px 14px;text-decoration:none}

/* Brenda in CMYK: cyan → magenta → yellow frame and header, with a key (black) line */
#brandora-assistant{border:3px solid transparent;background:linear-gradient(var(--panel,#fff),var(--panel,#fff)) padding-box,linear-gradient(135deg,#00aeef 0%,#ec008c 42%,#ffe600 78%,#231f20 100%) border-box}
#brandora-assistant header{background:linear-gradient(to left,#00aeef 0%,#ec008c 58%,#f9c900 100%);box-shadow:inset 0 -4px 0 #231f20;padding-bottom:18px}
#brandora-assistant header .ab-ttl strong,#brandora-assistant header .ab-ttl small{color:#fff;text-shadow:0 1px 8px rgba(35,31,32,.35)}
#brandora-assistant header .ab-avatar{background:#fff;color:#ec008c;box-shadow:0 0 0 3px rgba(255,255,255,.45)}
#brandora-assistant #assistant-close{background:#231f20;color:#fff}
.ab-avatar.sm{background:linear-gradient(135deg,#00aeef,#ec008c 60%,#f9c900);color:#fff}
#assistant-launch{background:linear-gradient(135deg,#00aeef 0%,#ec008c 60%,#f9a800 100%);color:#fff;box-shadow:0 10px 30px rgba(236,0,140,.35)}
/* Accessibility (IS 5568 / WCAG AA): keep the CMYK look, but darken behind white text to reach 4.5:1 */
#brandora-assistant header{background:linear-gradient(rgba(0,0,0,.5),rgba(0,0,0,.5)),linear-gradient(to left,#00aeef 0%,#ec008c 58%,#f9c900 100%)}
#assistant-launch{background:linear-gradient(rgba(0,0,0,.5),rgba(0,0,0,.5)),linear-gradient(135deg,#00aeef 0%,#ec008c 60%,#f9a800 100%)}
.ab-avatar.sm{background:linear-gradient(rgba(0,0,0,.45),rgba(0,0,0,.45)),linear-gradient(135deg,#00aeef,#ec008c 60%,#f9c900)}
.ab-inputrow:focus-within{box-shadow:0 0 0 2px #0e6a7c}
#assistant-launch:focus-visible,#brandora-assistant button:focus-visible{outline:3px solid #0e6a7c;outline-offset:2px}
@media (prefers-reduced-motion: reduce){.ab-dots i{animation:none}}
