/* ═════════════════════════════════════════════════════════════
   ABest Cardio — Widget v5.0.0  |  SVG fix + chips redesign
═════════════════════════════════════════════════════════════ */
:root {
  --abst-teal:       #56aeb8;
  --abst-teal-dark:  #3d8a93;
  --abst-teal-deep:  #2a6670;
  --abst-teal-pale:  #e4f4f6;
  --abst-teal-50:    #f7fcfd;
  --abst-bg:         #f8fafc;
  --abst-text:       #0f172a;
  --abst-text-soft:  #334155;
  --abst-muted:      #64748b;
  --abst-border:     #e2e8f0;
  --abst-border-mid: #cbd5e1;
  --abst-green:      #10b981;
  --abst-gold:       #f59e0b;
  --abst-red:        #ef4444;
  --abst-shadow-fl:  0 20px 60px rgba(15, 23, 42, .25);
  --abst-shadow-sm:  0 1px 3px rgba(15, 23, 42, .06);
  --abst-shadow-md:  0 4px 12px rgba(86, 174, 184, .15);
  --abst-touch:      44px;
  --abst-grad:       linear-gradient(135deg, #56aeb8 0%, #2a6670 100%);
  --abst-grad-soft:  linear-gradient(135deg, #6dbdc6 0%, #3d8a93 100%);
  --abst-safe-b:     env(safe-area-inset-bottom, 0px);
  --abst-safe-l:     env(safe-area-inset-left, 0px);
  --abst-safe-r:     env(safe-area-inset-right, 0px);
}

#abest-chat-root,
#abest-chat-root *,
#abest-chat-root *::before,
#abest-chat-root *::after {
  box-sizing: border-box !important; margin: 0 !important; padding: 0 !important;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, system-ui, sans-serif !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: normal !important;
  text-decoration: none !important;
  border: none !important;
  outline: none !important;
  list-style: none !important;
}
/* Global SVG safety */
#abest-chat-root svg { max-width: 100% !important; max-height: 100% !important; flex-shrink: 0 !important; display: block !important; }

/* ═══ LAUNCHER (gradient bubble) ═════════════════════════════ */
#abest-launcher {
  position: fixed; z-index: 2147483645;
  bottom: calc(24px + var(--abst-safe-b));
  display: flex; align-items: center; gap: 10px;
  background: var(--abst-grad);
  color: white; border: none;
  border-radius: 999px;
  padding: 12px 22px 12px 12px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(86, 174, 184, .35);
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
  min-height: var(--abst-touch);
  font-family: inherit;
  animation: abst-launcher-pulse 2.4s ease-in-out infinite;
}
@keyframes abst-launcher-pulse {
  0%, 100% {
    box-shadow:
      0 8px 24px rgba(86, 174, 184, .35),
      0 0 0 0 rgba(86, 174, 184, 0);
    transform: scale(1);
  }
  50% {
    box-shadow:
      0 8px 28px rgba(86, 174, 184, .55),
      0 0 0 12px rgba(86, 174, 184, .12);
    transform: scale(1.04);
  }
}
#abest-launcher:hover  { transform: translateY(-2px); animation: none; box-shadow: 0 12px 32px rgba(86, 174, 184, .45); }
#abest-launcher:active { transform: scale(.97); }
#abest-launcher:focus-visible { outline: 3px solid rgba(86,174,184,.4); outline-offset: 3px; }
#abest-launcher.pos-right { right: calc(24px + var(--abst-safe-r)); }
#abest-launcher.pos-left  { left:  calc(24px + var(--abst-safe-l)); }
#abest-launcher.is-open   { opacity: 0; pointer-events: none; transform: scale(.85); animation: none; }

.abest-launcher-logo {
  width: 36px; height: 36px; border-radius: 50%;
  background: white; padding: 4px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,.10);
}
.abest-launcher-logo img { width: 100%; height: 100%; object-fit: contain; }
.abest-launcher-fb { font-size: 16px; font-weight: 800; color: var(--abst-teal-deep); }

.abest-launcher-text { display: flex; flex-direction: column; line-height: 1.2; gap: 2px; }
.abest-launcher-text strong { font-size: 14px; font-weight: 600; letter-spacing: -.1px; }
.abest-launcher-text span   { font-size: 11.5px; opacity: .9; }

@media (max-width: 380px) {
  .abest-launcher-text { display: none; }
  #abest-launcher { padding: 12px; }
}

.abest-notif {
  position: absolute; top: -4px;
  width: 18px; height: 18px;
  background: var(--abst-red); border-radius: 50%;
  border: 2px solid white;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: white;
  animation: abst-pop .4s cubic-bezier(.34,1.56,.64,1);
}
#abest-launcher.pos-right .abest-notif { right: -4px; }
#abest-launcher.pos-left  .abest-notif { left: -4px; }
@keyframes abst-pop { from { transform: scale(0); } to { transform: scale(1); } }

/* ═══ PANEL ═══════════════════════════════════════════════════ */
#abest-panel {
  position: fixed; z-index: 2147483646;
  bottom: calc(24px + var(--abst-safe-b));
  width: 420px;
  max-width: calc(100vw - 32px);
  height: 640px;
  max-height: calc(100vh - 48px);
  display: flex; flex-direction: column;
  background: white;
  border-radius: 20px;
  box-shadow: 0 24px 80px -12px rgba(15,23,42,.22), 0 8px 24px -8px rgba(15,23,42,.12);
  overflow: hidden;
  opacity: 0; pointer-events: none;
  transform: translateY(20px) scale(.96); transform-origin: bottom center;
  transition: opacity .3s cubic-bezier(.16,1,.3,1), transform .3s cubic-bezier(.16,1,.3,1);
}
#abest-panel.pos-right { right: calc(24px + var(--abst-safe-r)); }
#abest-panel.pos-left  { left:  calc(24px + var(--abst-safe-l)); }
#abest-panel.is-open   { opacity: 1; pointer-events: all; transform: translateY(0) scale(1); }

/* ─── RESPONSIVE — tablet small (≤700px) */
@media (max-width: 700px) {
  #abest-panel {
    width: 380px;
    max-width: calc(100vw - 24px);
    height: 580px;
    max-height: calc(100vh - 40px);
  }
}

/* ─── RESPONSIVE — tablet (≤600px) */
@media (max-width: 600px) {
  #abest-panel {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    height: 540px;
    max-height: calc(100vh - 40px);
  }
  .abst-phdr { padding: 14px 16px; }
  .abst-phdr-info h3 { font-size: 14px; }
  .abst-phdr-info p { font-size: 11.5px; }
  .abst-online { padding: 3px 8px; font-size: 10.5px; }
  .abst-doc-photo, .abst-doc-ini { width: 54px; height: 54px; }
  .abst-doc-ini { font-size: 16px; }
}

/* ─── RESPONSIVE — mobile (≤480px): full screen */
@media (max-width: 480px) {
  #abest-panel {
    bottom: 0 !important; left: 0 !important; right: 0 !important; top: 0 !important;
    width: 100vw !important; max-width: 100vw !important;
    height: 100dvh; max-height: 100dvh;
    border-radius: 0;
    padding-bottom: var(--abst-safe-b);
  }
  #abest-launcher {
    bottom: calc(16px + var(--abst-safe-b));
    padding: 0; width: 56px; height: 56px;
    justify-content: center; gap: 0;
    animation: abst-launcher-pulse-small 2.4s ease-in-out infinite;
  }
  @keyframes abst-launcher-pulse-small {
    0%, 100% {
      box-shadow:
        0 8px 24px rgba(86, 174, 184, .35),
        0 0 0 0 rgba(86, 174, 184, 0);
      transform: scale(1);
    }
    50% {
      box-shadow:
        0 8px 24px rgba(86, 174, 184, .5),
        0 0 0 10px rgba(86, 174, 184, .12);
      transform: scale(1.05);
    }
  }
  #abest-launcher.pos-right { right: calc(16px + var(--abst-safe-r)); }
  #abest-launcher.pos-left  { left:  calc(16px + var(--abst-safe-l)); }
  .abest-launcher-text { display: none; }
  .abest-launcher-logo { width: 40px; height: 40px; }
  #abest-launcher .abest-notif { right: -4px !important; left: auto !important; top: -4px !important; }
  .abst-chatbox { padding: 14px; gap: 12px; }
  .abst-msg { max-width: 95%; }
  .abst-doc-photo, .abst-doc-ini { width: 50px; height: 50px; }
  .abst-doc-ini { font-size: 15px; }
  .abst-doc-name { font-size: 13.5px; }
  .abst-doc-spec { font-size: 11.5px; }
  .abst-input-area { padding: 8px 10px 10px; }
  .abst-input-wrap { padding: 4px 4px 4px 14px; }
  .abst-textarea { font-size: 16px; padding: 7px 0; }
  .abst-pfooter-link, .abst-pfooter-cta { font-size: 11.5px; padding: 8px 10px; }
}

/* ─── RESPONSIVE — small phones (≤360px, iPhone SE etc.) */
@media (max-width: 360px) {
  .abst-phdr { padding: 12px 14px; gap: 10px; }
  .abst-phdr-logo { width: 38px; height: 38px; }
  .abst-phdr-info h3 { font-size: 13px; }
  .abst-phdr-info p { font-size: 11px; }
  .abst-online { display: none; } /* hide on tiny screens */
  .abst-icon-btn { width: 30px; height: 30px; }
  .abst-icon-btn svg { width: 14px; height: 14px; }
  .abst-bubble { padding: 10px 13px; font-size: 13.5px; }
  .abst-doc-card { padding: 10px; gap: 10px; }
  .abst-doc-photo, .abst-doc-ini { width: 46px; height: 46px; }
  .abst-doc-name { font-size: 13px; }
  .abst-pfooter-link, .abst-pfooter-cta { font-size: 11px; padding: 7px 8px; }
  /* Welcome on tiny screens */
  .abst-welcome { padding: 18px 14px 14px; }
  .abst-welcome-hero { padding: 4px 0 16px; gap: 10px; }
  .abst-welcome-avatar { width: 56px; height: 56px; }
  .abst-welcome-hero h2 { font-size: 19px; }
  .abst-welcome-hero p { font-size: 13px; }
  .abst-action-card { padding: 10px 12px; }
  .abst-action-icon { width: 34px; height: 34px; font-size: 17px; }
  .abst-action-icon svg { width: 17px; height: 17px; max-width: 17px; max-height: 17px; }
  .abst-action-title { font-size: 12.5px; }
  .abst-action-sub { font-size: 11px; }
}

/* ─── RESPONSIVE — large displays (≥1400px): allow wider panel */
@media (min-width: 1400px) {
  #abest-panel {
    width: 440px;
    height: 680px;
  }
}

/* ═══ HEADER (bold gradient) ═════════════════════════════════ */
.abst-phdr {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px;
  background: var(--abst-grad);
  color: white;
  flex-shrink: 0;
}
.abst-phdr-logo {
  width: 42px; height: 42px; border-radius: 50%;
  background: white; padding: 4px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.abst-phdr-logo img { width: 100%; height: 100%; object-fit: contain; }
.abst-phdr-info { flex: 1; min-width: 0; }
.abst-phdr-info h3 {
  font-size: 15px; font-weight: 600; color: white;
  text-wrap: balance; line-height: 1.3; letter-spacing: -.1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.abst-phdr-info p {
  font-size: 12px; color: rgba(255,255,255,.85); margin-top: 2px;
  text-wrap: pretty; line-height: 1.3;
}

.abst-online {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,.18);
  border-radius: 999px;
  padding: 4px 10px; font-size: 11px; font-weight: 600;
  color: white; backdrop-filter: blur(8px);
  white-space: nowrap; flex-shrink: 0;
}
.abst-dot {
  width: 6px; height: 6px; background: #4ade80;
  border-radius: 50%; animation: abst-pulse 2s infinite;
}
@keyframes abst-pulse {
  0%,100% { box-shadow: 0 0 0 2px rgba(74,222,128,.5); }
  50%      { box-shadow: 0 0 0 6px rgba(74,222,128,.15); }
}

/* Header action buttons — round on translucent white */
.abst-hdr-actions { display: flex; gap: 4px; flex-shrink: 0; }
.abst-icon-btn {
  width: 32px; height: 32px;
  background: rgba(255,255,255,.15);
  border: none; border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: white; transition: background .2s ease;
}
.abst-icon-btn:hover { background: rgba(255,255,255,.3); }
.abst-icon-btn:focus-visible { outline: 2px solid rgba(255,255,255,.6); outline-offset: 2px; }
.abst-icon-btn:active { transform: scale(.92); }
.abst-icon-btn svg { width: 16px; height: 16px; max-width: 16px; max-height: 16px; stroke: currentColor; pointer-events: none; }

/* EKG decorative — subtle on gradient */
.abst-ecg {
  height: 14px; padding: 0 16px; flex-shrink: 0; overflow: hidden;
  background: var(--abst-grad);
  margin-top: -1px;
}
.abst-ecg svg { width: 100%; height: 14px; opacity: .35; }
.abst-ecg svg polyline { stroke: white !important; stroke-width: 1.2 !important; }

/* Disclaimer — simple, unobtrusive */
.abst-disc {
  display: flex; align-items: center; gap: 8px;
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
  padding: 9px 16px; flex-shrink: 0;
}
.abst-disc-icon { font-size: 13px; flex-shrink: 0; }
.abst-disc span:not(.abst-disc-icon) {
  font-size: 11.5px; color: #92400e; line-height: 1.5;
  text-wrap: pretty; overflow-wrap: break-word;
}

/* ═══ CHATBOX ════════════════════════════════════════════════ */
.abst-chatbox {
  flex: 1; overflow-y: auto; overscroll-behavior: contain;
  padding: 18px 16px 22px;
  display: flex; flex-direction: column; gap: 16px;
  scroll-behavior: smooth;
  background: #f6f8fa;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}
.abst-chatbox::-webkit-scrollbar { width: 5px; }
.abst-chatbox::-webkit-scrollbar-track { background: transparent; }
.abst-chatbox::-webkit-scrollbar-thumb {
  background: rgba(100,116,139,.25);
  border-radius: 5px;
}
.abst-chatbox::-webkit-scrollbar-thumb:hover { background: rgba(100,116,139,.4); }

/* Firefox */
.abst-chatbox {
  scrollbar-width: thin;
  scrollbar-color: rgba(100,116,139,.25) transparent;
}

/* On mobile — wider, more visible scrollbar */
@media (max-width: 600px) {
  .abst-chatbox::-webkit-scrollbar { width: 8px; }
  .abst-chatbox::-webkit-scrollbar-thumb {
    background: var(--abst-muted);
    border-radius: 8px;
  }
}

/* When showing welcome screen, remove gap and padding (welcome handles it) */
.abst-chatbox.abst-has-welcome {
  padding: 0;
  gap: 0;
}

/* ═══ WELCOME SCREEN (hero + action cards) ═══════════════════ */
.abst-welcome {
  display: flex; flex-direction: column;
  padding: 24px 20px 20px;
  min-height: 100%;
  animation: abst-welcome-in .35s ease;
}
@keyframes abst-welcome-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.abst-welcome-hero {
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 8px 0 24px;
}
.abst-welcome-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: white;
  padding: 6px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(86,174,184,.30), 0 0 0 1px rgba(86,174,184,.1);
  position: relative;
  margin-bottom: 4px;
}
.abst-welcome-avatar img { width: 100%; height: 100%; object-fit: contain; }
.abst-welcome-status {
  position: absolute;
  bottom: 2px; right: 2px;
  width: 14px; height: 14px;
  background: #4ade80;
  border: 2.5px solid white;
  border-radius: 50%;
  animation: abst-pulse 2s infinite;
}
.abst-welcome-hero h2 {
  font-size: 22px; font-weight: 700;
  color: var(--abst-text);
  text-wrap: balance;
  letter-spacing: -.5px;
  line-height: 1.2;
  margin: 0;
}
.abst-welcome-hero p {
  font-size: 14px;
  color: var(--abst-text-soft);
  line-height: 1.55;
  text-wrap: pretty;
  max-width: 320px;
  margin: 0;
}
.abst-welcome-hero strong {
  color: var(--abst-teal-deep);
  font-weight: 600;
}

/* Action cards */
.abst-actions {
  display: flex; flex-direction: column; gap: 8px;
  margin-top: auto;
}
.abst-actions-label {
  font-size: 11px; font-weight: 700;
  color: var(--abst-muted);
  text-transform: uppercase;
  letter-spacing: .8px;
  margin: 0 4px 8px;
}
.abst-action-card {
  display: flex; align-items: center; gap: 12px;
  background: white;
  border: 1px solid rgba(226,232,240,.8);
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all .25s cubic-bezier(.16,1,.3,1);
  font-family: inherit;
  text-align: left;
  width: 100%;
  color: var(--abst-text);
  box-shadow: 0 1px 3px rgba(15,23,42,.04);
  animation: abst-card-in .45s cubic-bezier(.16,1,.3,1) backwards;
}
@keyframes abst-card-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.abst-action-card:hover {
  border-color: rgba(86,174,184,.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(86,174,184,.15);
}
.abst-action-card:hover .abst-action-arrow {
  transform: translateX(4px);
  color: var(--abst-teal);
}
.abst-action-card:focus-visible {
  outline: 2px solid var(--abst-teal);
  outline-offset: 2px;
}
.abst-action-card:active { transform: translateY(0); }

.abst-action-icon {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--abst-teal-pale);
  display: flex; align-items: center; justify-content: center;
  color: var(--abst-teal-deep);
  overflow: hidden;
  transition: background .25s ease, color .25s ease, transform .25s ease;
}
.abst-action-icon svg { width: 20px; height: 20px; max-width: 20px; max-height: 20px; display: block; }
.abst-action-card:hover .abst-action-icon {
  background: var(--abst-teal);
  color: white;
}
.abst-action-text {
  flex: 1;
  display: flex; flex-direction: column; gap: 2px;
  min-width: 0;
}
.abst-action-title {
  font-size: 13.5px; font-weight: 600;
  color: var(--abst-text);
  letter-spacing: -.1px;
  line-height: 1.3;
}
.abst-action-sub {
  font-size: 11.5px;
  color: var(--abst-muted);
  line-height: 1.35;
}
.abst-action-arrow {
  flex-shrink: 0;
  color: var(--abst-border-mid);
  font-size: 18px;
  font-weight: 600;
  transition: transform .2s ease, color .2s ease;
}

/* ═══ MESSAGES ═══════════════════════════════════════════════ */
.abst-msg { display: flex; gap: 10px; align-items: flex-end; max-width: 90%; animation: abst-msg-in .35s cubic-bezier(.16,1,.3,1); }
.abst-msg.bot  { align-self: flex-start; }
.abst-msg.user { align-self: flex-end; flex-direction: row-reverse; }
@keyframes abst-msg-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

.abst-av {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.abst-msg.bot .abst-av {
  background: white;
  box-shadow: 0 1px 4px rgba(15,23,42,.08);
}
.abst-av img {
  width: 100%; height: 100%; object-fit: contain;
  padding: 3px; background: white; border-radius: 50%;
}
.abst-msg.user .abst-av {
  background: var(--abst-teal);
  color: white; font-size: 11px; font-weight: 600;
}

.abst-bubble {
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 14px; line-height: 1.6;
  max-width: 100%;
  overflow-wrap: break-word;
  text-wrap: pretty;
  letter-spacing: -.01em;
}
.abst-msg.bot .abst-bubble {
  background: white;
  color: var(--abst-text-soft);
  border-bottom-left-radius: 6px;
  box-shadow: 0 1px 3px rgba(15,23,42,.06), 0 0 0 1px rgba(226,232,240,.7);
}
.abst-msg.user .abst-bubble {
  background: var(--abst-teal);
  color: white;
  border-bottom-right-radius: 6px;
  box-shadow: 0 2px 8px rgba(86,174,184,.25);
  font-weight: 450;
  padding: 11px 16px;
}

.abst-bubble strong { font-weight: 600; color: var(--abst-text); }
.abst-msg.user .abst-bubble strong { color: white; }

/* Links — clean, modern */
.abst-bubble a {
  color: var(--abst-teal-dark);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1.5px solid currentColor;
  padding-bottom: 0;
  transition: opacity .15s;
  word-break: normal;
  overflow-wrap: break-word;
}
.abst-bubble a:hover { opacity: .7; }
.abst-msg.user .abst-bubble a {
  color: white;
  border-bottom-color: rgba(255,255,255,.6);
}

/* Phone — nowrap, monospaced numerals */
.abst-bubble a.abst-tel,
.abst-bubble a[href^="tel:"] {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.abst-bubble p { margin: 0; text-wrap: pretty; }
.abst-bubble p + p { margin-top: 8px; }

.abst-bubble ul, .abst-bubble ol { padding-left: 20px; margin: 6px 0; }
.abst-bubble p + ul, .abst-bubble p + ol { margin-top: 6px; }
.abst-bubble li { margin: 2px 0; line-height: 1.5; text-wrap: pretty; }
.abst-bubble li::marker { color: var(--abst-teal); font-weight: 700; }
.abst-msg.user .abst-bubble li::marker { color: rgba(255,255,255,.7); }

.abst-bubble em { font-style: italic; color: var(--abst-muted); }
.abst-msg.user .abst-bubble em { color: rgba(255,255,255,.85); }

.abst-bubble code {
  background: rgba(86,174,184,.15);
  padding: 1px 6px; border-radius: 4px;
  font-family: 'SF Mono', Monaco, Consolas, monospace;
  font-size: 92%;
}

/* ═══ DOCTOR CARD (large, modern, like ghidclinic style) ═════ */
.abst-doc-card {
  display: flex; gap: 12px; align-items: center;
  background: white;
  border: 1px solid var(--abst-border);
  border-left: 3px solid var(--abst-teal);
  border-radius: 12px;
  padding: 12px;
  margin-top: 10px;
  text-decoration: none;
  color: inherit;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
  box-shadow: var(--abst-shadow-sm);
}
.abst-doc-card:hover {
  border-color: var(--abst-teal);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(86,174,184,.18);
}
.abst-doc-photo {
  width: 60px; height: 60px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--abst-bg);
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(15,23,42,.08);
}
.abst-doc-ini {
  width: 60px; height: 60px;
  border-radius: 50%; flex-shrink: 0;
  background: var(--abst-grad);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700;
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(15,23,42,.08);
}
.abst-doc-body { min-width: 0; flex: 1; }
.abst-doc-name {
  font-size: 14px; font-weight: 600;
  color: var(--abst-text);
  text-wrap: balance; line-height: 1.3;
  letter-spacing: -.1px;
}
.abst-doc-spec {
  font-size: 12px; color: var(--abst-muted);
  text-wrap: pretty; line-height: 1.4; margin-top: 3px;
}
.abst-doc-cas {
  display: inline-block; margin-top: 6px;
  padding: 2px 9px; border-radius: 999px;
  font-size: 10.5px; font-weight: 600;
  background: rgba(16,185,129,.12); color: #059669;
}
.abst-doc-link {
  display: inline-flex; align-items: center; gap: 3px;
  margin-top: 6px; font-size: 11.5px;
  color: var(--abst-teal-dark);
  text-decoration: none; font-weight: 600;
  border-bottom: 1.5px solid currentColor;
}

/* Typing dots — smooth pulse */
.abst-dots { display: flex; gap: 5px; align-items: center; padding: 4px 2px; }
.abst-dots span {
  width: 7px; height: 7px; background: var(--abst-teal);
  border-radius: 50%; animation: abst-bounce 1.4s ease-in-out infinite;
  opacity: .4;
}
.abst-dots span:nth-child(2) { animation-delay: .15s; }
.abst-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes abst-bounce {
  0%,80%,100% { transform: translateY(0); opacity: .35; }
  40%          { transform: translateY(-6px); opacity: 1; }
}

/* ═══ INPUT (modern unified wrapper, button inside) ══════════ */
.abst-input-area {
  background: #f8fafb;
  padding: 10px 14px 12px;
  flex-shrink: 0;
}
.abst-input-wrap {
  display: flex; align-items: flex-end;
  background: white;
  border: 1.5px solid var(--abst-border);
  border-radius: 24px;
  padding: 4px 5px 4px 18px;
  gap: 6px;
  transition: border-color .2s ease, box-shadow .2s ease;
  box-shadow: 0 2px 8px rgba(15,23,42,.04);
}
.abst-input-wrap:focus-within {
  border-color: var(--abst-teal);
  box-shadow: 0 0 0 3px rgba(86,174,184,.10), 0 2px 8px rgba(15,23,42,.06);
}
.abst-textarea {
  flex: 1;
  border: none;
  background: transparent;
  padding: 9px 0;
  font-family: inherit;
  font-size: max(16px, 14px);
  resize: none; outline: none;
  max-height: 100px; min-height: 32px;
  line-height: 1.5;
  color: var(--abst-text);
  overflow-wrap: break-word;
  width: 100%;
}
.abst-textarea::placeholder { color: var(--abst-muted); font-weight: 400; }

.abst-sendbtn {
  width: 36px; height: 36px;
  background: var(--abst-grad);
  border: none; border-radius: 50%;
  color: white; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: transform .15s ease, opacity .2s ease, box-shadow .2s ease;
  box-shadow: 0 2px 8px rgba(86,174,184,.30);
}
.abst-sendbtn:hover:not(:disabled) {
  transform: scale(1.08);
  box-shadow: 0 4px 14px rgba(86,174,184,.40);
}
.abst-sendbtn:disabled { opacity: .3; cursor: not-allowed; box-shadow: none; }
.abst-sendbtn:focus-visible { outline: 2px solid var(--abst-teal); outline-offset: 2px; }
.abst-sendbtn svg { width: 16px; height: 16px; max-width: 16px; max-height: 16px; display: block; pointer-events: none; }

/* ═══ FOOTER (modern split CTA) ═════════════════════════════ */
.abst-pfooter {
  display: flex; align-items: center; justify-content: center;
  gap: 0;
  padding: 0;
  flex-shrink: 0;
  background: white;
  border-top: 1px solid var(--abst-border);
  min-height: 42px;
}
.abst-pfooter-link {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 12px;
  font-size: 12.5px; font-weight: 500;
  color: var(--abst-text-soft);
  text-decoration: none;
  transition: color .2s ease, background .2s ease;
  line-height: 1;
}
.abst-pfooter-link:hover { color: var(--abst-teal-deep); background: var(--abst-teal-pale); }
.abst-pfooter-link svg { width: 13px; height: 13px; max-width: 13px; max-height: 13px; color: var(--abst-teal); flex-shrink: 0; }
.abst-pfooter-sep {
  width: 1px; height: 20px;
  background: var(--abst-border);
  flex-shrink: 0;
}
.abst-pfooter-cta {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  padding: 10px 12px;
  font-size: 12.5px; font-weight: 600;
  color: var(--abst-teal-deep);
  text-decoration: none;
  transition: color .2s ease, background .2s ease;
  line-height: 1;
}
.abst-pfooter-cta:hover { color: white; background: var(--abst-teal); }
.abst-pfooter-cta svg { width: 12px; height: 12px; max-width: 12px; max-height: 12px; flex-shrink: 0; transition: transform .2s ease; }
.abst-pfooter-cta:hover svg { transform: translateX(2px); }

/* ═══ A11y ═══════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { animation: none !important; transition: none !important; }
}
@media (forced-colors: active) {
  #abest-launcher, .abst-sendbtn { border: 2px solid ButtonText; }
  .abst-bubble, .abst-doc-card { border: 1px solid ButtonText; }
}
@media (hover: none) and (pointer: coarse) {
  .abst-icon-btn, .abst-sendbtn { min-width: 44px; min-height: 44px; }
}
