/* ══════════════════════════════════════════════════════════════════════════
   «Elmatajer AI» floating assistant — landing.partials.ai-widget.
   2026-10-05: built on the floating WhatsApp widget's shell (fixed root at the
   bottom inline-end corner, pointer-events shell, FAB with the icon ↔ ✕ swap,
   spring panel that grows from the corner, bottom sheet on phones).
   2026-10-15 (owner): reskinned as a support chat in the navy/orange identity —
   navy header with the support team, light conversation, outlined suggestion
   chips above a pill input, an orange FAB with floating dots, and a teaser
   bubble that types two lines beside it. Reduced-motion safe.
   ══════════════════════════════════════════════════════════════════════════ */
#eai-root{
    --eai-a: var(--em-gold);          /* accent that passes contrast in each theme (#AD4700 light · #FF7900 dark) */
    --eai-ink: var(--em-gold-ink);
    --eai-o: #FF7900;                 /* brand orange — FAB, header badge, avatars */
    --eai-navy: #071827;
    --eai-ivory: #FFF8F0;
    --eai-bg: var(--em-surface);
    --eai-bg-2: var(--em-surface-2);
    --eai-line: var(--em-border);
    --eai-text: var(--em-text);
    --eai-muted: var(--em-muted);
    --eai-good: var(--em-good);
    position: fixed;
    bottom: 24px;
    inset-inline-end: 24px;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 14px;
    font-family: inherit;
    color: var(--eai-text);
    pointer-events: none;   /* a POSITIONING SHELL, never a tap target (2026-09-22) */
}
#eai-root[dir="rtl"]{ direction: rtl; }
#eai-root[dir="ltr"]{ direction: ltr; }
#eai-fab, .eai-teaser:not([hidden]){ pointer-events: auto; }

/* ── Panel ── */
#eai-panel{
    width: 384px;
    max-width: calc(100vw - 48px);
    height: min(610px, calc(100dvh - 130px));
    border-radius: 26px;
    overflow: hidden;
    background: var(--eai-bg-2);
    border: 1px solid var(--eai-line);
    box-shadow: 0 30px 70px -20px rgba(7,24,39,.38), 0 6px 20px rgba(7,24,39,.10);
    display: flex;
    flex-direction: column;
    transform-origin: bottom right;
    transform: scale(.88) translateY(16px);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: transform .32s cubic-bezier(.34,1.56,.64,1), opacity .25s ease, visibility 0s linear .32s;
}
#eai-root[dir="rtl"] #eai-panel{ transform-origin: bottom left; }
#eai-panel:not([hidden]){
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
    visibility: visible;
    transition: transform .32s cubic-bezier(.34,1.56,.64,1), opacity .25s ease, visibility 0s linear 0s;
}

/* ── Header: navy in both themes ── */
.eai-head{
    position: relative; flex: none; display: flex; align-items: center; gap: 12px; padding: 16px 14px 16px 16px;
    color: var(--eai-ivory);
    background:
        radial-gradient(90% 160% at 100% 0%, rgba(255,121,0,.30) 0%, transparent 60%),
        linear-gradient(160deg, #0d2335 0%, var(--eai-navy) 70%);
    border-bottom: 1px solid rgba(255,248,240,.08);
}
#eai-root[dir="rtl"] .eai-head{ padding: 16px 16px 16px 14px;
    background:
        radial-gradient(90% 160% at 0% 0%, rgba(255,121,0,.30) 0%, transparent 60%),
        linear-gradient(200deg, #0d2335 0%, var(--eai-navy) 70%); }

/* the support team: the brand first, two teammates tucked behind it */
.eai-team{ position: relative; flex: none; display: flex; align-items: center; }
.eai-av{ width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 2.5px solid var(--eai-navy); }
.eai-av + .eai-av{ margin-inline-start: -16px; }
.eai-av--brand{ position: relative; z-index: 3; color: var(--eai-navy); background: var(--eai-ivory); }
.eai-av--brand svg{ display: block; }
.eai-av--mate{ z-index: 2; width: 38px; height: 38px; color: rgba(255,248,240,.9); background: #1d3a52; }
.eai-av--mate2{ z-index: 1; background: #2a4a63; }
.eai-av--mate svg{ width: 20px; height: 20px; }
.eai-online{ position: absolute; z-index: 4; bottom: 0; inset-inline-start: 30px; width: 13px; height: 13px; border-radius: 50%;
    background: #3FCB80; border: 2.5px solid var(--eai-navy); }

.eai-head-info{ flex: 1; min-width: 0; }
.eai-head-name{ margin: 0 0 3px; display: flex; align-items: center; gap: 7px; font-size: 17px; font-weight: 800; line-height: 1.3; color: #fff; }
.eai-head-name > span{ unicode-bidi: isolate; }
.eai-head-badge{ padding: 1px 7px; border-radius: 7px; font-size: 11px; font-weight: 800; line-height: 1.4; letter-spacing: .04em;
    color: var(--eai-navy); background: var(--eai-o); direction: ltr; }
.eai-head-status{ margin: 0; display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: rgba(255,248,240,.72); min-width: 0; }
.eai-head-status > span:last-child{ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eai-dot-live{ position: relative; width: 8px; height: 8px; border-radius: 50%; background: #3FCB80; flex: none; }
.eai-dot-live::after{ content: ''; position: absolute; inset: -3px; border-radius: 50%; border: 1.5px solid #3FCB80; opacity: 0; animation: eai-ping 2.2s ease-out infinite; }
@keyframes eai-ping{ 0%{ transform: scale(.6); opacity: .8; } 100%{ transform: scale(1.6); opacity: 0; } }

.eai-head-actions{ display: flex; gap: 6px; flex: none; }
.eai-head-btn{
    width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%; cursor: pointer;
    color: var(--eai-ivory); background: rgba(255,248,240,.10); border: 0;
    transition: background-color .2s, color .2s, transform .2s;
}
.eai-head-btn:hover{ color: var(--eai-navy); background: var(--eai-o); transform: translateY(-1px); }
.eai-head-btn svg{ width: 16px; height: 16px; }
.eai-head-btn:focus-visible, #eai-fab:focus-visible, #eai-send:focus-visible, .eai-chip:focus-visible,
.eai-teaser-card:focus-visible, .eai-teaser-x:focus-visible{ outline: 2px solid var(--eai-a); outline-offset: 2px; }

/* ── Conversation ── */
.eai-body{
    flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
    display: flex; flex-direction: column; gap: 12px; padding: 14px 14px 12px;
    background: var(--eai-bg-2);
    scrollbar-width: thin; scrollbar-color: var(--eai-line) transparent;
}
.eai-welcome, .eai-thread{ display: flex; flex-direction: column; gap: 12px; }
/* 2026-10-19 (owner): suggestions follow the greeting directly — pinned to the bottom they left
   a large empty gap between the welcome card and the chips at the start of every chat. */
.eai-time{ margin: 0; text-align: center; font-size: 12px; font-weight: 700; color: var(--eai-muted); }
.eai-bot-name{ margin: 0 0 -6px; padding-inline-start: 41px; display: flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; color: var(--eai-muted); }
.eai-bot-name svg{ width: 12px; height: 12px; color: var(--eai-a); }
.eai-msg-row{ display: flex; align-items: flex-end; gap: 9px; animation: eai-popin .35s cubic-bezier(.34,1.56,.64,1) both; }
.eai-msg-row.is-me{ flex-direction: row-reverse; }
@keyframes eai-popin{ from{ opacity: 0; transform: scale(.94) translateY(8px); } to{ opacity: 1; transform: none; } }
.eai-bot-av{ width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 50%; color: var(--eai-navy); background: var(--eai-o); }
.eai-bot-av svg{ width: 16px; height: 16px; }
.eai-bubble{
    max-width: 82%; min-width: 0; padding: 11px 15px; border-radius: 20px 20px 20px 6px;
    font-size: 14px; line-height: 1.75; background: var(--eai-bg); border: 1px solid color-mix(in srgb, var(--eai-line) 70%, transparent);
    box-shadow: 0 4px 14px -8px rgba(7,24,39,.18); overflow-wrap: anywhere;
}
#eai-root[dir="rtl"] .eai-bubble{ border-radius: 20px 20px 6px 20px; }
.is-me .eai-bubble{ color: var(--eai-ink); background: var(--eai-a); border-color: var(--eai-a); border-radius: 20px 20px 6px 20px; box-shadow: none; }
#eai-root[dir="rtl"] .is-me .eai-bubble{ border-radius: 20px 20px 20px 6px; }
.eai-bubble p{ margin: 0 0 8px; } .eai-bubble p:last-child{ margin-bottom: 0; }
.eai-bubble ul, .eai-bubble ol{ margin: 4px 0 8px; padding-inline-start: 20px; }
.eai-bubble li{ margin-bottom: 4px; }
.eai-bubble li::marker{ color: var(--eai-a); font-weight: 800; }
.eai-bubble strong{ font-weight: 800; }
.eai-bubble a{ color: var(--eai-a); text-decoration: underline; text-underline-offset: 2px; }
.eai-bubble-hi{ margin: 0 0 4px !important; font-size: 14.5px; font-weight: 800; min-height: 1.4em; }
.eai-bubble-sub{ margin: 0 !important; color: var(--eai-muted); min-height: 1.4em; }
.eai-bubble--err{ border-color: color-mix(in srgb, #e5484d 45%, var(--eai-line)); }
.eai-retry{ margin-top: 8px; padding: 6px 12px; border: 0; border-radius: 10px; cursor: pointer; font: inherit; font-size: 13px; font-weight: 800;
    color: var(--eai-ink); background: var(--eai-a); }

/* suggested questions: outlined chips in the accent */
.eai-suggest{ margin-top: 2px; display: flex; flex-wrap: wrap; gap: 8px; }
.eai-suggest[hidden]{ display: none; }
.eai-chip{
    padding: 9px 15px; border-radius: 99px; cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 700; line-height: 1.4; text-align: start;
    color: var(--eai-a); background: var(--eai-bg); border: 1.5px solid color-mix(in srgb, var(--eai-a) 38%, transparent);
    animation: eai-popin .35s cubic-bezier(.34,1.56,.64,1) both; transition: border-color .2s, background-color .2s, transform .2s;
}
.eai-chip:hover{ border-color: var(--eai-a); background: color-mix(in srgb, var(--eai-a) 8%, var(--eai-bg)); transform: translateY(-1px); }
.eai-chip:nth-child(2){ animation-delay: .05s; } .eai-chip:nth-child(3){ animation-delay: .1s; } .eai-chip:nth-child(4){ animation-delay: .15s; } .eai-chip:nth-child(5){ animation-delay: .2s; }

/* signed-in note */
.eai-note{ margin-inline-start: 41px; padding: 12px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.75; background: var(--eai-bg); border: 1px solid var(--eai-line); }
.eai-note[hidden]{ display: none; }
.eai-note p{ margin: 0 0 10px; }
.eai-note-btn{ display: inline-flex; margin: 0 0 6px; margin-inline-end: 6px; padding: 8px 12px; border-radius: 10px; font-size: 13px; font-weight: 800; text-decoration: none;
    color: var(--eai-ink); background: var(--eai-a); }
.eai-note-btn--ghost{ color: var(--eai-text); background: transparent; border: 1px solid var(--eai-line); }

/* source cards under an answer */
.eai-sources{ display: grid; gap: 8px; margin-top: 2px; padding-inline-start: 41px; }
.eai-src{
    display: grid; grid-template-columns: auto minmax(0,1fr); gap: 4px 10px; padding: 11px 12px; border-radius: 14px; text-decoration: none;
    color: var(--eai-text); background: var(--eai-bg); border: 1px solid color-mix(in srgb, var(--eai-a) 35%, var(--eai-line));
    animation: eai-popin .35s cubic-bezier(.34,1.56,.64,1) both; transition: transform .2s, border-color .2s;
}
.eai-src:hover{ transform: translateY(-2px); border-color: var(--eai-a); }
.eai-src__ico{ grid-row: span 3; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; font-size: 15px;
    background: color-mix(in srgb, var(--eai-a) 15%, transparent); }
.eai-src__t{ font-size: 13.5px; font-weight: 800; line-height: 1.45; }
.eai-src__s{ font-size: 12.5px; line-height: 1.6; color: var(--eai-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.eai-src__go{ justify-self: end; font-size: 12.5px; font-weight: 800; color: var(--eai-a); }

/* pending: dots + the stage label */
.eai-typing{ display: flex; align-items: center; gap: 5px; padding: 12px 14px; }
.eai-tdot{ width: 7px; height: 7px; border-radius: 50%; background: var(--eai-muted); animation: eai-tdot 1.3s ease-in-out infinite; }
.eai-tdot:nth-child(2){ animation-delay: .18s; } .eai-tdot:nth-child(3){ animation-delay: .36s; }
@keyframes eai-tdot{ 0%,60%,100%{ transform: translateY(0); opacity: .5; } 30%{ transform: translateY(-5px); opacity: 1; background: var(--eai-a); } }
.eai-stage{ margin-inline-start: 6px; font-size: 12.5px; color: var(--eai-muted); }
.eai-human{ display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; color: var(--eai-muted); }
.eai-human[hidden]{ display: none; }

/* ── Footer: one pill holds the field and the send button ── */
.eai-footer{ flex: none; padding: 10px 14px 12px; background: var(--eai-bg-2); }
.eai-input-row{ display: flex; align-items: center; gap: 8px; margin: 0; flex-direction: row-reverse; padding: 6px; border-radius: 30px;
    background: var(--eai-bg); border: 1px solid color-mix(in srgb, var(--eai-line) 80%, transparent);
    box-shadow: 0 6px 18px -10px rgba(7,24,39,.22); transition: border-color .2s, box-shadow .2s; }
.eai-input-row:focus-within{ border-color: color-mix(in srgb, var(--eai-text) 18%, var(--eai-line)); box-shadow: 0 8px 22px -10px rgba(7,24,39,.28); }
#eai-send{
    width: 42px; height: 42px; flex: none; display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer;
    color: var(--eai-ink); background: var(--eai-a); transition: transform .18s, opacity .2s;
}
#eai-send:hover{ transform: scale(1.06); }
#eai-send:disabled{ opacity: .5; cursor: default; transform: none; }
#eai-send svg{ width: 18px; height: 18px; }
#eai-root[dir="rtl"] .eai-send-icon{ transform: scaleX(-1); }
.eai-input-field{ flex: 1; min-width: 0; display: flex; padding: 10px 12px; }
#eai-msg{
    flex: 1; min-width: 0; max-height: 96px; border: 0; outline: 0; resize: none; overflow-y: auto; scrollbar-width: none;
    font: inherit; font-size: 14px; line-height: 1.5; color: var(--eai-text); background: transparent; caret-color: var(--eai-a);
}
#eai-msg::placeholder{ color: var(--eai-muted); }
.eai-secure{ margin: 9px 0 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 6px; font-size: 12px; font-weight: 600; color: var(--eai-muted); }
.eai-secure svg{ width: 14px; height: 14px; color: var(--eai-good); }
.eai-secure__ok{ font-weight: 800; color: var(--eai-good); }
.eai-secure b{ font-weight: 800; color: var(--eai-text); }
.eai-left{ margin-inline-start: 6px; padding: 1px 8px; border-radius: 99px; font-weight: 700; background: var(--eai-bg); }
.eai-left[hidden]{ display: none; }

/* ── Teaser: two typed lines beside the button ── */
.eai-teaser{ position: relative; max-width: min(290px, calc(100vw - 48px)); animation: eai-teaser-in .45s cubic-bezier(.34,1.56,.64,1) both; }
.eai-teaser[hidden]{ display: none; }
#eai-root.is-open .eai-teaser{ display: none; }
@keyframes eai-teaser-in{ from{ opacity: 0; transform: translateY(10px) scale(.92); } to{ opacity: 1; transform: none; } }
.eai-teaser-card{
    display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 12px 16px 12px 12px; cursor: pointer; text-align: start;
    font: inherit; color: var(--eai-text); background: var(--eai-bg); border: 1px solid var(--eai-line);
    border-radius: 20px 20px 6px 20px; box-shadow: 0 18px 40px -18px rgba(7,24,39,.45), 0 2px 8px rgba(7,24,39,.06);
    transition: transform .2s, border-color .2s;
}
#eai-root[dir="rtl"] .eai-teaser-card{ padding: 12px 12px 12px 16px; border-radius: 20px 20px 20px 6px; }
.eai-teaser-card:hover{ transform: translateY(-2px); border-color: color-mix(in srgb, var(--eai-a) 45%, var(--eai-line)); }
.eai-teaser-av{ width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 50%; color: var(--eai-ivory); background: var(--eai-navy); }
.eai-teaser-av svg{ display: block; }
.eai-teaser-txt{ display: flex; flex-direction: column; gap: 2px; min-width: 0; min-height: 34px; justify-content: center; }
.eai-teaser-txt b{ font-size: 14px; font-weight: 800; line-height: 1.5; }
.eai-teaser-txt b:empty, .eai-teaser-txt b:empty + span:empty{ display: none; }
.eai-teaser-txt > span:last-child{ font-size: 12.5px; line-height: 1.55; color: var(--eai-muted); }
.eai-teaser-dots{ display: none; gap: 4px; padding: 6px 0; }
.eai-teaser.is-typing .eai-teaser-dots{ display: flex; }
.eai-teaser-dots i{ width: 7px; height: 7px; border-radius: 50%; background: var(--eai-muted); animation: eai-tdot 1.3s ease-in-out infinite; }
.eai-teaser-dots i:nth-child(2){ animation-delay: .18s; } .eai-teaser-dots i:nth-child(3){ animation-delay: .36s; }
.eai-teaser-x{
    position: absolute; top: -9px; inset-inline-start: -9px; z-index: 1; width: 24px; height: 24px; display: grid; place-items: center; padding: 0;
    border-radius: 50%; cursor: pointer; color: var(--eai-muted); background: var(--eai-bg); border: 1px solid var(--eai-line);
    box-shadow: 0 4px 10px -4px rgba(7,24,39,.3); transition: color .2s, background-color .2s;
}
.eai-teaser-x:hover{ color: var(--eai-text); }
.eai-teaser-x svg{ width: 12px; height: 12px; }

/* ── FAB: brand orange, a thinking bubble, a spark, loose dots around it ── */
#eai-fab{
    position: relative; width: 62px; height: 62px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; flex-shrink: 0;
    display: grid; place-items: center; overflow: visible; background: transparent;
    transition: transform .28s cubic-bezier(.34,1.56,.64,1);
}
#eai-fab:hover{ transform: translateY(-2px) scale(1.05); }
#eai-fab:active{ transform: scale(.95); }
.eai-fab-inner{
    position: relative; width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center;
    color: var(--eai-navy);
    background: linear-gradient(145deg, #FF9A2E 0%, var(--eai-o) 48%, #E85F00 100%);
    box-shadow: 0 14px 28px -12px rgba(232,95,0,.7), inset 0 1px 0 rgba(255,255,255,.28);
    transition: background .3s, color .3s;
}
.eai-fab-icon{ position: absolute; inset: 0; display: grid; place-items: center;
    transition: transform .28s cubic-bezier(.34,1.56,.64,1), opacity .22s ease; }
.eai-glyph{ width: 38px; height: 38px; overflow: visible; }
.eai-glyph__bubble{ fill: var(--eai-ivory); }
/* the assistant's eyes: a blink every few seconds and a glance to each side */
.eai-glyph__eyes{ fill: var(--eai-navy); transform-box: fill-box; transform-origin: center; animation: eai-eyes 5.6s ease-in-out infinite; }
@keyframes eai-eyes{
    0%, 30%, 100%{ transform: none; }
    33%{ transform: scaleY(.12); } 36%{ transform: none; }
    52%, 60%{ transform: translateX(-2.2px); }
    68%, 76%{ transform: translateX(2.2px); }
    82%{ transform: none; } 85%{ transform: scaleY(.12); } 88%{ transform: none; }
}
#eai-fab:hover .eai-glyph__eyes{ animation: none; transform: scaleY(.55) translateY(1px); }   /* a smile-squint on hover */
.eai-glyph__spark{ fill: var(--eai-ivory); transform-box: fill-box; transform-origin: center; animation: eai-spark 2.8s ease-in-out infinite; }
@keyframes eai-spark{ 0%,100%{ transform: scale(1) rotate(0); opacity: 1; } 50%{ transform: scale(.55) rotate(45deg); opacity: .7; } }
.eai-fab-open{ transform: scale(1) rotate(0); opacity: 1; }
.eai-fab-close{ transform: scale(0) rotate(-90deg); opacity: 0; color: var(--eai-ivory); }
.eai-fab-close svg{ width: 26px; height: 26px; }

/* loose dots that drift around the button */
.eai-fab-dot{ position: absolute; border-radius: 50%; background: var(--eai-o); pointer-events: none; animation: eai-drift 4.8s ease-in-out infinite; }
.eai-fab-dot--1{ width: 9px; height: 9px; top: -6px; inset-inline-start: -10px; opacity: .55; }
.eai-fab-dot--2{ width: 6px; height: 6px; top: 22px; inset-inline-start: -18px; opacity: .4; animation-delay: -1.6s; }
.eai-fab-dot--3{ width: 7px; height: 7px; top: -14px; inset-inline-end: 4px; opacity: .45; animation-delay: -3.1s; }
@keyframes eai-drift{ 0%,100%{ transform: translate(0,0); } 33%{ transform: translate(3px,-5px); } 66%{ transform: translate(-3px,3px); } }

/* open: same orange button, a bold ivory ✕, and a light arc that turns around its edge */
.eai-fab-ring{
    position: absolute; inset: -5px; border-radius: 50%; padding: 3px; pointer-events: none; opacity: 0; transition: opacity .25s;
    background: conic-gradient(from var(--eai-r, 0deg), transparent 0deg, color-mix(in srgb, var(--eai-o) 20%, transparent) 40deg, color-mix(in srgb, var(--eai-o) 75%, #fff) 130deg, transparent 135deg);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
    animation: eai-ring 2.4s linear infinite;
}
@property --eai-r{ syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes eai-ring{ to{ --eai-r: 360deg; } }
#eai-fab[aria-expanded="true"] .eai-fab-ring{ opacity: 1; }
#eai-fab[aria-expanded="true"] .eai-fab-dot{ opacity: 0; }
#eai-fab[aria-expanded="true"] .eai-fab-open{ transform: scale(0) rotate(90deg); opacity: 0; }
#eai-fab[aria-expanded="true"] .eai-fab-close{ transform: scale(1) rotate(0); opacity: 1; }

/* ── the reply types itself in ── */
.eai-bubble .eai-pending{ display: none; }
.eai-caret{ display: inline-block; width: 2px; height: 1.05em; margin-inline-start: 2px; vertical-align: -2px; border-radius: 1px; background: var(--eai-a); animation: eai-caret 1s steps(1) infinite; }
@keyframes eai-caret{ 50%{ opacity: 0; } }

/* ── human support (WhatsApp) — prominent when the AI could not help, quiet otherwise ── */
.eai-support{ display: flex; flex-direction: column; gap: 8px; padding-inline-start: 41px; animation: eai-popin .35s cubic-bezier(.34,1.56,.64,1) both; }
.eai-support--note{ padding-inline-start: 0; margin-top: 8px; }
.eai-support__why{ margin: 0; font-size: 12.5px; line-height: 1.6; color: var(--eai-muted); }
.eai-wa{
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 14px; border-radius: 14px; text-decoration: none;
    font-size: 14px; font-weight: 800; color: #fff; background: #1f9d5c; border: 0; transition: transform .2s, background-color .2s;
}
.eai-wa:hover{ transform: translateY(-1px); background: #198a50; }
.eai-wa svg{ width: 18px; height: 18px; flex: none; }
.eai-soft{ display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; color: var(--eai-muted); }
.eai-soft a{ display: inline-flex; align-items: center; gap: 5px; font-weight: 800; color: var(--eai-text); text-decoration: none; border-bottom: 1px dashed var(--eai-line); }
.eai-soft a:hover{ color: #1f9d5c; border-color: #1f9d5c; }
.eai-soft svg{ width: 13px; height: 13px; color: #1f9d5c; }

/* ── Phones: the panel becomes a bottom sheet ── */
@media (max-width: 560px){
    #eai-root{ bottom: 16px; inset-inline-end: 16px; }
    #eai-panel{
        position: fixed; inset-inline: 0; bottom: 0; width: 100%; max-width: none;
        height: min(88dvh, 760px); border-radius: 24px 24px 0 0; border-bottom: 0;
        transform-origin: bottom center; transform: translateY(40px);
    }
    #eai-root[dir="rtl"] #eai-panel{ transform-origin: bottom center; }
    #eai-panel:not([hidden]){ transform: none; }
    #eai-root.is-open #eai-fab{ opacity: 0; pointer-events: none; }
    .eai-support{ padding-inline-start: 0; }
    .eai-bubble{ max-width: 88%; }
    .eai-teaser{ max-width: calc(100vw - 32px); }
}

@media (prefers-reduced-motion: reduce){
    #eai-root *, #eai-panel{ animation: none !important; transition: none !important; }
}

/* Mixed-language content (an English answer inside the Arabic page, or the
   reverse): every paragraph / card takes its direction from its own text. */
.eai-bubble p, .eai-bubble li, .is-me .eai-bubble, .eai-src__t, .eai-src__s, .eai-chip{ unicode-bidi: plaintext; text-align: start; }

/* The mobile nav drawer (.em-drawer, z-index 200) opened UNDER this widget (z 9998): the
   launcher sat on top of the drawer's «تسجيل الدخول» button. While the drawer is open the
   drawer owns the screen — hide the widget, it comes back when the drawer closes. (2026-10-05) */
body:has(.em-drawer.is-open) #eai-root{ visibility: hidden; pointer-events: none; }

/* 2026-10-19 (owner): the greeting card no longer opens as an empty box — its lines take no room
   until they have text, and while nothing is typed yet the card shows a compact «typing» dots row. */
.eai-bubble-hi:empty, .eai-bubble-sub:empty{ display: none; }
.eai-bubble:not(:has(p:not(:empty)))::before{
    content: ""; display: block; width: 34px; height: 10px;
    background: radial-gradient(circle, var(--eai-muted) 45%, transparent 50%) 0 50% / 10px 10px no-repeat,
                radial-gradient(circle, var(--eai-muted) 45%, transparent 50%) 12px 50% / 10px 10px no-repeat,
                radial-gradient(circle, var(--eai-muted) 45%, transparent 50%) 24px 50% / 10px 10px no-repeat;
    opacity: .55; animation: eai-typing 1s ease-in-out infinite;
}
@keyframes eai-typing{ 50%{ opacity: .2; } }
@media (prefers-reduced-motion: reduce){ .eai-bubble:not(:has(p:not(:empty)))::before{ animation: none; } }
