/* =============================================================
   AI Sales Agent — Chat Widget  ·  Dark Luxury Edition
   by Hiếu Lão Đại
   ============================================================= */

/* ─────────────────────────────────────────
   Keyframes
───────────────────────────────────────── */

/* Header light sweep — left → right */
@keyframes ai-header-sweep {
  0%         { background-position: -100% 0; }
  60%, 100%  { background-position: 200%  0; }
}

/* FAB glow breathe */
@keyframes ai-glow {
  0%, 100% { box-shadow: 0 0 18px rgba(255,255,255,0.07), 0 6px 24px rgba(0,0,0,0.75); }
  50%       { box-shadow: 0 0 30px rgba(255,255,255,0.15), 0 8px 32px rgba(0,0,0,0.85); }
}

/* FAB ring expand */
@keyframes ai-ring {
  0%   { transform: scale(1);   opacity: 0.5; }
  100% { transform: scale(2.1); opacity: 0; }
}

/* Window spring open */
@keyframes ai-window-open {
  0%   { opacity: 0; transform: translateY(26px) scale(0.93); }
  65%  { opacity: 1; transform: translateY(-3px)  scale(1.01); }
  100% {             transform: translateY(0)     scale(1); }
}

/* Message enter left */
@keyframes ai-msg-left {
  from { opacity: 0; transform: translateX(-14px) scale(0.96); }
  to   { opacity: 1; transform: translateX(0)     scale(1); }
}

/* Message enter right */
@keyframes ai-msg-right {
  from { opacity: 0; transform: translateX(14px) scale(0.96); }
  to   { opacity: 1; transform: translateX(0)    scale(1); }
}

/* Typing wave */
@keyframes ai-wave {
  0%, 60%, 100% { transform: translateY(0);   background: #444; }
  30%            { transform: translateY(-6px); background: #aaa; }
}

/* Typewriter cursor */
@keyframes ai-cursor {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* Ripple */
@keyframes ai-ripple {
  to { transform: scale(4.5); opacity: 0; }
}

/* Suggestions appear */
@keyframes ai-fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* macOS dot hover glow */
@keyframes ai-dot-pulse {
  0%, 100% { filter: brightness(1); }
  50%       { filter: brightness(1.35); }
}

/* Silver shimmer on brand name */
@keyframes ai-silver {
  0%   { background-position: 0%   center; }
  100% { background-position: 200% center; }
}

/* Badge */
@keyframes ai-badge {
  0%, 100% { transform: scale(1);    }
  40%       { transform: scale(1.22); }
}


/* ─────────────────────────────────────────
   FAB — Floating Action Button
───────────────────────────────────────── */

#ai-agent-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  cursor: pointer;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #2a2a2a 0%, #1a1a1a 50%, #0f0f0f 100%);
  animation: ai-glow 3s ease-in-out infinite;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s;
  overflow: hidden;
}
#ai-agent-toggle:hover  {
  transform: scale(1.1);
  border-color: rgba(255,255,255,0.2);
}
#ai-agent-toggle:active { transform: scale(0.94); }

#ai-agent-toggle svg {
  width: 24px;
  height: 24px;
  color: #aaa;
  flex-shrink: 0;
  transition: opacity 0.2s ease;
}

/* Ring behind FAB */
#ai-fab-ring {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.22);
  z-index: 9999;
  pointer-events: none;
  animation: ai-ring 2.5s ease-out infinite;
}

/* Badge */
#ai-fab-badge {
  position: fixed;
  bottom: 54px;
  right: 18px;
  width: 18px;
  height: 18px;
  background: #e11d48;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  border: 1.5px solid #0c0c0c;
  animation: ai-badge 1.8s ease-in-out infinite;
}
#ai-fab-badge.visible { display: flex; }


/* ─────────────────────────────────────────
   Chat Window
───────────────────────────────────────── */

#ai-agent-window {
  position: fixed;
  bottom: 94px;
  right: 24px;
  width: 385px;
  height: 628px;
  max-height: calc(100dvh - 110px);
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  overflow: hidden;
  z-index: 9998;
  background: #111111;
  border: 1px solid rgba(255,255,255,0.07);
  box-shadow:
    0 30px 70px -10px rgba(0,0,0,0.9),
    0 10px 30px -5px  rgba(0,0,0,0.7),
    0 0 0 1px         rgba(255,255,255,0.04) inset;
  /* closed */
  opacity: 0;
  pointer-events: none;
  transform: translateY(26px) scale(0.93);
  transform-origin: bottom right;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

#ai-agent-window.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  transition: opacity  0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: ai-window-open 0.42s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}


/* ─────────────────────────────────────────
   Header  (dark + light sweep L→R)
───────────────────────────────────────── */

.ai-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px 13px 16px;
  position: relative;
  overflow: hidden;
  /* Deep dark base */
  background: #0d0d0d;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* Sweeping light beam — the "ánh sáng trái → phải" */
.ai-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent      0%,
    transparent     30%,
    rgba(255,255,255,0.04) 45%,
    rgba(255,255,255,0.09) 50%,
    rgba(255,255,255,0.04) 55%,
    transparent     70%,
    transparent    100%
  );
  background-size: 300% 100%;
  animation: ai-header-sweep 5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  pointer-events: none;
}

/* Subtle top edge highlight */
.ai-header::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.12) 50%, transparent 100%);
}

.ai-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative; /* above ::before */
  z-index: 1;
}

/* ── macOS Traffic Light Dots ── */
.ai-mac-dots {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.ai-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: block;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.ai-dot-red    { background: #ff5f57; box-shadow: 0 0 6px rgba(255, 95, 87, 0.5); }
.ai-dot-yellow { background: #febc2e; box-shadow: 0 0 6px rgba(254,188, 46, 0.5); }
.ai-dot-green  { background: #28c840; box-shadow: 0 0 6px rgba( 40,200, 64, 0.5); }

.ai-mac-dots:hover .ai-dot-red    { filter: brightness(1.2); transform: scale(1.1); }
.ai-mac-dots:hover .ai-dot-yellow { filter: brightness(1.2); transform: scale(1.1); animation-delay: 0.05s; }
.ai-mac-dots:hover .ai-dot-green  { filter: brightness(1.2); transform: scale(1.1); animation-delay: 0.1s; }

/* Divider line between dots and title */
.ai-header-divider {
  width: 1px;
  height: 22px;
  background: rgba(255,255,255,0.1);
  flex-shrink: 0;
}

.ai-header-title {
  font-size: 14px;
  font-weight: 600;
  color: #bdbdbd;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.ai-header-subtitle {
  font-size: 11px;
  color: #777;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
  letter-spacing: 0.02em;
}

.ai-online-indicator {
  width: 6px;
  height: 6px;
  background: #22c55e;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  box-shadow: 0 0 5px rgba(34,197,94,0.6);
}

/* Header action buttons */
.ai-header-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  position: relative;
  z-index: 1;
}

.ai-header-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  transition: background 0.15s ease, color 0.15s ease;
}
.ai-header-btn:hover {
  background: rgba(255,255,255,0.07);
  color: #ccc;
}
.ai-header-btn svg { width: 15px; height: 15px; }


/* ─────────────────────────────────────────
   Messages Body
───────────────────────────────────────── */

#ai-agent-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #0f0f0f;
  scroll-behavior: smooth;
}

/* Thin dark scrollbar */
#ai-agent-body::-webkit-scrollbar { width: 3px; }
#ai-agent-body::-webkit-scrollbar-track { background: transparent; }
#ai-agent-body::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
}
#ai-agent-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.16);
}

/* Message row animations */
.ai-msg-row-left  { animation: ai-msg-left  0.36s cubic-bezier(0.34,1.56,0.64,1) both; }
.ai-msg-row-right { animation: ai-msg-right 0.36s cubic-bezier(0.34,1.56,0.64,1) both; }

/* Bot mini avatar — replaces robot emoji */
.ai-bot-mini {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: #1e1e1e;
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 9px;
  font-weight: 700;
  color: #666;
  letter-spacing: 0.02em;
}

/* Bot bubble */
.ai-bubble-bot {
  padding: 10px 13px;
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  background: #1a1a1a;
  border: 1px solid rgba(255,255,255,0.06);
  color: #ebebeb;
  font-size: 13px;
  line-height: 1.65;
  word-break: break-word;
  max-width: 100%;
}

/* Rich text trong bubble bot — link chỉ hiện icon */
.ai-bubble-bot .ai-msg-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  margin: 0 1px;
  padding: 3px;
  border-radius: 6px;
  color: #5eead4;
  background: rgba(94, 234, 212, 0.08);
  border: 1px solid rgba(94, 234, 212, 0.22);
  text-decoration: none;
  line-height: 0;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.ai-bubble-bot .ai-msg-link:hover {
  color: #99f6e4;
  background: rgba(153, 246, 228, 0.12);
  border-color: rgba(153, 246, 228, 0.35);
}
.ai-bubble-bot .ai-msg-link .ai-msg-link-svg {
  display: block;
  flex-shrink: 0;
}

.ai-msg-strong {
  color: #f5f5f5;
  font-weight: 700;
}

.ai-msg-code {
  background: #222;
  border: 1px solid rgba(255,255,255,0.08);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.86em;
  color: #c4b5fd;
}

.ai-msg-price {
  color: #fcd34d;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.ai-msg-bullet { color: #64748b; }

.ai-msg-ok { color: #22c55e; }
.ai-msg-bad { color: #f87171; }
.ai-msg-money { color: #fbbf24; }

/* User bubble */
.ai-bubble-user {
  padding: 10px 13px;
  border-radius: 16px;
  border-bottom-right-radius: 4px;
  background: #1e1e2a;
  border: 1px solid rgba(100,100,200,0.12);
  color: #e9e9e9;
  font-size: 13px;
  line-height: 1.65;
  word-break: break-word;
  max-width: 78%;
}

/* Typewriter cursor */
.ai-typing-cursor::after {
  content: '▋';
  animation: ai-cursor 0.65s step-end infinite;
  color: #555;
  font-size: 0.82em;
  margin-left: 1px;
}


/* ─────────────────────────────────────────
   Typing Indicator
───────────────────────────────────────── */

.ai-typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #444;
}
.ai-typing-dot:nth-child(1) { animation: ai-wave 1.2s ease-in-out infinite 0s; }
.ai-typing-dot:nth-child(2) { animation: ai-wave 1.2s ease-in-out infinite 0.2s; }
.ai-typing-dot:nth-child(3) { animation: ai-wave 1.2s ease-in-out infinite 0.4s; }


/* ─────────────────────────────────────────
   Product Cards  (dark)
───────────────────────────────────────── */

/* Danh sách SP: tối đa ~3 thẻ hiển thị, phần còn lại cuộn */
.ai-product-cards-scroll {
  max-height: 300px;
  overflow-y: auto;
  overflow-x: hidden;
  margin-top: 6px;
  padding-right: 4px;
  border-radius: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.12) transparent;
}
.ai-product-cards-scroll::-webkit-scrollbar {
  width: 4px;
}
.ai-product-cards-scroll::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
}
.ai-product-cards-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ai-product-body {
  flex: 1;
  min-width: 0;
}

.ai-product-card {
  display: flex;
  gap: 10px;
  align-items: center;
  background: #1c1c1c;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 13px;
  padding: 9px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.ai-product-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.14);
  box-shadow: 0 8px 24px rgba(0,0,0,0.6);
}

.ai-product-img-wrap { position: relative; flex-shrink: 0; }

.ai-product-img {
  width: 52px;
  height: 52px;
  border-radius: 9px;
  object-fit: cover;
  background: #2a2a2a;
  display: block;
  border: 1px solid rgba(255,255,255,0.06);
}

.ai-discount-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #dc2626;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 99px;
  line-height: 1;
}

.ai-product-name {
  font-size: 12px;
  font-weight: 500;
  color: #969696;
  line-height: 1.35;
  margin-bottom: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ai-product-size {
  font-size: 10px;
  color: #888;
  margin-bottom: 3px;
}
.ai-product-size strong {
  color: #b8b8b8;
  font-weight: 600;
}

.ai-product-price-row {
  margin-top: 2px;
}

.ai-product-price-range {
  font-size: 12px;
  font-weight: 700;
  color: #e7e7e7;
  font-variant-numeric: tabular-nums;
}

.ai-product-sizes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 5px;
}
.ai-size-chip {
  font-size: 9px;
  font-weight: 600;
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.2);
  padding: 2px 6px;
  border-radius: 6px;
}
.ai-size-more {
  font-size: 9px;
  color: #555;
  align-self: center;
}

.ai-product-var-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 2px;
}
.ai-product-var-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 10px;
  line-height: 1.35;
}
.ai-product-var-size {
  color: #888;
  flex-shrink: 0;
}
.ai-product-var-price {
  color: #c4c4c4;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.ai-product-price-sale {
  font-size: 13px;
  font-weight: 700;
  color: #b4b4b4;
}

.ai-product-price-orig {
  font-size: 11px;
  color: #444;
  text-decoration: line-through;
  margin-left: 5px;
}

.ai-product-tag {
  font-size: 10px;
  color: #4ade80;
  font-weight: 500;
  margin-top: 3px;
  opacity: 0.8;
}


/* ─────────────────────────────────────────
   Quick Action Chips  (dark)
───────────────────────────────────────── */

.ai-action-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 500;
  border: 1px solid rgba(255,255,255,0.12);
  color: #999;
  background: #1c1c1c;
  cursor: pointer;
  transition: all 0.18s ease;
  animation: ai-fade-up 0.3s ease both;
}
.ai-action-chip:hover {
  background: #282828;
  color: #eee;
  border-color: rgba(255,255,255,0.25);
  transform: translateY(-1px);
}


/* ─────────────────────────────────────────
   Suggestion Chips  (dark)
───────────────────────────────────────── */

#ai-suggestions {
  /* nằm cuối #ai-agent-body, sau welcome msg và các messages */
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 4px 0 6px;
  flex-shrink: 0;
  animation: ai-fade-up 0.4s ease both;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
#ai-suggestions.hiding {
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
}

.ai-sug-btn {
  padding: 5px 12px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 500;
  background: #181818;
  border: 1px solid rgba(255,255,255,0.1);
  color: #888;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
}
.ai-sug-btn:hover {
  background: #252525;
  border-color: rgba(255,255,255,0.22);
  color: #ddd;
  transform: translateY(-1px);
}


/* ─────────────────────────────────────────
   Footer / Input  (dark)
───────────────────────────────────────── */

.ai-footer {
  flex-shrink: 0;
  padding: 11px 13px 9px;
  background: #111;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.ai-input-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.ai-input-wrap {
  flex: 1;
  display: flex;
  align-items: flex-end;
  background: #1a1a1a;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 8px 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.ai-input-wrap:focus-within {
  border-color: rgba(255,255,255,0.2);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.03);
}

#ai-agent-input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  box-shadow: none;
  resize: none;
  font-size: 13px;
  line-height: 1.5;
  color: #a0a0a0;
  max-height: 96px;
  font-family: 'Inter', -apple-system, sans-serif;
  min-height: unset;
}
#ai-agent-input:focus {
  outline: none;
  box-shadow: none;
}
#ai-agent-input::placeholder { color: #555; }

#ai-agent-send {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(145deg, #252525, #1a1a1a);
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
  transition: transform 0.15s ease, box-shadow 0.15s ease,
              background 0.15s ease, opacity 0.15s ease;
  overflow: hidden;
}
#ai-agent-send:hover:not(:disabled) {
  background: linear-gradient(145deg, #333, #222);
  border-color: rgba(255,255,255,0.18);
  transform: scale(1.06);
  box-shadow: 0 4px 14px rgba(0,0,0,0.7);
}
#ai-agent-send:active:not(:disabled) { transform: scale(0.95); }
#ai-agent-send:disabled { opacity: 0.3; cursor: not-allowed; }
#ai-agent-send svg { width: 15px; height: 15px; color: #aaa; flex-shrink: 0; }

/* ── Branding ── */
.ai-brand {
  text-align: center;
  font-size: 10px;
  color: #555;
  margin-top: 7px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ai-brand-name {
  font-weight: 700;
  letter-spacing: 0.04em;
  background: linear-gradient(90deg,
    #666 0%, #999 20%, #ddd 40%, #fff 50%, #ddd 60%, #999 80%, #666 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: ai-silver 3.5s linear infinite;
}


/* ─────────────────────────────────────────
   Ripple
───────────────────────────────────────── */

.ai-ripple-span {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  transform: scale(0);
  animation: ai-ripple 0.55s linear;
  pointer-events: none;
}


/* ─────────────────────────────────────────
   Teaser Bubble  (attention grabber)
───────────────────────────────────────── */

@keyframes ai-teaser-float {
  0%, 100% { transform: translateY(0);    }
  50%       { transform: translateY(-7px); }
}

#ai-teaser-bubble {
  position: fixed;
  bottom: 90px;
  right: 22px;
  z-index: 10000;
  pointer-events: none;
  animation: ai-teaser-float 3.8s ease-in-out infinite;
}

#ai-teaser-bubble.visible { pointer-events: auto; cursor: pointer; }

.ai-teaser-inner {
  position: relative;
  background: #1c1c1c;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  border-bottom-right-radius: 5px;
  padding: 10px 30px 10px 13px;
  box-shadow:
    0 10px 32px rgba(0,0,0,0.75),
    0 0 0 1px rgba(255,255,255,0.04) inset;

  /* Pop-in via transition */
  opacity: 0;
  transform: translateY(10px) scale(0.87);
  transform-origin: bottom right;
  transition:
    opacity   0.38s cubic-bezier(0.34, 1.56, 0.64, 1),
    transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#ai-teaser-bubble.visible .ai-teaser-inner {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Speech bubble tail pointing down-right toward FAB */
.ai-teaser-inner::after {
  content: '';
  position: absolute;
  bottom: -7px;
  right: 18px;
  width: 13px;
  height: 13px;
  background: #1c1c1c;
  border-right: 1px solid rgba(255,255,255,0.1);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  transform: rotate(45deg);
  border-radius: 0 0 3px 0;
}

.ai-teaser-msg {
  font-size: 13px;
  color: #a0a0a0;
  line-height: 1.5;
  font-family: 'Inter', -apple-system, sans-serif;
  white-space: nowrap;
  transition: opacity 0.18s ease;
}
.ai-teaser-msg.fade { opacity: 0; }

/* Dismiss × */
.ai-teaser-x {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #252525;
  border: 1px solid rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  font-size: 9px;
  cursor: pointer;
  line-height: 1;
  z-index: 1;
  transition: color 0.15s ease, background 0.15s ease;
}
.ai-teaser-x:hover { color: #aaa; background: #333; }


/* ─────────────────────────────────────────
   Mobile
───────────────────────────────────────── */

@media (max-width: 480px) {
  #ai-agent-window {
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    transform-origin: bottom center !important;
  }
  #ai-agent-toggle { bottom: 16px; right: 16px; }
  #ai-fab-ring     { bottom: 16px; right: 16px; }
  #ai-fab-badge    { bottom: 46px; right: 10px; }
  #ai-teaser-bubble { right: 16px; }
}
