/* ======================================================================
   SMART AI BUDDY — Widget CSS v1.2.0
   Style : avatar-first, voice-first
   All colours exposed as CSS variables, re-assigned at runtime
   by class-sab-public.php → build_css_vars() from admin palette.
   ====================================================================== */
.sab-root{
  --sab-accent:       #1d6d7f;
  --sab-accent-text:  #FFFFFF;
  --sab-bg:           #FFFFFF;
  --sab-bubble-user:  #F97316;
  --sab-bubble-bot:   #F1F5F9;
  --sab-surface:      var(--sab-bg);
  --sab-surface2:     #F8FAFC;
  --sab-text:         #0F172A;
  --sab-text2:        #64748B;
  --sab-text3:        #94A3B8;
  --sab-border:       #E2E8F0;
  --sab-green:        #10B981;
  --sab-shadow:       0 16px 48px rgba(15,23,42,.18);
  --sab-radius:       18px;
}
.sab-root,.sab-root *{box-sizing:border-box;}
.sab-root{
  all:initial;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  font-size:14px;line-height:1.5;
  -webkit-font-smoothing:antialiased;
}
/* Host-theme reset. Historically wrapped in :where() for zero specificity —
   clean in theory but in practice any theme with a naked `button { border:red }`
   rule (specificity 0,0,1) wins and leaks red borders / inverts text colours
   into our buttons. The Arts de Saba theme on the live site reproduces this
   exact bug. Using real `.sab-root` specificity (0,1,1) + !important on the
   destructive props (border/background/color) makes the widget robust against
   any host theme; class-level rules below still win because they carry their
   own !important on the same props. */
.sab-root button,
.sab-root input,
.sab-root textarea{
  border:0 !important;background:transparent !important;color:inherit !important;font:inherit !important;
  padding:0;margin:0;letter-spacing:inherit;
  -webkit-appearance:none;appearance:none;outline:none;
  box-shadow:none;text-transform:none;line-height:1.2;
}
.sab-root button{cursor:pointer;}
.sab-root button:focus-visible{outline:2px solid var(--sab-accent);outline-offset:2px;}
.sab-root svg{display:block !important;width:auto;height:auto;overflow:visible;}
.sab-root svg *{fill:inherit;stroke:inherit;}
/* Neutralise host-theme image styles (borders, padding, filters) that
   otherwise render the FAB avatar and agent avatar as bordered squares
   when the source 404s or when the theme has aggressive `img` rules. */
.sab-root img{border:0 !important;margin:0 !important;padding:0 !important;max-width:100%;height:auto;vertical-align:middle;box-shadow:none !important;filter:none !important;}

/* ── FAB — avatar circulaire ──────────────────────────────────── */
/* Hardened against host themes that repaint `button` (background/color/border).
   Real-class scope + !important on destructive props keeps the launcher
   visible even when the theme rewrites every button in the page. */
.sab-root .sab-fab{
  position:fixed !important;z-index:9999999 !important;
  width:58px !important;height:58px !important;border-radius:50% !important;
  background:var(--sab-accent,#1d6d7f) !important;
  border:3px solid #fff !important;
  cursor:pointer !important;
  box-shadow:0 4px 20px rgba(0,0,0,.25) !important;
  transition:transform .2s cubic-bezier(.34,1.56,.64,1),box-shadow .2s;
  overflow:hidden !important;padding:0 !important;margin:0 !important;
  display:flex !important;align-items:center !important;justify-content:center !important;
  color:#fff !important;font-size:22px !important;font-weight:800 !important;
  text-transform:none !important;letter-spacing:0 !important;
  opacity:1 !important;filter:none !important;
}
.sab-root .sab-fab img{width:100% !important;height:100% !important;object-fit:cover !important;border-radius:50% !important;border:0 !important;}
.sab-root .sab-fab:hover{transform:scale(1.08);box-shadow:0 8px 28px rgba(0,0,0,.3) !important;}
.sab-root .sab-fab:active{transform:scale(.94);}
.sab-fab[data-pos="bottom-right"]{right:20px;bottom:20px;}
.sab-fab[data-pos="bottom-left"] {left:20px; bottom:20px;}
.sab-fab[data-pos="top-right"]   {right:20px;top:80px;}
.sab-fab[data-pos="top-left"]    {left:20px; top:80px;}
/* Dot disponibilité */
.sab-root .sab-fab-dot{
  position:absolute !important;bottom:3px !important;right:3px !important;
  width:13px !important;height:13px !important;border-radius:50% !important;
  background:var(--sab-green,#10b981) !important;border:2.5px solid #fff !important;
  margin:0 !important;padding:0 !important;
}

/* ── OVERLAY ─────────────────────────────────────────────────── */
.sab-overlay{
  position:fixed;inset:0;z-index:9999998;
  background:rgba(2,6,23,.45);
  /* NOTE: backdrop-filter:blur() was dropped — it caused catastrophic
     GPU paint costs on complex pages (WP admin bar + other widgets +
     many DOM nodes behind the overlay). Solid semi-transparent bg
     gives a similar "focus on chat" UX without the 30+ FPS hit. */
  display:flex;align-items:flex-end;justify-content:flex-end;
  padding:0 20px 88px;
  opacity:0;pointer-events:none;
  transition:opacity .2s ease;
}
.sab-overlay.sab-open{opacity:1;pointer-events:all;}
.sab-overlay.sab-open .sab-panel{transform:translateY(0) scale(1);opacity:1;}

/* ── PANEL ───────────────────────────────────────────────────── */
.sab-panel{
  /* 440px gives cards ~190px each in 2 columns → room for an image,
     title clamp-2, price and ATC button without squishing. Capped to
     viewport width minus a small gutter on narrow screens. */
  width:min(440px,calc(100vw - 32px));
  background:var(--sab-surface);
  border-radius:var(--sab-radius);
  box-shadow:var(--sab-shadow);
  display:flex;flex-direction:column;
  overflow:hidden;
  position:relative; /* anchors .sab-progress shimmer */
  transform:translateY(16px) scale(.97);opacity:0;
  transition:transform .25s cubic-bezier(.34,1.2,.64,1),opacity .2s ease;
  border:1px solid var(--sab-border);
  /* Full-height panel: fills almost the whole viewport so long answers
     and multi-card recommendations aren't cramped. Still leaves a small
     gutter so the FAB area and page header remain visible. */
  height:min(92vh,880px);
  max-height:92vh;
}

/* ── HEADER ──────────────────────────────────────────────────── */
.sab-header{
  background:var(--sab-accent);
  padding:14px 16px;
  display:flex;align-items:center;justify-content:space-between;
  flex-shrink:0;
}
.sab-header-left{display:flex;align-items:center;gap:10px;}
.sab-agent-avatar{
  width:40px;height:40px;border-radius:50%;
  background:rgba(255,255,255,.2);
  display:flex;align-items:center;justify-content:center;
  font-size:16px;color:#fff;font-weight:800;
  overflow:hidden;flex-shrink:0;border:2px solid rgba(255,255,255,.4);
}
.sab-agent-avatar img{width:100%;height:100%;object-fit:cover;}
.sab-agent-name{font-size:14px;font-weight:800;color:#fff;}
.sab-agent-status{
  font-size:11px;color:rgba(255,255,255,.8);
  display:flex;align-items:center;gap:5px;
}
.sab-status-dot{width:7px;height:7px;border-radius:50%;background:var(--sab-green);}
.sab-header-right{display:flex;gap:6px;align-items:center;}
.sab-root .sab-close-btn{
  width:28px !important;height:28px !important;border-radius:50% !important;
  border:none !important;cursor:pointer;
  background:rgba(255,255,255,.18) !important;color:#fff !important;
  font-size:18px;font-weight:700;line-height:1;
  display:flex;align-items:center;justify-content:center;
  transition:background .15s;
}
.sab-root .sab-close-btn:hover{background:rgba(255,255,255,.32) !important;}
.sab-root .sab-new-btn{
  width:28px !important;height:28px !important;border-radius:50% !important;
  border:none !important;cursor:pointer;padding:0;
  background:rgba(255,255,255,.18) !important;color:#fff !important;
  display:flex;align-items:center;justify-content:center;
  transition:background .15s;
}
.sab-root .sab-new-btn:hover{background:rgba(255,255,255,.32) !important;}
.sab-root .sab-new-btn svg{display:block !important;width:16px !important;height:16px !important;stroke:#fff !important;fill:none !important;}

/* Guest CTA bubble: subtle dashed accent so it reads as meta/system */
.sab-bubble-cta{
  border:1px dashed var(--sab-accent, #1d6d7f);
  background:rgba(29,109,127,.06) !important;
  font-size:13px;line-height:1.45;
}
.sab-cta-link{
  display:inline-block;margin-top:6px;
  color:var(--sab-accent, #1d6d7f);
  font-weight:600;text-decoration:none;
}
.sab-cta-link:hover{text-decoration:underline;}

/* ── MODE VOCAL PRINCIPAL ────────────────────────────────────── */
/* Voice command zone — sized for 3 states:
   - fresh / no messages yet : comfortable hero size (first impression)
   - messages visible        : compacted so the conversation breathes
   - idle (no voice turn)    : extra-compact, almost a header row
   The CSS custom prop --sab-voice-scale lets us shift the whole zone in
   one move; tuned via selectors below. */
.sab-voice-main{
  --sab-voice-scale: 1;
  display:flex;flex-direction:column;align-items:center;
  justify-content:center;gap:calc(14px * var(--sab-voice-scale));
  padding:calc(20px * var(--sab-voice-scale)) 16px;flex:0 0 auto;
  min-height:calc(180px * var(--sab-voice-scale));
  transition:padding .2s, min-height .2s, gap .2s;
}
/* Once the user has exchanged at least one message, the voice zone steps
   down so cards + bubbles get the vertical room they deserve. */
.sab-panel:has(.sab-messages.sab-visible) .sab-voice-main{
  --sab-voice-scale: 0.62;
}
/* When voice isn't active at all, go even smaller — same trick as a
   collapsed accordion, the user can still tap the mic without it taking
   over the panel. */
.sab-panel:has(.sab-messages.sab-visible) .sab-voice-main:not(:has(.sab-voice-active)){
  --sab-voice-scale: 0.5;
}
.sab-voice-avatar-wrap{
  position:relative;
  width:calc(72px * var(--sab-voice-scale));
  height:calc(72px * var(--sab-voice-scale));
  transition:width .2s, height .2s;
}
.sab-voice-avatar-img{
  width:calc(72px * var(--sab-voice-scale));
  height:calc(72px * var(--sab-voice-scale));
  border-radius:50%;
  background:var(--sab-accent);
  display:flex;align-items:center;justify-content:center;
  font-size:calc(26px * var(--sab-voice-scale));color:#fff;font-weight:800;
  overflow:hidden;
  box-shadow:0 4px 20px rgba(0,0,0,.15);
  position:relative;z-index:2;
  transition:box-shadow .3s, width .2s, height .2s, font-size .2s;
}
.sab-voice-avatar-img img{width:100%;height:100%;object-fit:cover;}
/* Anneaux pulsants autour de l'avatar — taille dérivée du scale pour rester
   proportionnés quand la zone se réduit. */
.sab-voice-ring{
  position:absolute;border-radius:50%;
  border:2px solid var(--sab-accent);
  opacity:0;
  top:50%;left:50%;transform:translate(-50%,-50%);
}
.sab-voice-ring-1{width:calc(92px * var(--sab-voice-scale));height:calc(92px * var(--sab-voice-scale));}
.sab-voice-ring-2{width:calc(112px * var(--sab-voice-scale));height:calc(112px * var(--sab-voice-scale));}
.sab-voice-ring-3{width:calc(132px * var(--sab-voice-scale));height:calc(132px * var(--sab-voice-scale));}
/* Animation active = listening ou speaking */
.sab-voice-active .sab-voice-ring-1{animation:sab-ring 1.8s ease-out .0s infinite;}
.sab-voice-active .sab-voice-ring-2{animation:sab-ring 1.8s ease-out .3s infinite;}
.sab-voice-active .sab-voice-ring-3{animation:sab-ring 1.8s ease-out .6s infinite;}
@keyframes sab-ring{0%{transform:translate(-50%,-50%) scale(.9);opacity:.6}80%{opacity:.1}100%{transform:translate(-50%,-50%) scale(1.3);opacity:0}}

/* Voice state "chip" — user must FEEL the assistant is in direct
   contact. Baseline bumped 14→17 px, weight 800, with a live-indicator
   dot that pulses when active. When .sab-voice-active is on the parent
   wrap, we anchor a min scale so the chip stays readable even in
   compact mode (0.62× of 17px = ~11px is too small on mobile). */
.sab-voice-state-text{
  font-size:calc(17px * var(--sab-voice-scale, 1));
  font-weight:800;letter-spacing:.01em;
  color:var(--sab-accent);text-align:center;
  min-height:calc(24px * var(--sab-voice-scale, 1));
  transition:font-size .2s;
  display:inline-flex;align-items:center;gap:8px;
  padding:4px 14px;border-radius:999px;
  background:color-mix(in srgb, var(--sab-accent) 10%, transparent);
  border:1px solid color-mix(in srgb, var(--sab-accent) 22%, transparent);
}
/* Live-indicator dot before the text — pulses on "listening"/"speaking",
   solid on "processing", invisible on "idle". Conveys direct contact
   without extra copy. */
.sab-voice-state-text::before{
  content:'';display:inline-block;
  width:9px;height:9px;border-radius:50%;
  background:var(--sab-accent);
  box-shadow:0 0 0 0 color-mix(in srgb, var(--sab-accent) 55%, transparent);
}
.sab-voice-active .sab-voice-state-text::before{
  animation:sab-live-dot 1.1s ease-in-out infinite;
}
@keyframes sab-live-dot{
  0%,100%{ box-shadow:0 0 0 0 color-mix(in srgb, var(--sab-accent) 55%, transparent); transform:scale(1); }
  50%    { box-shadow:0 0 0 8px color-mix(in srgb, var(--sab-accent) 0%, transparent); transform:scale(1.18); }
}
/* Anchor the active state so the chip never shrinks below readable size
   when voice is listening / speaking / processing — the moment the user
   most needs to see "l'assistant est là". */
.sab-voice-main:has(.sab-voice-active) .sab-voice-state-text{
  font-size:max(16px, calc(17px * var(--sab-voice-scale, 1)));
  min-height:22px;
}
.sab-voice-transcript{
  font-size:12px;color:var(--sab-text2);
  font-style:italic;text-align:center;
  max-width:260px;min-height:16px;
}
/* Bouton micro central — scaled with the rest of the voice zone so in
   compact mode it doesn't eat 58 px tall just to show a mic icon. Floor
   at 44 px (iOS touch-target guideline) via max(). */
.sab-root .sab-mic-main{
  width:max(44px, calc(52px * var(--sab-voice-scale, 1))) !important;
  height:max(44px, calc(52px * var(--sab-voice-scale, 1))) !important;
  border-radius:50% !important;
  flex:0 0 auto;aspect-ratio:1;
  background:var(--sab-accent) !important;
  border:none !important;cursor:pointer;color:#fff !important;
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 4px 16px rgba(0,0,0,.2);
  transition:transform .15s,box-shadow .15s;
}
.sab-root .sab-mic-main svg{width:24px !important;height:24px !important;stroke:#fff !important;fill:none !important;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;display:block !important;}
.sab-mic-main:hover{transform:scale(1.08);}
.sab-mic-main:active{transform:scale(.94);}
.sab-mic-main.sab-listening{animation:sab-pulse 1s ease-in-out infinite;}
@keyframes sab-pulse{0%,100%{box-shadow:0 4px 16px rgba(0,0,0,.2)}50%{box-shadow:0 4px 24px rgba(0,0,0,.35),0 0 0 8px rgba(0,0,0,.08)}}

.sab-hangup-btn{
  height:34px;padding:0 22px;border-radius:999px;
  border:1.5px solid var(--sab-border);background:var(--sab-surface);
  color:var(--sab-text2);font-size:12px;font-weight:700;
  cursor:pointer;font-family:inherit;
  transition:all .15s;
}
.sab-hangup-btn:hover{background:#FEF2F2;color:#DC2626;border-color:#FECACA;}

/* ── ZONE MESSAGES (affichée après la première réponse) ─────── */
/* Previously capped at 220 px which left plenty of room only when voice
   was idle — now the voice zone scales down once messages are visible
   (see --sab-voice-scale above), so give the conversation `flex:1` to
   take ALL the remaining height. The panel itself caps total height. */
.sab-messages{
  display:none;
  flex-direction:column;gap:10px;
  padding:14px;overflow-y:auto;
  flex:1 1 auto;min-height:0;
  scrollbar-width:thin;scrollbar-color:var(--sab-border) transparent;
}
.sab-messages.sab-visible{display:flex;}
.sab-bubble{
  max-width:88%;padding:10px 13px;border-radius:14px;
  font-size:13px;line-height:1.5;
  animation:sab-pop .18s ease;
}
@keyframes sab-pop{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}
.sab-bubble-user{
  background:var(--sab-bubble-user);color:#fff;
  align-self:flex-end;border-bottom-right-radius:3px;
}
.sab-bubble-assistant{
  background:var(--sab-bubble-bot);color:var(--sab-text);
  align-self:flex-start;border:1px solid var(--sab-border);
  border-bottom-left-radius:3px;
}
.sab-typing{display:flex;gap:7px;align-items:center;padding:14px 16px;}
/* ── STALL (stylish "please wait") ──────────────────────────────
   Shown immediately on send — a compact row of bouncing dots +
   rotating phrase so the user always sees the assistant is working.
   Adds a subtle shimmer sweep across the bubble (premium "thinking"
   vibe) + a gentle breathing scale so the bubble feels alive even
   while Gemini is still generating. */
.sab-stall{
  position:relative;
  display:flex;gap:10px;align-items:center;padding:12px 16px;
  font-style:italic;color:var(--sab-text-muted,#6b7280);
  overflow:hidden;  /* clip the shimmer to the bubble */
  animation:sab-stall-breath 2.4s ease-in-out infinite;
}
/* Shimmer: diagonal white-ish gradient sweeping L→R every ~2.6s.
   Lives on a pseudo-element so it doesn't interact with the text
   layer and has zero impact on layout. Uses the accent tint so
   every brand gets a cohesive wait animation without per-site CSS. */
.sab-stall::before{
  content:"";
  position:absolute;inset:0;
  background:linear-gradient(
    110deg,
    transparent 0%,
    transparent 35%,
    color-mix(in srgb, var(--sab-accent,#1d6d7f) 8%, transparent) 50%,
    transparent 65%,
    transparent 100%
  );
  background-size:220% 100%;
  animation:sab-stall-shimmer 2.6s linear infinite;
  pointer-events:none;
  border-radius:inherit;
}
.sab-stall > *{position:relative;z-index:1;}
.sab-stall-dots{display:inline-flex;gap:5px;align-items:center;}
.sab-stall-dots .sab-dot{width:7px;height:7px;}
.sab-stall-text{
  font-size:.93em;letter-spacing:.01em;
  animation:sab-stall-fade .5s ease;
}
@keyframes sab-stall-fade{from{opacity:0;transform:translateY(2px)}to{opacity:1;transform:none}}
@keyframes sab-stall-shimmer{
  0%   { background-position:   0% 0; }
  100% { background-position:-220% 0; }
}
@keyframes sab-stall-breath{
  0%,100% { transform:scale(1);    box-shadow:0 0 0 0 transparent; }
  50%     { transform:scale(1.005); box-shadow:0 2px 14px -6px color-mix(in srgb, var(--sab-accent,#1d6d7f) 25%, transparent); }
}
/* Respect users who ask for reduced motion — keep the phrase visible
   but strip the decorative animations. Accessibility win, same info. */
@media (prefers-reduced-motion: reduce){
  .sab-stall,.sab-stall::before{animation:none !important;}
}

/* ── CTA (Voulez-vous voir les fiches ?) ────────────────────────
   Soft card with a yes/no choice — keeps the chat clean and puts
   the user in control of when product cards appear. */
.sab-cta-wrap{display:flex;flex-direction:column;gap:10px;padding:14px 16px;}
.sab-cta-text{font-size:.95em;line-height:1.35;}
.sab-cta-row{display:flex;gap:8px;}
.sab-cta-btn{
  flex:1;padding:10px 14px;border-radius:10px;font-size:.9em;font-weight:600;
  cursor:pointer;border:1px solid transparent;transition:transform .1s ease,filter .15s ease;
}
.sab-cta-btn:active{transform:scale(.97);}
.sab-cta-btn-primary{background:var(--sab-accent);color:#fff;}
.sab-cta-btn-primary:hover{filter:brightness(1.08);}
.sab-cta-btn-secondary{background:transparent;color:var(--sab-text-muted,#6b7280);border-color:var(--sab-border);}
.sab-cta-btn-secondary:hover{background:rgba(0,0,0,.04);}
.sab-dot{width:9px;height:9px;border-radius:50%;background:var(--sab-accent);animation:sab-blink 1.1s infinite;}
.sab-dot:nth-child(2){animation-delay:.18s;}.sab-dot:nth-child(3){animation-delay:.36s;}
@keyframes sab-blink{0%,80%,100%{transform:scale(.7);opacity:.35}40%{transform:scale(1.1);opacity:1}}
/* Soft bridge phrase shown after 1.5s of waiting ("Un instant…") —
   italic, slightly muted, reads as a humane stall rather than a reply. */
.sab-bubble-stall{font-style:italic;color:var(--sab-text-muted,#6b7280);}
/* Thin progress shimmer at the top of the panel while a turn is pending.
   Appears as soon as the user sends; cleared when the reply starts or the
   turn errors out. Reassures the user that something's happening even
   when the connection is slow (3-4s first-token latency on cold keys). */
.sab-progress{
  position:absolute;top:0;left:0;right:0;height:3px;
  background:linear-gradient(90deg,transparent,var(--sab-accent),transparent);
  background-size:35% 100%;background-repeat:no-repeat;background-position:-35% 0;
  animation:sab-progress-slide 1.1s linear infinite;
  pointer-events:none;z-index:5;
  opacity:.95;
}
@keyframes sab-progress-slide{0%{background-position:-35% 0}100%{background-position:135% 0}}

/* ── CARTES PRODUITS ─────────────────────────────────────────────
   Horizontal layout, one card per row, full chat width. Modelled on the
   native Woo product summary (thumb left, title + short desc + price
   stacked right, CTA underneath) — the format customers already recognise
   from WooCommerce loops, which reduces cognitive load when it appears
   inside a conversational UI.
   Previous design was a 2-col grid with tight 190px cards that clipped
   titles and hid the short description entirely. */
.sab-cards{display:flex;flex-direction:column;gap:10px;margin-top:8px;}
.sab-card-item{
  background:var(--sab-surface);border:1.5px solid var(--sab-border);
  border-radius:12px;overflow:hidden;color:inherit;
  display:flex;flex-direction:column;
  transition:border-color .15s,transform .15s,box-shadow .15s;
}
.sab-card-item:hover{
  border-color:var(--sab-accent);
  transform:translateY(-1px);
  box-shadow:0 4px 14px rgba(0,0,0,.08);
}
/* Content row: thumb (left) + body (right). Clickable → product page. */
.sab-card-content{
  display:grid;grid-template-columns:96px 1fr;gap:0;
  text-decoration:none;color:inherit;cursor:pointer;
}
.sab-card-thumb{
  aspect-ratio:1/1;background:var(--sab-surface2);
  display:flex;align-items:center;justify-content:center;font-size:28px;
}
.sab-card-thumb img{width:100%;height:100%;object-fit:cover;display:block;}
.sab-card-body{
  padding:10px 12px;display:flex;flex-direction:column;gap:4px;
  min-width:0;
}
.sab-card-name{
  font-size:13px;font-weight:700;color:var(--sab-text);line-height:1.3;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
.sab-card-desc{
  font-size:12px;color:var(--sab-text-muted,#6b7280);line-height:1.35;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
.sab-card-price{
  font-size:14px;font-weight:900;color:var(--sab-accent);margin-top:auto;
}
.sab-card-price-regular{
  font-size:12px;font-weight:500;color:var(--sab-text-muted,#9ca3af);
  text-decoration:line-through;margin-left:6px;
}
/* Action bar — premium concierge affordances. Buttons split width evenly
   so 1/2/3 buttons always fill the card footer cleanly. */
.sab-card-actions{
  display:flex;border-top:1px solid rgba(0,0,0,.06);
}
.sab-card-btn{
  flex:1;margin:0;padding:9px 6px;border-radius:0;
  font-size:12px;font-weight:700;cursor:pointer;font-family:inherit;
  text-align:center;text-decoration:none;line-height:1.2;
  border:none;transition:opacity .15s,background .15s;
}
.sab-card-btn + .sab-card-btn{border-left:1px solid rgba(0,0,0,.06);}
.sab-card-btn:hover{opacity:.88;}
/* View product — outlined (navigate away) */
.sab-card-btn-view{
  background:transparent;color:var(--sab-accent);
}
/* Add to cart — primary accent (act in place) */
.sab-card-btn-atc{
  background:var(--sab-accent);color:#fff;font-weight:800;
}
.sab-card-btn-atc:disabled{cursor:default;opacity:.75;}
.sab-card-btn-atc-done{background:#10B981 !important;color:#fff !important;}
/* View cart — secondary accent, appears only after a successful add */
.sab-card-btn-cart{
  background:var(--sab-surface2);color:var(--sab-accent);font-weight:800;
}

/* ── INPUT TEXTE (compact, en bas) ──────────────────────────── */
.sab-input-area{
  padding:10px 12px;border-top:1px solid var(--sab-border);
  display:flex;gap:8px;align-items:flex-end;
  flex-shrink:0;background:var(--sab-surface);
}
.sab-input{
  flex:1;padding:8px 12px;
  border:1.5px solid var(--sab-border);border-radius:999px;
  font-size:13px;color:var(--sab-text);font-family:inherit;
  background:var(--sab-surface2);outline:none;resize:none;
  min-height:36px;max-height:80px;overflow-y:auto;
  transition:border-color .15s;
}
.sab-input:focus{border-color:var(--sab-accent);background:var(--sab-surface);}
.sab-input::placeholder{color:var(--sab-text3);}
.sab-root .sab-send-btn{
  width:36px !important;height:36px !important;border-radius:50% !important;
  background:var(--sab-accent) !important;border:none !important;color:#fff !important;
  cursor:pointer;flex-shrink:0;
  display:flex;align-items:center;justify-content:center;
  transition:transform .15s,opacity .15s;
}
.sab-root .sab-send-btn svg{width:14px !important;height:14px !important;fill:none !important;stroke:#fff !important;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;display:block !important;}
.sab-send-btn:hover{transform:scale(1.08);}
.sab-send-btn:disabled{opacity:.35;cursor:not-allowed;transform:none;}

/* ── OFFLINE ─────────────────────────────────────────────────── */
.sab-offline{
  padding:28px 20px;text-align:center;
  font-size:14px;color:var(--sab-text2);line-height:1.6;
}
.sab-offline-icon{font-size:32px;display:block;margin-bottom:10px;}

/* ── BRAND LOGO (optional, next to agent name) ───────────────── */
.sab-brand-logo{
  height:22px;width:auto;object-fit:contain;
  margin-left:6px;display:inline-block;
  filter:brightness(0) invert(1);opacity:.9;
}
.sab-brand-name{
  font-size:10px;font-weight:600;opacity:.8;color:#fff;
  letter-spacing:.2px;
}

/* ── MODE TOGGLE (text / voice / live) ───────────────────────── */
.sab-mode-pill{
  font-size:10px;font-weight:700;padding:3px 8px;border-radius:999px;
  background:rgba(255,255,255,.2);color:#fff;margin-left:8px;
  text-transform:uppercase;letter-spacing:.5px;
}
.sab-mode-live{
  background:linear-gradient(90deg,#F59E0B,#F97316);
  box-shadow:0 0 0 0 rgba(245,158,11,.5);
  animation:sab-live-pulse 2s infinite;
}
@keyframes sab-live-pulse{
  0%,100%{box-shadow:0 0 0 0 rgba(245,158,11,.4);}
  50%{box-shadow:0 0 0 6px rgba(245,158,11,0);}
}

/* ── CONNECTING spinner on voice avatar ──────────────────────── */
.sab-voice-connecting .sab-voice-avatar-img::after{
  content:"";
  position:absolute;inset:-4px;
  border-radius:50%;
  border:3px solid transparent;
  border-top-color:var(--sab-accent);
  animation:sab-spin .9s linear infinite;
}
@keyframes sab-spin{to{transform:rotate(360deg);}}

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media(max-width:600px){
  .sab-overlay{padding:0;align-items:flex-end;justify-content:center;}
  .sab-panel{width:100vw;max-height:88vh;border-radius:var(--sab-radius) var(--sab-radius) 0 0;}
  .sab-cards{grid-template-columns:1fr 1fr;}
}
