/* === Brand helpers === */
.glass { 
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  background: rgba(255,255,255,0.10);
}
.shadow-soft { box-shadow: 0 12px 30px rgba(15, 76, 129, .22); }
.shadow-elev { box-shadow: 0 18px 40px rgba(0,0,0,.18), 0 2px 8px rgba(0,0,0,.05); }

/* === Buttons === */
.btn-primary, .btn-ghost, .btn-xl-primary, .btn-xl-outline {
  display:inline-flex; align-items:center; justify-content:center; gap:.5rem;
  border-radius:.75rem; font-weight:600; transition:.15s ease-in-out;
}
.btn-primary { padding:.5rem .9rem; background:linear-gradient(135deg,#0f4c81,#5a97c8); color:#fff; }
.btn-primary:hover { filter:brightness(1.05) saturate(1.05); }
.btn-ghost { padding:.5rem .9rem; border:1px solid rgba(255,255,255,.3); color:#e8f1fa; }
.btn-ghost:hover { background:rgba(255,255,255,.08); }
.btn-xl-primary { padding:.9rem 1.2rem; background:linear-gradient(135deg,#0f4c81,#5a97c8); color:#fff; }
.btn-xl-primary:hover { filter:brightness(1.05) saturate(1.05); transform:translateY(-1px); }
.btn-xl-outline { padding:.9rem 1.2rem; border:1px solid rgba(255,255,255,.35); color:#e8f1fa; }
.btn-xl-outline:hover { background:rgba(255,255,255,.08); transform:translateY(-1px); }

/* === Home mock bubbles === */
.bubble-in {
  max-width:85%; border-radius:1rem; border-top-left-radius:.4rem;
  background:#f5f9ff; border:1px solid #e6eef6; padding:.65rem .75rem; color:#0c3659; font-size:.95rem;
}
.bubble-out {
  max-width:85%; margin-left:auto; border-radius:1rem; border-top-right-radius:.4rem;
  background:#205f98; color:#fff; padding:.65rem .75rem; font-size:.95rem;
}
.input-mock { border:1px solid #e6eef6; border-radius:.6rem; padding:.5rem .65rem; color:#0c3659; font-size:.9rem; }
.btn-mock { background:#205f98; color:#fff; border-radius:.6rem; padding:.5rem .75rem; font-weight:600; }

/* === Web Chat bubbles === */
.bubble-in,
.bubble-out {
  display:inline-block;
  max-width: 100%;
  padding: .6rem .8rem;
  border-radius: .8rem;
  line-height: 1.35;
  font-size: .95rem;
  word-wrap: break-word;
  box-shadow: 0 6px 18px rgba(13, 41, 80, .08);
}
.bubble-in {
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid rgba(2,6,23,.06);
}
html.dark .bubble-in {
  background: rgba(15,23,42,.6);
  color: #e2e8f0;
  border: 1px solid rgba(148,163,184,.25);
}
.bubble-out {
  background: #3b82f6;
  color: #fff;
  border: 1px solid rgba(255,255,255,.12);
  margin-left: auto;
}
html.dark .bubble-out {
  background: #2563eb;
}

/* === Input/button mocks === */
.input-mock {
  background: #fff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  border-radius: .65rem;
  padding: .6rem .75rem;
  font-size: .95rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
}
html.dark .input-mock {
  background: rgba(2,6,23,.65);
  color: #e5e7eb;
  border-color: rgba(148,163,184,.25);
  box-shadow: none;
}
.btn-mock {
  background: #1d4ed8;
  color: #fff;
  border-radius: .65rem;
  padding: .6rem .9rem;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,.12);
}
html.dark .btn-mock { background:#2563eb; }

/* === Preview ribbon === */
.preview-ribbon {
  position:absolute; top:10px; right:-48px;
  transform: rotate(45deg);
  background: linear-gradient(90deg,#93c5fd,#60a5fa);
  color:#0b245e;
  padding:.25rem 3rem;
  font-size:.72rem;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
  border:1px solid rgba(255,255,255,.6);
  box-shadow: 0 10px 30px rgba(16,38,76,.15);
  border-radius:.25rem;
}
html.dark .preview-ribbon {
  color:#05204a;
  border-color: rgba(255,255,255,.35);
}

/* === Glass helper === */
.glass {
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  backdrop-filter: blur(10px) saturate(140%);
  background-color: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
}
html.dark .glass {
  background-color: rgba(2,6,23,.45);
  border-color: rgba(148,163,184,.22);
}

/* === Chat app bar (sticky) === */
.chat-appbar {
  position: sticky; top: 0; z-index: 30;
  display:flex; align-items:center; justify-content:space-between;
  gap:.75rem;
  padding:.85rem 1rem;
  background: linear-gradient(135deg,#0f4c81,#5a97c8);
  color:#fff;
  border-bottom: 1px solid rgba(255,255,255,.18);
}
html.dark .chat-appbar {
  background: linear-gradient(135deg,#0b245e,#1e3a8a);
  border-bottom-color: rgba(255,255,255,.12);
}
.hint-chip {
  display:inline-flex; align-items:center;
  padding:.25rem .6rem; border-radius:.5rem;
  background: rgba(255,255,255,.14); color:#fff; font-weight:600; font-size:.8rem;
  border: 1px solid rgba(255,255,255,.2);
}
.hint-dot { opacity:.6; }

/* === Connection banner === */
.conn-banner {
  background: #fde68a;
  color: #7c2d12;
  font-weight:600; font-size:.9rem;
  padding:.5rem .9rem; text-align:center;
  border-bottom: 1px solid rgba(124, 45, 18, .25);
}

/* === WebChat surface === */
.webchat-surface {
  height: min(78vh, 900px);
  background:#ffffff; border-top:1px solid #e6eef6;
}
html.dark .webchat-surface {
  background:#0b1220;
  border-top-color: rgba(148,163,184,.25);
}

/* === Mobile tips FAB + sheet === */
.tips-fab {
  position: fixed; right: 1rem; bottom: 1rem; z-index:40;
  width: 44px; height: 44px; border-radius: 999px;
  background: linear-gradient(135deg,#0f4c81,#5a97c8); color:#fff; font-weight:700;
  box-shadow: 0 10px 30px rgba(16,38,76,.25); border: 1px solid rgba(255,255,255,.25);
}
html.dark .tips-fab { background: linear-gradient(135deg,#1e3a8a,#0f4c81); }
.tips-sheet {
  position: fixed; left:0; right:0; bottom:-320px; z-index:45;
  background: rgba(255,255,255,.98); border-top-left-radius: 1rem; border-top-right-radius: 1rem;
  box-shadow: 0 -18px 40px rgba(0,0,0,.18);
  transition: bottom .25s ease;
  padding: .75rem 1rem 1rem;
  border-top: 1px solid #e6eef6;
}
.tips-sheet.open { bottom: 0; }
html.dark .tips-sheet {
  background: rgba(2,6,23,.96);
  border-top-color: rgba(148,163,184,.25);
}
.tips-sheet-header {
  display:flex; align-items:center; justify-content:space-between;
  font-weight:700; color:#0f172a;
}
html.dark .tips-sheet-header { color:#e2e8f0; }
.tips-close {
  background: transparent; border: 1px solid rgba(148,163,184,.3);
  color: inherit; border-radius: .5rem; padding: .25rem .5rem;
}
.tips-list { margin-top:.5rem; color:#0f172a; }
.tips-list li+li { margin-top:.35rem; }
html.dark .tips-list { color:#cbd5e1; }

/* === Right rail === */
.rail-title {
  font-size:.75rem; text-transform:uppercase; letter-spacing:.05em;
  color:#0f4c81; font-weight:800;
}
html.dark .rail-title { color:#93c5fd; }
.rail-list { margin-top:.4rem; color:#0c3659; }
.rail-list li+li { margin-top:.25rem; }
html.dark .rail-list { color:#cbd5e1; }
.rail-text { margin-top:.4rem; color:#0c3659; }
html.dark .rail-text { color:#cbd5e1; }

/* === Pre-chat overlay === */
.prechat-overlay {
  position:absolute; inset:0; z-index:40;
  display:grid; place-items:center;
  background: linear-gradient(180deg, rgba(2,6,23,.65), rgba(2,6,23,.35));
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  padding: 1rem;
}
html.dark .prechat-overlay {
  background: linear-gradient(180deg, rgba(2,6,23,.75), rgba(2,6,23,.45));
}
.prechat-card {
  width: 100%;
  max-width: 640px;
  border-radius: 1rem;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  box-shadow: 0 18px 44px rgba(7, 24, 60, .25);
  padding: 1.25rem;
}
html.dark .prechat-card {
  background: rgba(2,6,23,.92);
  color: #e5e7eb;
  border-color: rgba(148,163,184,.25);
}
.prechat-badge {
  display:inline-block; font-weight:600; font-size:.75rem; letter-spacing:.02em;
  padding:.35rem .6rem; border-radius:999px;
  background: #e0f2fe; color:#075985; border: 1px solid #bae6fd;
}
html.dark .prechat-badge {
  background: rgba(59,130,246,.15); color:#bfdbfe; border-color: rgba(59,130,246,.3);
}
.prechat-title { font-size:1.35rem; font-weight:700; margin-top:.9rem; }
.prechat-text { margin-top:.5rem; line-height:1.6; opacity:.95; }
.prechat-list { margin-top:.8rem; color:#334155; }
html.dark .prechat-list { color:#cbd5e1; }
.prechat-start {
  display:inline-flex; align-items:center; justify-content:center; gap:.5rem;
  margin-top:1rem; padding:.8rem 1rem; border-radius:.75rem; font-weight:700;
  background: linear-gradient(135deg,#0f4c81,#5a97c8); color:#fff;
  border:1px solid rgba(255,255,255,.25);
  box-shadow: 0 10px 24px rgba(15,76,129,.28);
  transition: transform .12s ease, filter .12s ease;
}
.prechat-start:hover { filter:brightness(1.05); transform: translateY(-1px); }
.prechat-dismiss {
  margin-left:.5rem; margin-top:1rem;
  padding:.7rem .9rem; border-radius:.75rem; font-weight:600;
  background: transparent; color:#0f4c81; border: 1px solid #c7d2fe;
}
html.dark .prechat-dismiss { color:#93c5fd; border-color:#334155; }
.prechat-dismiss:hover { background: rgba(2,6,23,.04); }
html.dark .prechat-dismiss:hover { background: rgba(255,255,255,.05); }

/* === Suggested actions === */
.webchat__suggested-action,
.webchat__suggested-actions__button {
  background-color: #0f4c81 !important;
  color: #ffffff !important;
  border-color: #0f4c81 !important;
  border-radius: 8px !important;
}
html.dark .webchat__suggested-action,
html.dark .webchat__suggested-actions__button {
  background-color: #1e3a8a !important;
  color: #f0f9ff !important;
  border-color: #1e3a8a !important;
}
.webchat__suggested-actions__button .webchat__suggested-action__text {
  color: #ffffff !important;
}
html.dark .webchat__suggested-actions__button .webchat__suggested-action__text {
  color: #f0f9ff !important;
}
.webchat__suggested-action:hover,
.webchat__suggested-actions__button:hover {
  filter: brightness(1.06);
}


/* --- Ensure ordered-list numbers render inside Web Chat bubbles --- */
.webchat__render-markdown ol,
.webchat__text-content__markdown ol,
.webchat__text-content ol {
  list-style: decimal;              /* bring markers back */
  list-style-position: outside;     /* classic list look */
  margin: .25rem 0 .75rem 1.25rem;  /* space + indent */
  padding-left: .25rem;
}

.webchat__render-markdown ul,
.webchat__text-content__markdown ul,
.webchat__text-content ul {
  list-style: disc;
  list-style-position: outside;
  margin: .25rem 0 .75rem 1.25rem;
  padding-left: .25rem;
}

/* Style the list markers so they are visible and on-brand */
.webchat__render-markdown li::marker,
.webchat__text-content__markdown li::marker,
.webchat__text-content li::marker {
  color: #0f4c81;      /* brand blue for light mode */
  font-weight: 700;
}

html.dark .webchat__render-markdown li::marker,
html.dark .webchat__text-content__markdown li::marker,
html.dark .webchat__text-content li::marker {
  color: #93c5fd;      /* lighter blue for dark mode */
}

/* Tighten list item spacing for readability in chat bubbles */
.webchat__render-markdown li + li,
.webchat__text-content__markdown li + li,
.webchat__text-content li + li {
  margin-top: .15rem;
}