#bcool-chat-root, #bcool-chat-root * { box-sizing: border-box; }

/* Viewport overlay: theme footer transform cannot trap this layer. */
#bcool-chat-root {
  --bcool-blue: #0a6cff;
  --bcool-blue-dark: #0754d1;
  --bcool-blue-soft: #e8f1ff;
  --bcool-bg: #f3f6fb;
  --bcool-border: #dbe3ef;
  --bcool-text: #122033;
  --bcool-muted: #5d6b7c;
  --bcool-shadow: 0 22px 60px rgba(9, 40, 90, .22);
  --bcool-radius: 20px;
  --bcool-gap: 24px;
  --bcool-top-gap: 20px;
  --bcool-nav-offset: 0px;
  --bcool-bottom: calc(var(--bcool-gap) + var(--bcool-nav-offset) + env(safe-area-inset-bottom, 0px));
  --bcool-fs: 15px;
  --bcool-fs-sm: 13px;
  --bcool-lh: 1.5;
  --bcool-input-bar: 68px;
  font-family: inherit !important;
  font-size: var(--bcool-fs) !important;
  line-height: var(--bcool-lh) !important;
  font-weight: 400 !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: fixed !important;
  inset: 0 !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  z-index: 2147483000 !important;
  pointer-events: none !important;
  overflow: visible !important;
  transform: none !important;
  filter: none !important;
  perspective: none !important;
  contain: none !important;
  float: none !important;
}
#bcool-chat-root button {
  appearance: none !important;
  -webkit-appearance: none !important;
  float: none !important;
  font-family: inherit !important;
}
#bcool-chat-root,
#bcool-chat-root *:not(svg):not(path):not(polyline):not(line):not(code):not(pre) {
  font-family: inherit !important;
}
#bcool-chat-root p,
#bcool-chat-root li,
#bcool-chat-root div,
#bcool-chat-root span,
#bcool-chat-root a,
#bcool-chat-root td,
#bcool-chat-root th,
#bcool-chat-root label,
#bcool-chat-root button,
#bcool-chat-root input,
#bcool-chat-root textarea,
#bcool-chat-root h1,
#bcool-chat-root h2,
#bcool-chat-root h3,
#bcool-chat-root h4,
#bcool-chat-root h5,
#bcool-chat-root h6,
#bcool-chat-root strong,
#bcool-chat-root b,
#bcool-chat-root em,
#bcool-chat-root ul,
#bcool-chat-root ol {
  font-size: var(--bcool-fs) !important;
  line-height: var(--bcool-lh) !important;
  letter-spacing: normal !important;
}
#bcool-chat-root strong,
#bcool-chat-root b {
  font-weight: 700 !important;
}
#bcool-chat-root button,
#bcool-chat-root input,
#bcool-chat-root textarea,
#bcool-chat-root select {
  font-family: inherit !important;
  text-transform: none !important;
  letter-spacing: normal !important;
}
#bcool-chat-root svg {
  display: block !important;
  max-width: none !important;
  max-height: none !important;
  overflow: visible !important;
}
#bcool-chat-root .bcool-launcher,
#bcool-chat-root .bcool-panel.bcool-open,
#bcool-chat-root .bcool-scroll-fab.is-visible,
#bcool-chat-root .bcool-chip,
#bcool-chat-root .bcool-send,
#bcool-chat-root .bcool-icon-btn,
#bcool-chat-root .bcool-input {
  pointer-events: auto !important;
}

@keyframes bcool-pulse-ring {
    0% { transform: scale(.85); opacity: .55; }
    70% { transform: scale(1.35); opacity: 0; }
    100% { transform: scale(1.35); opacity: 0; }
  }
  @keyframes bcool-float-in {
    from { opacity: 0; transform: translateY(10px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }
  @keyframes bcool-orb {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.12); filter: brightness(1.15); }
  }
  @keyframes bcool-shimmer {
    0% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
  }
  @keyframes bcool-blink {
    0%, 45% { opacity: 1; }
    50%, 100% { opacity: 0; }
  }
  @keyframes bcool-dot {
    0%, 100% { opacity: .22; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-1px); }
  }
  @keyframes bcool-status-fade {
    from { opacity: 0; transform: translateY(2px); }
    to { opacity: 1; transform: translateY(0); }
  }

  #bcool-chat-root .bcool-launcher {
    position: absolute !important; bottom: var(--bcool-bottom) !important; right: var(--bcool-gap) !important; left: auto !important; top: auto !important; z-index: 2;
    width: 64px; height: 64px; border-radius: 50%; border: none; cursor: pointer;
    background: linear-gradient(145deg, #1a7dff 0%, #0a6cff 45%, #0754d1 100%);
    color: #fff;
    box-shadow: 0 10px 28px rgba(10, 108, 255, .4);
    display: flex; align-items: center; justify-content: center;
    transition: transform .25s cubic-bezier(.22,1,.36,1), opacity .2s ease, box-shadow .25s ease;
  }
  #bcool-chat-root .bcool-launcher::before {
    content: "";
    position: absolute; inset: -6px; border-radius: 50%;
    border: 2px solid rgba(10, 108, 255, .35);
    animation: bcool-pulse-ring 2.2s ease-out infinite;
    pointer-events: none;
  }
  #bcool-chat-root .bcool-launcher:hover {
    transform: scale(1.06) translateY(-2px);
    box-shadow: 0 14px 34px rgba(10, 108, 255, .5);
  }
  #bcool-chat-root .bcool-launcher svg { width: 28px; height: 28px; fill: currentColor; position: relative; z-index: 1; }
  #bcool-chat-root .bcool-launcher.is-hidden { opacity: 0; pointer-events: none; transform: scale(.8); }

  #bcool-chat-root .bcool-panel {
    position: absolute !important; z-index: 3;
    right: var(--bcool-gap) !important; bottom: var(--bcool-bottom) !important; left: auto !important; top: auto !important;
    width: 420px; height: min(640px, calc(100dvh - var(--bcool-bottom) - var(--bcool-top-gap)));
    max-width: calc(100vw - 32px);
    max-height: calc(100dvh - var(--bcool-bottom) - var(--bcool-top-gap));
    background: #ffffff;
    border: 1px solid rgba(219, 227, 239, .95);
    border-radius: var(--bcool-radius);
    box-shadow: var(--bcool-shadow);
    display: flex; flex-direction: column; overflow: hidden;
    opacity: 0; visibility: hidden; pointer-events: none;
    transform: translateY(18px) scale(.96);
    transform-origin: bottom right;
    transition:
      width .38s cubic-bezier(.22,1,.36,1),
      height .38s cubic-bezier(.22,1,.36,1),
      right .38s cubic-bezier(.22,1,.36,1),
      bottom .38s cubic-bezier(.22,1,.36,1),
      max-width .38s cubic-bezier(.22,1,.36,1),
      max-height .38s cubic-bezier(.22,1,.36,1),
      border-radius .35s ease,
      opacity .28s ease,
      transform .34s cubic-bezier(.22,1,.36,1),
      visibility 0s linear .34s;
    backdrop-filter: blur(10px);
  }
  #bcool-chat-root .bcool-panel.bcool-open {
    opacity: 1; visibility: visible; pointer-events: auto;
    transform: translateY(0) scale(1);
    transition-delay: 0s;
  }
  #bcool-chat-root .bcool-panel.expanded {
    width: min(940px, calc(100vw - 32px));
    height: calc(100dvh - 40px);
    max-width: calc(100vw - 32px);
    max-height: calc(100dvh - var(--bcool-bottom) - var(--bcool-top-gap));
    right: 16px; bottom: var(--bcool-bottom);
    border-radius: 16px;
  }

  #bcool-chat-root .bcool-header {
    background: linear-gradient(120deg, #0a6cff 0%, #0d7bff 50%, #0860e8 100%);
    color: #fff;
    padding: 14px 12px 14px 16px;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    min-height: 64px;
  }
  #bcool-chat-root .bcool-header::after {
    content: "";
    position: absolute;
    left: -48px;
    top: -56px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(255,255,255,.10);
    pointer-events: none;
  }
  #bcool-chat-root .bcool-header-left {
    display: flex; align-items: center; gap: 11px; min-width: 0; position: relative; z-index: 1;
  }
  #bcool-chat-root .bcool-avatar {
    width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0;
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.28);
    display: grid; place-items: center;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
  }
  #bcool-chat-root .bcool-avatar svg { width: 20px; height: 20px; fill: #fff; }
  #bcool-chat-root .bcool-header-text { min-width: 0; }
  #bcool-chat-root .bcool-header-title { font-weight: 700; font-size: var(--bcool-fs); line-height: 1.3; letter-spacing: 0; }
  #bcool-chat-root .bcool-header-sub {
    display: flex; align-items: center; gap: 6px;
    font-weight: 400; opacity: .92; font-size: var(--bcool-fs-sm); margin-top: 3px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  #bcool-chat-root .bcool-online-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: #5dffb0; box-shadow: 0 0 0 3px rgba(93,255,176,.25);
    flex-shrink: 0;
  }
  #bcool-chat-root .bcool-header-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; position: relative; z-index: 1; }
  #bcool-chat-root .bcool-icon-btn {
    width: 34px; height: 34px; border: none; border-radius: 10px;
    background: rgba(255,255,255,.14); color: #fff; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background .15s ease, transform .15s ease;
  }
  #bcool-chat-root .bcool-icon-btn:hover { background: rgba(255,255,255,.28); transform: translateY(-1px); }
  #bcool-chat-root .bcool-icon-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

  #bcool-chat-root .bcool-panel-body {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    background: linear-gradient(180deg, #f8fafc 0%, #f3f6fb 100%);
  }
  #bcool-chat-root .bcool-panel-body::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: var(--bcool-input-bar);
    height: 28px;
    background: linear-gradient(to bottom, rgba(243, 246, 251, 0), #f3f6fb);
    pointer-events: none;
    z-index: 1;
  }

  #bcool-chat-root .bcool-msgs {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 14px 16px 52px;
    background: transparent;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(154, 170, 194, .85) transparent;
  }
  #bcool-chat-root .bcool-msgs::-webkit-scrollbar { width: 5px; }
  #bcool-chat-root .bcool-msgs::-webkit-scrollbar-track { background: transparent; }
  #bcool-chat-root .bcool-msgs::-webkit-scrollbar-thumb {
    background: rgba(154, 170, 194, .85);
    border-radius: 99px;
  }

  #bcool-chat-root .bcool-empty {
    padding: 8px 4px 18px;
    animation: bcool-float-in .45s cubic-bezier(.22,1,.36,1);
  }
  #bcool-chat-root .bcool-empty-title {
    font-size: var(--bcool-fs); font-weight: 700; color: var(--bcool-text);
    letter-spacing: 0; margin: 6px 0 6px;
  }
  #bcool-chat-root .bcool-empty-copy {
    font-size: var(--bcool-fs); color: var(--bcool-muted); line-height: var(--bcool-lh); margin: 0 0 14px;
  }
  #bcool-chat-root .bcool-chips {
    display: flex; flex-wrap: wrap; gap: 8px;
  }
  #bcool-chat-root .bcool-chip {
    border: 1px solid #d5e2f7;
    background: rgba(255,255,255,.85);
    color: #1d4f98;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: var(--bcool-fs); font-weight: 600;
    cursor: pointer;
    transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
    font-family: inherit;
  }
  #bcool-chat-root .bcool-chip:hover {
    background: var(--bcool-blue-soft);
    border-color: #b6cef8;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(10,108,255,.12);
  }

  #bcool-chat-root .bcool-msg {
    margin-bottom: 12px; display: flex; gap: 8px;
    animation: bcool-float-in .35s cubic-bezier(.22,1,.36,1);
  }
  #bcool-chat-root .bcool-msg.bot { align-items: flex-end; }
  #bcool-chat-root .bcool-msg.user { justify-content: flex-end; }
  #bcool-chat-root .bcool-msg.bot .bubble {
    flex: 1;
    min-width: 0;
    max-width: calc(100% - 34px);
  }
  #bcool-chat-root .bcool-msg.user .bubble {
    max-width: 86%;
  }
  #bcool-chat-root .bcool-msg-avatar {
    width: 26px; height: 26px; border-radius: 9px; flex-shrink: 0;
    background: linear-gradient(145deg, #1a7dff, #0a6cff);
    display: grid; place-items: center;
    margin-bottom: 2px;
  }
  #bcool-chat-root .bcool-msg-avatar svg { width: 14px; height: 14px; fill: #fff; }
  #bcool-chat-root .bcool-msg .bubble {
    padding: 11px 14px; border-radius: 16px; max-width: 86%;
    font-size: var(--bcool-fs); line-height: var(--bcool-lh); font-weight: 400;
    word-wrap: break-word; overflow-wrap: anywhere;
  }
  #bcool-chat-root .bcool-panel.expanded .bcool-msg .bubble { max-width: 78%; }
  #bcool-chat-root .bcool-panel.expanded .bcool-msg.bot .bubble { max-width: calc(100% - 34px); }
  #bcool-chat-root .bcool-msg.user .bubble {
    background: linear-gradient(145deg, #1a7dff, #0a6cff);
    color: #fff;
    border-bottom-right-radius: 5px;
    white-space: pre-wrap;
    box-shadow: 0 8px 18px rgba(10,108,255,.22);
  }
  #bcool-chat-root .bcool-msg.bot .bubble {
    background: rgba(255,255,255,.92);
    color: var(--bcool-text);
    border: 1px solid var(--bcool-border);
    border-bottom-left-radius: 5px;
    box-shadow: 0 8px 20px rgba(18, 40, 70, .05);
  }
  #bcool-chat-root .bcool-msg.bot .bubble.is-thinking {
    border-color: #cfe0ff;
    background: linear-gradient(120deg, #f7faff, #eef5ff 40%, #f7faff 80%);
    background-size: 200% 100%;
    animation: bcool-shimmer 3.6s ease-in-out infinite;
  }

  #bcool-chat-root .bcool-thinking {
    display: flex; align-items: center; gap: 10px;
    min-height: 28px;
  }
  #bcool-chat-root .bcool-thinking-orb {
    width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0;
    background: radial-gradient(circle at 35% 30%, #9cc5ff, #0a6cff 65%, #0754d1);
    box-shadow: 0 0 0 4px rgba(10,108,255,.12);
    animation: bcool-orb 2.4s ease-in-out infinite;
  }
  #bcool-chat-root .bcool-thinking-copy {
    display: flex; flex-direction: column; gap: 2px; min-width: 0;
  }
  #bcool-chat-root .bcool-thinking-label {
    font-size: var(--bcool-fs); font-weight: 600; color: #1d4f98;
    letter-spacing: -.01em;
    animation: bcool-status-fade .45s ease;
  }
  #bcool-chat-root .bcool-thinking-dots {
    display: inline-flex;
    gap: 3px;
    margin-left: 10px;
    vertical-align: middle;
  }
  #bcool-chat-root .bcool-thinking-dots span {
    width: 4px; height: 4px; border-radius: 50%; background: #0a6cff;
    display: inline-block;
    animation: bcool-dot 2s ease-in-out infinite;
  }
  #bcool-chat-root .bcool-thinking-dots span:nth-child(2) { animation-delay: .35s; }
  #bcool-chat-root .bcool-thinking-dots span:nth-child(3) { animation-delay: .7s; }
  #bcool-chat-root .bcool-thinking-hint {
    font-size: var(--bcool-fs-sm); color: var(--bcool-muted); font-weight: 400;
  }

  #bcool-chat-root .bcool-stream-cursor {
    display: inline-block; width: 2px; height: .95em;
    background: var(--bcool-blue); margin-left: 2px; vertical-align: -2px;
    animation: bcool-blink .9s step-end infinite;
  }

  /* Rendered markdown inside bot bubbles — same size as user bubbles. */
  #bcool-chat-root .bcool-md { white-space: normal; font-size: var(--bcool-fs) !important; line-height: var(--bcool-lh) !important; font-weight: 400 !important; }
  #bcool-chat-root .bcool-md p { margin: 0 0 .65em; font-size: inherit !important; line-height: inherit !important; font-weight: 400 !important; }
  #bcool-chat-root .bcool-md p:last-child { margin-bottom: 0; }
  #bcool-chat-root .bcool-md strong { font-weight: 700 !important; font-size: inherit !important; }
  #bcool-chat-root .bcool-md em { font-style: italic; font-size: inherit !important; }
  #bcool-chat-root .bcool-md ul, #bcool-chat-root .bcool-md ol { margin: .4em 0 .65em; padding-left: 1.25em; font-size: inherit !important; }
  #bcool-chat-root .bcool-md ol { list-style: decimal; list-style-position: outside; }
  #bcool-chat-root .bcool-md ol > li { display: list-item; }
  #bcool-chat-root .bcool-md li { margin: .2em 0; font-size: inherit !important; line-height: inherit !important; font-weight: 400 !important; }
  #bcool-chat-root .bcool-md li > ul { margin: .25em 0 .35em; padding-left: 1.1em; list-style: disc; }
  #bcool-chat-root .bcool-md a { color: var(--bcool-blue); text-decoration: underline; text-underline-offset: 2px; font-size: inherit !important; }
  #bcool-chat-root .bcool-md code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
    font-size: inherit !important; background: #eef2f7; padding: .1em .35em; border-radius: 4px;
  }
  #bcool-chat-root .bcool-md pre {
    margin: .55em 0; padding: 10px 12px; overflow-x: auto;
    background: #eef2f7; border-radius: 10px; font-size: var(--bcool-fs-sm) !important; line-height: var(--bcool-lh);
  }
  #bcool-chat-root .bcool-md pre code { background: none; padding: 0; }
  #bcool-chat-root .bcool-md table {
    width: 100%; border-collapse: collapse; margin: .6em 0;
    font-size: var(--bcool-fs-sm) !important; display: block; overflow-x: auto; max-width: 100%;
  }
  #bcool-chat-root .bcool-md th, #bcool-chat-root .bcool-md td {
    border: 1px solid var(--bcool-border); padding: 6px 8px; text-align: left;
    white-space: nowrap;
  }
  #bcool-chat-root .bcool-md th { background: #eef3f9; font-weight: 700; }
  #bcool-chat-root .bcool-md blockquote {
    margin: .5em 0; padding: .35em .75em;
    border-left: 3px solid var(--bcool-blue); color: #445;
    background: #f3f7fc;
  }
  #bcool-chat-root .bcool-md h1,
  #bcool-chat-root .bcool-md h2,
  #bcool-chat-root .bcool-md h3,
  #bcool-chat-root .bcool-md h4 {
    margin: .7em 0 .3em;
    color: var(--bcool-text);
    letter-spacing: normal !important;
    line-height: var(--bcool-lh) !important;
    font-size: var(--bcool-fs) !important;
    font-weight: 700 !important;
  }
  #bcool-chat-root .bcool-md h1:first-child,
  #bcool-chat-root .bcool-md h2:first-child,
  #bcool-chat-root .bcool-md h3:first-child,
  #bcool-chat-root .bcool-md h4:first-child { margin-top: 0; }

  #bcool-chat-root .bcool-sources {
    margin-top: 10px; padding-top: 8px;
    border-top: 1px solid var(--bcool-border);
    font-size: var(--bcool-fs-sm); color: var(--bcool-muted);
    animation: bcool-float-in .35s ease;
  }
  #bcool-chat-root .bcool-sources-label { display: block; margin-bottom: 6px; font-weight: 700; color: #556070; }
  #bcool-chat-root .bcool-sources-list { display: flex; flex-wrap: wrap; gap: 6px; }
  #bcool-chat-root .bcool-source-link {
    display: inline-flex; align-items: center; gap: 4px;
    max-width: 100%;
    padding: 5px 10px; border-radius: 999px;
    background: #eef4ff; color: var(--bcool-blue);
    text-decoration: none; font-weight: 600; line-height: 1.3;
    border: 1px solid #d6e4ff;
    transition: background .15s ease, border-color .15s ease, transform .15s ease;
  }
  #bcool-chat-root .bcool-source-link:hover { background: #dde9ff; border-color: #b8d0ff; transform: translateY(-1px); }
  #bcool-chat-root .bcool-source-link svg { width: 11px; height: 11px; flex-shrink: 0; opacity: .8; }

  #bcool-chat-root .bcool-input {
    display: flex; align-items: flex-end;
    border-top: 1px solid rgba(219, 227, 239, .75);
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    gap: 8px;
    background: #fff;
    box-shadow: 0 -6px 18px rgba(18, 40, 70, .06);
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    min-height: var(--bcool-input-bar);
  }
  #bcool-chat-root .bcool-input-shell {
    flex: 1; display: flex; align-items: flex-end; gap: 6px;
    border: 1px solid #d5dce6; border-radius: 14px;
    padding: 4px 4px 4px 12px;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
  }
  #bcool-chat-root .bcool-input-shell:focus-within {
    border-color: #8bb6ff;
    box-shadow: 0 0 0 4px rgba(10,108,255,.12);
  }
  #bcool-chat-root .bcool-input textarea {
    flex: 1; border: none; background: transparent;
    padding: 9px 4px; font-size: var(--bcool-fs) !important; outline: none;
    font-family: inherit; color: var(--bcool-text); font-weight: 400;
    resize: none; overflow-y: auto; max-height: 120px; line-height: 1.4;
    min-height: 24px; field-sizing: content;
  }
  #bcool-chat-root .bcool-input textarea::placeholder { color: #8a98a9; font-weight: 400; font-size: var(--bcool-fs) !important; }
  #bcool-chat-root .bcool-send {
    width: 40px; height: 40px; border: none; border-radius: 12px;
    background: linear-gradient(145deg, #1a7dff, #0a6cff);
    color: #fff; cursor: pointer;
    display: grid; place-items: center;
    box-shadow: 0 8px 16px rgba(10,108,255,.28);
    transition: transform .18s ease, opacity .15s ease, box-shadow .18s ease;
    flex-shrink: 0;
  }
  #bcool-chat-root .bcool-send:hover:not(:disabled) {
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 10px 20px rgba(10,108,255,.34);
  }
  #bcool-chat-root .bcool-send:disabled { opacity: .45; cursor: default; transform: none; box-shadow: none; }
  #bcool-chat-root .bcool-send svg { width: 18px; height: 18px; fill: currentColor; }

  #bcool-chat-root .bcool-scroll-fab {
    position: absolute;
    left: 50%;
    bottom: calc(var(--bcool-input-bar) + 10px);
    transform: translateX(-50%) translateY(6px);
    opacity: 0;
    pointer-events: none;
    border: 1px solid rgba(10, 108, 255, .22);
    background: rgba(255, 255, 255, .96);
    color: var(--bcool-blue);
    border-radius: 999px;
    padding: 5px 14px;
    font-size: var(--bcool-fs-sm);
    font-weight: 600;
    line-height: 1.2;
    box-shadow: 0 6px 18px rgba(18, 40, 70, .14);
    backdrop-filter: blur(8px);
    cursor: pointer;
    transition: opacity .2s ease, transform .2s ease;
    font-family: inherit;
    z-index: 3;
    white-space: nowrap;
  }
  #bcool-chat-root .bcool-scroll-fab.is-visible {
    opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0);
  }

  @media (prefers-reduced-motion: reduce) {
    #bcool-chat-root .bcool-launcher::before,
    #bcool-chat-root .bcool-thinking-orb,
    #bcool-chat-root .bcool-msg.bot .bubble.is-thinking,
    #bcool-chat-root .bcool-stream-cursor,
    #bcool-chat-root .bcool-thinking-dots span { animation: none !important; }
    #bcool-chat-root .bcool-msg, #bcool-chat-root .bcool-empty { animation: none !important; }
  }

#bcool-chat-root .bcool-launcher {
  width: 64px !important;
  height: 64px !important;
  min-width: 64px !important;
  min-height: 64px !important;
  max-width: 64px !important;
  border-radius: 50% !important;
  border: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: visible !important;
}
#bcool-chat-root .bcool-launcher svg { width: 28px !important; height: 28px !important; }
#bcool-chat-root .bcool-launcher.is-hidden {
  pointer-events: none !important;
}
#bcool-chat-root .bcool-panel:not(.bcool-open) {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
#bcool-chat-root .bcool-panel.bcool-open {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}
#bcool-chat-root .bcool-icon-btn {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  padding: 0 !important;
  border: none !important;
  background: rgba(255,255,255,.14) !important;
  color: #fff !important;
}
#bcool-chat-root .bcool-icon-btn svg {
  width: 16px !important;
  height: 16px !important;
  stroke: currentColor !important;
  fill: none !important;
}
#bcool-chat-root .bcool-chip {
  width: auto !important;
  display: inline-block !important;
  background: rgba(255,255,255,.85) !important;
  color: #1d4f98 !important;
  border: 1px solid #d5e2f7 !important;
  border-radius: 999px !important;
  text-transform: none !important;
  font-size: var(--bcool-fs) !important;
  font-weight: 600 !important;
}
#bcool-chat-root .bcool-send {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  padding: 0 !important;
  border: none !important;
}

/* Woodmart sticky toolbar shows below ~1024px — sit above it, keep a top gap. */
@media (max-width: 1024px) {
  #bcool-chat-root {
    --bcool-gap: 12px;
    --bcool-top-gap: 12px;
    --bcool-input-bar: 72px;
    --bcool-fs: 14px;
    --bcool-fs-sm: 12px;
  }
  #bcool-chat-root .bcool-launcher {
    width: 56px !important;
    height: 56px !important;
    min-width: 56px !important;
    min-height: 56px !important;
    max-width: 56px !important;
    right: 12px !important;
    bottom: var(--bcool-bottom) !important;
  }
  #bcool-chat-root .bcool-launcher svg {
    width: 24px !important;
    height: 24px !important;
  }
  #bcool-chat-root .bcool-panel,
  #bcool-chat-root .bcool-panel.expanded {
    top: var(--bcool-top-gap) !important;
    bottom: var(--bcool-bottom) !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    border-radius: 16px !important;
  }
  #bcool-chat-root .bcool-header {
    padding: 12px 12px 12px 14px;
    min-height: 58px;
  }
  #bcool-chat-root .bcool-header-sub {
    white-space: normal;
  }
  #bcool-chat-root .bcool-expand-btn {
    display: none !important;
  }
  #bcool-chat-root .bcool-reset-btn {
    display: inline-flex !important;
  }
  #bcool-chat-root .bcool-msgs {
    padding: 12px 14px 56px;
  }
  #bcool-chat-root .bcool-msg .bubble {
    max-width: 90%;
  }
  #bcool-chat-root .bcool-msg.bot .bubble {
    max-width: calc(100% - 34px);
  }
  #bcool-chat-root .bcool-input {
    padding: 10px 10px calc(10px + env(safe-area-inset-bottom, 0px));
  }
  #bcool-chat-root .bcool-input textarea {
    padding: 8px 4px;
  }
  #bcool-chat-root .bcool-send {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
  }
  #bcool-chat-root .bcool-empty {
    margin-top: auto;
    margin-bottom: auto;
  }
  #bcool-chat-root .bcool-msgs {
    display: flex;
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  #bcool-chat-root {
    --bcool-gap: 8px;
    --bcool-top-gap: 8px;
  }
  #bcool-chat-root .bcool-panel,
  #bcool-chat-root .bcool-panel.expanded {
    left: 8px !important;
    right: 8px !important;
    border-radius: 14px !important;
  }
  #bcool-chat-root .bcool-header-title {
    font-size: 14px !important;
  }
  #bcool-chat-root .bcool-chip {
    padding: 7px 11px;
  }
}

