/* ════════════════════════════════════════════════════════════
 *  css/ai/ai-chat.css — Boa Mesa AI concierge styles
 *
 *  ALL selectors are namespaced under `.bm-ai-*` / `#bm-ai-*`.
 *  Nothing here touches platform classes. Deleting this file
 *  (and the AI <script> tags) removes every visual trace.
 *
 *  Design language:
 *    - Cream surface, dark text, gold accents (matches the
 *      platform's --primary / --accent / --bg tokens).
 *    - Cormorant Garamond for the panel title, Inter for body.
 *    - 18–22px border-radius. Subtle shadows. Quiet motion.
 *    - Never bigger than 480px on desktop.
 * ════════════════════════════════════════════════════════════ */

/* ── Tokens (scoped) ─────────────────────────────────────── */
#bm-ai-fab, #bm-ai-root {
  --bm-ai-bg:           var(--bg, #F5F0E8);
  --bm-ai-bg-soft:      var(--bg-2, #EDE8DF);
  --bm-ai-text:         var(--text, #1A1714);
  --bm-ai-text-sub:     var(--text-sub, #4A4540);
  --bm-ai-text-muted:   var(--text-muted, #8A8278);
  --bm-ai-primary:      var(--primary, #1A5C3A);
  --bm-ai-primary-dark: var(--primary-dark, #0F3A22);
  --bm-ai-accent:       var(--accent, #C9A84C);
  --bm-ai-accent-dark:  var(--accent-dark, #A8882E);
  --bm-ai-border:       rgba(0, 0, 0, .08);
  --bm-ai-border-soft:  rgba(0, 0, 0, .04);
  --bm-ai-shadow:       0 18px 48px rgba(15, 58, 34, .14),
                        0 4px 12px rgba(0, 0, 0, .06);
  --bm-ai-font-display: var(--font-display, 'Cormorant Garamond', Georgia, serif);
  --bm-ai-font-body:    var(--font-body, 'Inter', -apple-system, sans-serif);
  --bm-ai-safe-bottom:  env(safe-area-inset-bottom, 0px);
}

/* Dark theme — inherits when the host app sets data-theme="dark" */
[data-theme="dark"] #bm-ai-fab,
[data-theme="dark"] #bm-ai-root {
  --bm-ai-bg:           #141210;
  --bm-ai-bg-soft:      #1E1B17;
  --bm-ai-text:         #F5F0E8;
  --bm-ai-text-sub:     #C9C2B5;
  --bm-ai-text-muted:   #8A8278;
  --bm-ai-border:       rgba(255, 255, 255, .08);
  --bm-ai-border-soft:  rgba(255, 255, 255, .04);
  --bm-ai-shadow:       0 18px 48px rgba(0, 0, 0, .55),
                        0 4px 12px rgba(0, 0, 0, .35);
}

/* ── Floating action button ──────────────────────────────── */
#bm-ai-fab {
  position: fixed;
  /* Mobile: above bottom nav (76px) + a touch of breathing room. */
  bottom: calc(76px + var(--bm-ai-safe-bottom) + 14px);
  right: 14px;
  z-index: 9990;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 10px 12px;
  border: none;
  border-radius: 999px;
  font-family: var(--bm-ai-font-body);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--bm-ai-bg);
  background: linear-gradient(135deg, var(--bm-ai-primary) 0%, var(--bm-ai-primary-dark) 100%);
  box-shadow:
    0 12px 28px rgba(15, 58, 34, .28),
    0 2px 6px rgba(0, 0, 0, .12),
    inset 0 1px 0 rgba(255, 255, 255, .12);
  cursor: pointer;
  transition: transform 220ms cubic-bezier(.2, .8, .2, 1),
              box-shadow 220ms ease;
  -webkit-tap-highlight-color: transparent;
}
#bm-ai-fab:hover { transform: translateY(-1px); }
#bm-ai-fab:active { transform: translateY(0) scale(.98); }
#bm-ai-fab .bm-ai-fab-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bm-ai-accent), var(--bm-ai-accent-dark));
  color: var(--bm-ai-primary-dark);
  flex-shrink: 0;
}
#bm-ai-fab .bm-ai-fab-label {
  font-family: var(--bm-ai-font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
#bm-ai-fab .bm-ai-fab-glow {
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  background: radial-gradient(closest-side, rgba(201, 168, 76, .35), transparent 70%);
  filter: blur(8px);
  z-index: -1;
  opacity: 0;
  transition: opacity 280ms ease;
}
#bm-ai-fab:hover .bm-ai-fab-glow { opacity: 1; }

/* Desktop / portal: pin bottom-right since there's no bottom nav. */
body[data-portal="desktop"] #bm-ai-fab,
@media (min-width: 1024px) {
  #bm-ai-fab { bottom: 24px; right: 24px; padding: 12px 18px 12px 14px; }
  #bm-ai-fab .bm-ai-fab-label { font-size: 1rem; }
}

/* On admin pages the FAB defaults to bottom-right (no bottom nav). */
body.admin-body #bm-ai-fab { bottom: 24px; right: 24px; }

/* ── Backdrop + container ────────────────────────────────── */
#bm-ai-root {
  position: fixed;
  inset: 0;
  z-index: 9991;
  pointer-events: none;
}
#bm-ai-root .bm-ai-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 12, 8, .42);
  opacity: 0;
  transition: opacity 220ms ease;
  pointer-events: none;
}
#bm-ai-root.is-open .bm-ai-backdrop {
  opacity: 1;
  pointer-events: auto;
}

/* ── Panel (mobile sheet by default) ─────────────────────── */
#bm-ai-root .bm-ai-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  max-height: 88vh;
  height: 88vh;
  background: var(--bm-ai-bg);
  color: var(--bm-ai-text);
  border-top-left-radius: 22px;
  border-top-right-radius: 22px;
  box-shadow: var(--bm-ai-shadow);
  transform: translateY(102%);
  transition: transform 240ms cubic-bezier(.2, .8, .2, 1);
  pointer-events: auto;
  font-family: var(--bm-ai-font-body);
  /* Account for iOS home indicator */
  padding-bottom: var(--bm-ai-safe-bottom);
}
#bm-ai-root.is-open .bm-ai-panel { transform: translateY(0); }

/* Drawer mode on wide viewports OR explicit desktop surface. */
@media (min-width: 1024px) {
  #bm-ai-root[data-surface="desktop"] .bm-ai-panel,
  #bm-ai-root[data-surface="mobile"] .bm-ai-panel {
    top: 20px;
    bottom: 20px;
    right: 20px;
    left: auto;
    width: 440px;
    max-width: 440px;
    height: auto;
    max-height: none;
    border-radius: 22px;
    transform: translateX(120%);
    padding-bottom: 0;
  }
  #bm-ai-root.is-open[data-surface="desktop"] .bm-ai-panel,
  #bm-ai-root.is-open[data-surface="mobile"] .bm-ai-panel {
    transform: translateX(0);
  }
}

/* ── Head ────────────────────────────────────────────────── */
#bm-ai-root .bm-ai-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--bm-ai-border-soft);
  /* Sheet handle (mobile only) */
  position: relative;
}
@media (max-width: 1023px) {
  #bm-ai-root[data-surface="mobile"] .bm-ai-head::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 38px;
    height: 4px;
    border-radius: 2px;
    background: rgba(0, 0, 0, .12);
  }
  #bm-ai-root[data-surface="mobile"] .bm-ai-head { padding-top: 18px; }
}
#bm-ai-root .bm-ai-head-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
#bm-ai-root .bm-ai-head-mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bm-ai-accent), var(--bm-ai-accent-dark));
  color: var(--bm-ai-primary-dark);
  flex-shrink: 0;
}
#bm-ai-root .bm-ai-head-title {
  font-family: var(--bm-ai-font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--bm-ai-text);
  line-height: 1.1;
}
#bm-ai-root .bm-ai-head-sub {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--bm-ai-text-muted);
  text-transform: uppercase;
  margin-top: 2px;
}
#bm-ai-root .bm-ai-head-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
#bm-ai-root .bm-ai-head-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--bm-ai-text-muted);
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}
#bm-ai-root .bm-ai-head-btn:hover {
  background: var(--bm-ai-bg-soft);
  color: var(--bm-ai-text);
}
#bm-ai-root .bm-ai-close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--bm-ai-text-sub);
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
  flex-shrink: 0;
}
#bm-ai-root .bm-ai-close:hover {
  background: var(--bm-ai-bg-soft);
  color: var(--bm-ai-text);
}

/* ── Body ────────────────────────────────────────────────── */
#bm-ai-root .bm-ai-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 14px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Greeting */
#bm-ai-root .bm-ai-greeting {
  background: var(--bm-ai-bg-soft);
  border: 1px solid var(--bm-ai-border-soft);
  border-radius: 16px;
  padding: 14px 16px;
  margin: 4px 0 6px;
}
#bm-ai-root .bm-ai-greeting p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--bm-ai-text);
}

/* Suggestion chips */
#bm-ai-root .bm-ai-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 8px;
}
#bm-ai-root .bm-ai-chip {
  font-family: var(--bm-ai-font-body);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--bm-ai-border);
  background: var(--bm-ai-bg);
  color: var(--bm-ai-text-sub);
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, transform 160ms ease;
  -webkit-tap-highlight-color: transparent;
}
#bm-ai-root .bm-ai-chip:hover {
  border-color: var(--bm-ai-accent);
  color: var(--bm-ai-text);
}
#bm-ai-root .bm-ai-chip:active { transform: scale(.97); }

/* Messages */
#bm-ai-root .bm-ai-msg {
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: bm-ai-fade-in 220ms ease both;
}
#bm-ai-root .bm-ai-msg-user { align-items: flex-end; }
#bm-ai-root .bm-ai-msg-assistant { align-items: flex-start; }

#bm-ai-root .bm-ai-bubble {
  max-width: 86%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.92rem;
  line-height: 1.5;
  word-wrap: break-word;
}
#bm-ai-root .bm-ai-msg-user .bm-ai-bubble {
  background: var(--bm-ai-primary);
  color: var(--bm-ai-bg);
  border-bottom-right-radius: 6px;
}
#bm-ai-root .bm-ai-msg-assistant .bm-ai-bubble {
  background: var(--bm-ai-bg-soft);
  color: var(--bm-ai-text);
  border-bottom-left-radius: 6px;
}
#bm-ai-root .bm-ai-msg-assistant .bm-ai-bubble p { margin: 0 0 6px; }
#bm-ai-root .bm-ai-msg-assistant .bm-ai-bubble p:last-child { margin-bottom: 0; }
#bm-ai-root .bm-ai-list {
  margin: 4px 0 6px;
  padding: 0;
  list-style: none;
}
#bm-ai-root .bm-ai-list li {
  position: relative;
  padding: 3px 0 3px 14px;
}
#bm-ai-root .bm-ai-list li::before {
  content: '•';
  position: absolute;
  left: 2px;
  color: var(--bm-ai-accent-dark);
  font-weight: 700;
}

/* Notices (rate-limit, unavailable, etc.) */
#bm-ai-root .bm-ai-msg-notice { align-items: stretch; }
#bm-ai-root .bm-ai-notice {
  background: linear-gradient(135deg,
    rgba(201, 168, 76, .12),
    rgba(201, 168, 76, .04));
  border: 1px solid rgba(201, 168, 76, .35);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#bm-ai-root .bm-ai-notice-text {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--bm-ai-text);
}
#bm-ai-root .bm-ai-notice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
#bm-ai-root .bm-ai-notice-cta {
  font-family: var(--bm-ai-font-body);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  border: none;
  background: var(--bm-ai-primary);
  color: var(--bm-ai-bg);
  cursor: pointer;
  transition: opacity 160ms ease;
  display: inline-flex;
  align-items: center;
}
#bm-ai-root .bm-ai-notice-cta:hover { opacity: .92; }
#bm-ai-root .bm-ai-notice-cta-secondary {
  background: transparent;
  color: var(--bm-ai-primary);
  border: 1px solid var(--bm-ai-primary);
}
#bm-ai-root .bm-ai-notice-cta-secondary:hover {
  background: var(--bm-ai-primary);
  color: var(--bm-ai-bg);
  opacity: 1;
}

/* v2.7.2 — Gui mascot block, shown above the notice text on the
   "cannot_answer" fallback. Uses the same cream/gold motif as the
   notice card so it reads as one unit, with the avatar floated to
   the top-left and a "Gui" caption underneath. The fallback class
   .bm-ai-gui-avatar-fallback bumps the padding down a little when
   the SVG is missing and the logo PNG steps in. */
#bm-ai-root .bm-ai-msg-gui { align-items: stretch; }
#bm-ai-root .bm-ai-gui {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
}
#bm-ai-root .bm-ai-gui-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bm-ai-bg, #F6F1E7);
  border: 1.5px solid rgba(201, 168, 76, .55);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
  object-fit: cover;
  display: block;
}
#bm-ai-root .bm-ai-gui-avatar-fallback {
  padding: 6px;
  object-fit: contain;
}
#bm-ai-root .bm-ai-gui-name {
  font-family: var(--bm-ai-font-display, 'Cormorant Garamond', serif);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--bm-ai-primary, #1A5C3A);
  text-transform: uppercase;
}
#bm-ai-root .bm-ai-msg-gui .bm-ai-notice {
  background: linear-gradient(135deg,
    rgba(26, 92, 58, .06),
    rgba(201, 168, 76, .06));
  border-color: rgba(201, 168, 76, .45);
}

/* Actions row */
#bm-ai-root .bm-ai-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
#bm-ai-root .bm-ai-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--bm-ai-font-body);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid var(--bm-ai-border);
  background: var(--bm-ai-bg);
  color: var(--bm-ai-primary);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}
#bm-ai-root .bm-ai-action:hover {
  border-color: var(--bm-ai-primary);
  background: var(--bm-ai-primary);
  color: var(--bm-ai-bg);
}

/* ── v2.1.3: Restaurant / Event cards ───────────────────── */
/*  Horizontal scrolling row of rich cards rendered when the
    AI emits open_restaurant or open_event actions. Cards
    inherit the restaurant data from window.MockData.        */
#bm-ai-root .bm-ai-cards {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  margin: 6px 0 4px;
  padding: 2px 2px 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,.2) transparent;
}
#bm-ai-root .bm-ai-cards::-webkit-scrollbar { height: 6px; }
#bm-ai-root .bm-ai-cards::-webkit-scrollbar-track { background: transparent; }
#bm-ai-root .bm-ai-cards::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,.15);
  border-radius: 4px;
}

#bm-ai-root .bm-ai-card {
  flex: 0 0 auto;
  width: 200px;
  border: 1px solid var(--bm-ai-border);
  border-radius: 14px;
  background: var(--bm-ai-bg);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  padding: 0;
  font-family: inherit;
  color: var(--bm-ai-text);
  scroll-snap-align: start;
  transition: transform 200ms cubic-bezier(.2,.8,.2,1),
              box-shadow 200ms ease,
              border-color 160ms ease;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
#bm-ai-root .bm-ai-card:hover {
  transform: translateY(-2px);
  border-color: var(--bm-ai-primary);
  box-shadow:
    0 12px 28px rgba(15, 58, 34, .14),
    0 2px 6px rgba(0, 0, 0, .06);
}
#bm-ai-root .bm-ai-card:active { transform: translateY(0) scale(.985); }

#bm-ai-root .bm-ai-card-img {
  display: block;
  width: 100%;
  height: 110px;
  object-fit: cover;
  background: var(--bm-ai-bg-soft);
  border-bottom: 1px solid var(--bm-ai-border-soft);
}
#bm-ai-root .bm-ai-card-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bm-ai-bg-soft), var(--bm-ai-bg));
  color: var(--bm-ai-text-muted);
}

#bm-ai-root .bm-ai-card-kind {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: var(--bm-ai-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
}

#bm-ai-root .bm-ai-card-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
#bm-ai-root .bm-ai-card-name {
  font-family: var(--bm-ai-font-display);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  color: var(--bm-ai-text);
  line-height: 1.2;
  /* Two-line clamp */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
#bm-ai-root .bm-ai-card-sub {
  font-size: 0.72rem;
  color: var(--bm-ai-text-muted);
  font-weight: 500;
  margin-top: 2px;
  /* One-line clamp */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#bm-ai-root .bm-ai-card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}
#bm-ai-root .bm-ai-card-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.66rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(201, 168, 76, .14);
  color: var(--bm-ai-accent-dark);
  letter-spacing: .02em;
}
#bm-ai-root .bm-ai-card-chip svg { display: block; }
#bm-ai-root .bm-ai-card-chip-price {
  background: rgba(26, 92, 58, .1);
  color: var(--bm-ai-primary);
}

/* Mobile: slightly larger cards for thumb-friendly tap targets */
@media (max-width: 480px) {
  #bm-ai-root .bm-ai-card { width: 188px; }
  #bm-ai-root .bm-ai-card-img { height: 104px; }
}

/* Typing indicator */
#bm-ai-root .bm-ai-typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 50px;
}
#bm-ai-root .bm-ai-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--bm-ai-text-muted);
  animation: bm-ai-typing 1.2s infinite ease-in-out;
}
#bm-ai-root .bm-ai-typing span:nth-child(2) { animation-delay: .15s; }
#bm-ai-root .bm-ai-typing span:nth-child(3) { animation-delay: .30s; }

@keyframes bm-ai-typing {
  0%, 60%, 100% { transform: translateY(0); opacity: .4; }
  30%           { transform: translateY(-4px); opacity: 1; }
}
@keyframes bm-ai-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Foot (input row) ────────────────────────────────────── */
#bm-ai-root .bm-ai-foot {
  padding: 10px 14px 14px;
  border-top: 1px solid var(--bm-ai-border-soft);
  background: var(--bm-ai-bg);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
#bm-ai-root .bm-ai-input-wrap {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: var(--bm-ai-bg-soft);
  border: 1px solid var(--bm-ai-border);
  border-radius: 14px;
  padding: 6px 6px 6px 12px;
  transition: border-color 160ms ease;
}
#bm-ai-root .bm-ai-input-wrap:focus-within {
  border-color: var(--bm-ai-primary);
}
#bm-ai-root #bm-ai-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--bm-ai-font-body);
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--bm-ai-text);
  resize: none;
  padding: 6px 0;
  max-height: 120px;
}
#bm-ai-root #bm-ai-input::placeholder {
  color: var(--bm-ai-text-muted);
}
#bm-ai-root .bm-ai-send {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: var(--bm-ai-primary);
  color: var(--bm-ai-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 160ms ease, transform 160ms ease;
  flex-shrink: 0;
}
#bm-ai-root .bm-ai-send:hover { opacity: .92; }
#bm-ai-root .bm-ai-send:active { transform: scale(.96); }
#bm-ai-root .bm-ai-send[disabled] { opacity: .5; cursor: not-allowed; }
#bm-ai-root .bm-ai-hint {
  font-size: 0.68rem;
  color: var(--bm-ai-text-muted);
  text-align: center;
  letter-spacing: 0.01em;
}

/* ── Body lock when sheet open (mobile only) ─────────────── */
body.bm-ai-lock {
  overflow: hidden;
  /* Don't force position:fixed — iOS hates that here. */
}

/* ── Small-mobile niceties ───────────────────────────────── */
@media (max-width: 380px) {
  #bm-ai-fab .bm-ai-fab-label { display: none; }
  #bm-ai-fab { padding: 10px; }
}

/* ── Reduced motion respect ──────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  #bm-ai-root .bm-ai-panel,
  #bm-ai-root .bm-ai-backdrop,
  #bm-ai-root .bm-ai-msg,
  #bm-ai-fab {
    transition: none !important;
    animation: none !important;
  }
}
