/* OMSAZE Assistant — widget + Home band styles.
   Executive Navy and Gold, Manrope / IBM Plex Sans Arabic, matching
   assets/css/site.css tokens. Removal: delete the assistant <link> tag. */

/* ---------- Home band ---------- */
.assistant-band{background:linear-gradient(120deg,#0b1f3a 0%,#10294d 55%,#0b1f3a 100%);color:#fff;padding-block:clamp(1.4rem,3vw,2rem)}
.assistant-band-inner{display:flex;flex-wrap:wrap;align-items:center;gap:1rem 2rem}
.assistant-band-inner>div:first-child{flex:1 1 22rem;min-width:min(100%,22rem)}
.assistant-band h2{color:#fff;font-size:clamp(1.25rem,2.4vw,1.6rem);margin:0 0 .35rem}
.assistant-band p{margin:0;color:#c9d8ea;font-size:1rem;line-height:1.55;max-width:44rem}
.assistant-band-actions{display:flex;flex-direction:column;align-items:flex-start;gap:.5rem}
.assistant-band-btn{background:#c9a55c;color:#0b1f3a;border:1.5px solid #c9a55c;border-radius:999px;padding:.65rem 1.4rem;font:700 1rem Manrope,"IBM Plex Sans Arabic",sans-serif;cursor:pointer}
.assistant-band-btn:hover,.assistant-band-btn:focus-visible{background:#d8bc7d;border-color:#d8bc7d}
.assistant-band-actions a{color:#e8d9b0;font-size:.95rem}
.assistant-band-actions a:hover,.assistant-band-actions a:focus-visible{color:#fff}
.assistant-band-chips{list-style:none;display:flex;flex-wrap:wrap;gap:.5rem;margin:0;padding:0;flex-basis:100%}
.assistant-band-chips button{background:rgba(255,255,255,.08);color:#fff;border:1px solid rgba(255,255,255,.35);border-radius:999px;padding:.45rem 1rem;font:600 .95rem Manrope,"IBM Plex Sans Arabic",sans-serif;cursor:pointer}
.assistant-band-chips button:hover,.assistant-band-chips button:focus-visible{background:rgba(255,255,255,.16);border-color:#fff}
html[dir="rtl"] .assistant-band h2,html[dir="rtl"] .assistant-band p,html[dir="rtl"] .assistant-band-btn,html[dir="rtl"] .assistant-band-chips button{font-family:"IBM Plex Sans Arabic","Segoe UI",Tahoma,sans-serif}

/* ---------- Launcher (sits above the WhatsApp float) ---------- */
.oa-launcher{position:fixed;inset-inline-end:1.1rem;bottom:5.4rem;z-index:70;width:auto;height:3.4rem;border-radius:999px;border:2px solid #c9a55c;background:#0b1f3a;color:#fff;cursor:pointer;display:flex;align-items:center;gap:.55rem;box-shadow:0 10px 24px rgba(11,31,58,.35);padding:0 1.15rem} /* F18 (Dec 4 2026): unmistakable chat button — speech-bubble icon + visible "Chat" / "محادثة" label in a pill, not a bare circle. */
.oa-launcher-label{font:700 1rem Manrope,"IBM Plex Sans Arabic",sans-serif;color:#fff;white-space:nowrap}
html[dir="rtl"] .oa-launcher-label{font-family:"IBM Plex Sans Arabic","Segoe UI",Tahoma,sans-serif}
.oa-launcher:hover,.oa-launcher:focus-visible{transform:scale(1.06);outline:2px solid #c9a55c;outline-offset:2px}
.oa-launcher svg{width:1.5rem;height:1.5rem;flex:none;opacity:.9}

/* ---------- Panel ---------- */
.oa-panel{position:fixed;inset-inline-end:1rem;bottom:9.4rem;z-index:71;width:min(23.75rem,calc(100vw - 2rem));max-height:min(35rem,calc(100dvh - 11rem));display:flex;flex-direction:column;background:#fff;border:1px solid #dbe4ef;border-radius:16px;box-shadow:0 18px 44px rgba(11,31,58,.32);overflow:hidden;font-family:Manrope,"Source Sans 3","IBM Plex Sans Arabic",sans-serif}
/* FIX 2026-12-03: the panel's display:flex above overrides the browser's
   built-in [hidden]{display:none} rule, so the panel showed on load and
   Close / Esc / launcher could not hide it. This rule restores [hidden]. */
.oa-panel[hidden]{display:none!important}
.oa-head{display:flex;align-items:center;justify-content:space-between;gap:.75rem;background:#0b1f3a;color:#fff;padding:.7rem .9rem}
.oa-head-title{display:flex;align-items:center;gap:.6rem;min-width:0}
.oa-head-mark{display:grid;place-items:center;width:2rem;height:2rem;border-radius:50%;background:#c9a55c;color:#0b1f3a;font:800 1rem Manrope,sans-serif;flex:none}
.oa-head-name{display:block;font-size:1rem;line-height:1.25}
.oa-head-badge{display:block;font-size:.75rem;color:#e8d9b0;line-height:1.3}
.oa-close{background:none;border:0;color:#fff;font-size:1.5rem;line-height:1;cursor:pointer;padding:.25rem .4rem;border-radius:8px}
.oa-close:hover,.oa-close:focus-visible{background:rgba(255,255,255,.15)}
.oa-messages{flex:1;overflow-y:auto;padding:.9rem;display:flex;flex-direction:column;gap:.6rem;background:#f3f6fa}
.oa-msg{display:flex}
.oa-msg-user{justify-content:flex-end}
.oa-bubble{max-width:85%;padding:.6rem .8rem;border-radius:14px;font-size:.95rem;line-height:1.55;color:#16233a;white-space:pre-wrap;overflow-wrap:anywhere}
.oa-msg-bot .oa-bubble{background:#fff;border:1px solid #dbe4ef;border-inline-start:3px solid #c9a55c;border-start-start-radius:4px}
.oa-msg-user .oa-bubble{background:#0b1f3a;color:#fff;border-end-end-radius:4px}
.oa-chips{display:flex;flex-wrap:wrap;gap:.4rem;padding:.55rem .9rem 0;background:#f3f6fa}
.oa-chips:empty{display:none}
.oa-chip{background:#fff;border:1px solid #1263c7;color:#0b1f3a;border-radius:999px;padding:.35rem .8rem;font:600 .88rem Manrope,"IBM Plex Sans Arabic",sans-serif;cursor:pointer}
.oa-chip:hover,.oa-chip:focus-visible{background:#e7effa;border-color:#0b1f3a}
.oa-voice-notice{margin:.6rem .9rem 0;padding:.7rem .8rem;border:1px solid #c9a55c;border-radius:12px;background:#fdf8ec;font-size:.9rem;line-height:1.5;color:#16233a}
.oa-voice-notice p{margin:.3rem 0 .6rem}
.oa-voice-notice-row{display:flex;gap:.5rem;flex-wrap:wrap}
.oa-btn{border-radius:999px;padding:.45rem 1rem;font:700 .92rem Manrope,"IBM Plex Sans Arabic",sans-serif;cursor:pointer}
.oa-btn-gold{background:#c9a55c;color:#0b1f3a;border:1.5px solid #c9a55c}
.oa-btn-gold:hover,.oa-btn-gold:focus-visible{background:#d8bc7d}
.oa-btn-line{background:#fff;color:#0b1f3a;border:1.5px solid #0b1f3a}
.oa-input-row{display:flex;gap:.5rem;padding:.7rem .9rem;background:#fff;border-top:1px solid #dbe4ef}
.oa-input{flex:1;min-width:0;border:1px solid #c3cfdd;border-radius:999px;padding:.55rem .9rem;font:400 .95rem Manrope,"Source Sans 3","IBM Plex Sans Arabic",sans-serif;color:#16233a}
.oa-input:focus-visible{outline:2px solid #1263c7;outline-offset:1px}
.oa-mic,.oa-send{flex:none;width:2.5rem;height:2.5rem;border-radius:50%;cursor:pointer;display:grid;place-items:center}
.oa-mic{border:1.5px solid #0b1f3a;background:#fff;color:#0b1f3a}
.oa-mic svg{width:1.25rem;height:1.25rem}
.oa-mic:hover,.oa-mic:focus-visible{background:#e7effa}
.oa-mic.is-listening{background:#c0392b;border-color:#c0392b;color:#fff;animation:oa-pulse 1.2s ease-in-out infinite}
.oa-send{border:0;background:#c9a55c;color:#0b1f3a;font-size:1.1rem}
.oa-send:hover,.oa-send:focus-visible{background:#d8bc7d}
@keyframes oa-pulse{0%,100%{box-shadow:0 0 0 0 rgba(192,57,43,.45)}50%{box-shadow:0 0 0 8px rgba(192,57,43,0)}}
.oa-foot{display:flex;align-items:center;gap:.4rem;padding:.45rem .9rem .6rem;background:#fff}
.oa-tool{background:none;border:1px solid transparent;border-radius:999px;padding:.3rem .55rem;font:600 .8rem Manrope,"IBM Plex Sans Arabic",sans-serif;color:#40506a;cursor:pointer}
.oa-tool:hover,.oa-tool:focus-visible{border-color:#c3cfdd}
.oa-tool.is-on{background:#e7effa;border-color:#1263c7;color:#0b1f3a}
.oa-team{margin-inline-start:auto;background:#0b1f3a;color:#fff;border-radius:999px;padding:.45rem .9rem;font:700 .85rem Manrope,"IBM Plex Sans Arabic",sans-serif;text-decoration:none;white-space:nowrap}
.oa-team:hover,.oa-team:focus-visible{background:#163864;color:#fff}
.oa-privacy{margin:0;padding:0 .9rem .7rem;background:#fff;font-size:.75rem;line-height:1.4;color:#6b7a8d}

/* ---------- Phones: full-width panel ---------- */
@media (max-width:640px){
  .oa-panel{inset-inline:1rem;width:auto;bottom:9.4rem;max-height:calc(100dvh - 11rem)}
  .oa-launcher{bottom:5.4rem}
  .assistant-band-actions{flex-direction:row;align-items:center;flex-wrap:wrap}
}
@media (prefers-reduced-motion:reduce){
  .oa-mic.is-listening{animation:none}
  .oa-launcher:hover,.oa-launcher:focus-visible{transform:none}
}
html[dir="rtl"] .oa-panel,html[dir="rtl"] .oa-bubble,html[dir="rtl"] .oa-input,html[dir="rtl"] .oa-chip,html[dir="rtl"] .oa-tool{font-family:"IBM Plex Sans Arabic","Segoe UI",Tahoma,sans-serif}

/* Group 1 phone fixes (Dec 4 2026, owner review F1-F35). */
@media (max-width:640px){
  /* F4 — suggestion chips (band + panel) and the 'Prefer a person' link are at
     least 44px tall on phones. Band chips were 37px, the panel chips ~30px,
     the 'Prefer a person' link ~26px. Desktop unchanged. */
  .assistant-band-chips button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:.45rem 1rem}
  .oa-chip{display:inline-flex;align-items:center;min-height:44px}
  .assistant-band-actions a{display:inline-flex;align-items:center;min-height:44px}
  /* F3 — chat launcher: smaller footprint on phones (3rem = 48px, still a 44px+
     tap target), no hover/focus scale so it can never be pushed past the viewport
     edge. Inline-end offset stays 1.1rem, so its edge stays inside the viewport
     at 360/390px in both LTR and RTL. */
  .oa-launcher{width:auto;height:3rem;padding:0 .95rem}
  .oa-launcher:hover,.oa-launcher:focus-visible{transform:none}
}

/* Rulings (Dec 4 2026): 44px tap targets extend to tablets (641-1200px) for
   the assistant band chips and the panel chips. Phones already have them
   (<=640px block above); the 'Prefer a person' link is unchanged. */
@media (min-width:641px) and (max-width:1200px){
  .assistant-band-chips button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:.45rem 1rem}
  .oa-chip{display:inline-flex;align-items:center;min-height:44px}
}

/* Group 3 type system + Arabic (Dec 4 2026, owner review F1-F35). */
/* F7 — widget labels minimum 14px: head badge .75rem (12px), privacy note
   .75rem (12px), tool buttons .8rem (12.8px), 'Talk to the team' .85rem
   (13.6px). Chips (.88rem = 14.1px), bubbles, input and voice notice
   already meet the floor. */
.oa-head-badge { font-size: 0.875rem; }
.oa-privacy { font-size: 0.875rem; }
.oa-tool { font-size: 0.875rem; }
.oa-team { font-size: 0.875rem; }
/* F8 — Arabic: widget buttons that set their own Manrope stack use IBM Plex
   Sans Arabic in RTL. The panel/bubble/input/chip/tool already switch via
   the RTL block above; the launcher mark and head mark are Latin glyphs. */
html[dir="rtl"] .oa-btn, html[dir="rtl"] .oa-team { font-family: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif; }

/* Pexels integration (Dec 4 2026, owner-ordered): chat launcher ~44px on
   phones, tucked to the inline-end edge with safe-area insets, matching the
   WhatsApp float. The footer clearance in site.css is sized from this
   height (2.75rem) + the 5.4rem bottom offset + 16px. */
@media (max-width: 640px) {
  .oa-launcher { height: 2.75rem; padding: 0 .8rem; bottom: calc(5.4rem + env(safe-area-inset-bottom, 0px)); inset-inline-end: max(0.5rem, env(safe-area-inset-right, 0px)); }
  .oa-launcher svg { width: 1.25rem; height: 1.25rem; }
}
