/* Big Volt Electric — assistant widget. Self-contained, no build step, no framework. */
.bv-chat,
.bv-chat *,
.bv-chat *::before,
.bv-chat *::after { box-sizing: border-box; }

.bv-chat {
  --bv-ink-950: #060b14;
  --bv-ink-900: #0b1220;
  --bv-ink-800: #16233a;
  --bv-ink-700: #24334c;
  --bv-volt-100: #fef3c7;
  --bv-volt-300: #fcd34d;
  --bv-volt-400: #fbbf24;
  --bv-volt-500: #f59e0b;
  --bv-volt-600: #d97706;
  --bv-volt-700: #b45309;
  --bv-slate-50: #f8fafc;
  --bv-slate-100: #f1f5f9;
  --bv-slate-200: #e2e8f0;
  --bv-slate-300: #cbd5e1;
  --bv-slate-500: #64748b;
  --bv-slate-600: #475569;
  --bv-slate-700: #334155;
  --bv-danger: #b91c1c;
  --bv-danger-bg: #fef2f2;
  --bv-ok: #15803d;
  --bv-radius: 1rem;
  --bv-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --bv-launcher-bottom: 4.75rem;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--bv-ink-900);
}

@media (min-width: 768px) {
  .bv-chat { --bv-launcher-bottom: 1.5rem; }
}

/* Suppress the legacy quick-enquiry bubble so only one launcher is on screen. */
[aria-label="Open quick enquiry options"] { display: none !important; }

/* ---------- Launcher ---------- */
.bv-launcher {
  position: fixed;
  right: 1rem;
  bottom: calc(var(--bv-launcher-bottom) + env(safe-area-inset-bottom, 0px));
  z-index: 2147483000;
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  height: 3.5rem;
  padding: 0 1.125rem 0 0.75rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--bv-ink-800), var(--bv-ink-950));
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(6, 11, 20, 0.05), 0 28px 56px -24px rgba(6, 11, 20, 0.4);
  transition: transform 0.3s var(--bv-ease), box-shadow 0.3s var(--bv-ease), opacity 0.2s linear;
}

.bv-launcher:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -14px rgba(217, 119, 6, 0.6); }
.bv-launcher:focus-visible { outline: 2px solid var(--bv-volt-500); outline-offset: 2px; }
.bv-launcher[hidden] { display: none !important; }

.bv-launcher__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.16);
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: var(--bv-volt-300);
}

.bv-launcher__label { white-space: nowrap; font-size: 0.9375rem; }

@media (max-width: 400px) {
  .bv-launcher { padding: 0; width: 3.5rem; justify-content: center; }
  .bv-launcher__label { display: none; }
}

.bv-launcher__dot {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 999px;
  border: 2px solid #fff;
  background: var(--bv-volt-400);
}

/* ---------- Panel ---------- */
.bv-panel {
  position: fixed;
  right: 1rem;
  bottom: calc(var(--bv-launcher-bottom) + env(safe-area-inset-bottom, 0px));
  z-index: 2147483001;
  display: flex;
  flex-direction: column;
  width: min(26rem, calc(100vw - 2rem));
  height: min(37rem, calc(100dvh - var(--bv-launcher-bottom) - 2rem));
  overflow: hidden;
  border: 1px solid var(--bv-slate-200);
  border-radius: 1.5rem;
  background: #fff;
  box-shadow: 0 4px 10px rgba(6, 11, 20, 0.05), 0 28px 56px -24px rgba(6, 11, 20, 0.32);
  animation: bv-in 0.32s var(--bv-ease) both;
}

.bv-panel[hidden] { display: none !important; }

@keyframes bv-in {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 520px) {
  .bv-panel {
    right: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 100dvh;
    border-radius: 0;
    border-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bv-panel, .bv-msg { animation: none !important; }
  .bv-launcher { transition: none; }
}

/* ---------- Header ---------- */
.bv-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9375rem 1rem;
  background: linear-gradient(180deg, var(--bv-ink-800), var(--bv-ink-950));
  color: #fff;
  flex: 0 0 auto;
}

.bv-head__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.16);
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: var(--bv-volt-300);
}

.bv-head__text { min-width: 0; flex: 1 1 auto; }
.bv-head__title { margin: 0; font-size: 0.9375rem; font-weight: 800; }
.bv-head__sub {
  margin: 0.0625rem 0 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}
.bv-head__sub::before {
  content: "";
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 999px;
  background: #4ade80;
  flex: 0 0 auto;
}

.bv-iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 auto;
  border: 0;
  border-radius: 0.625rem;
  background: transparent;
  color: #cbd5e1;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.bv-iconbtn:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.bv-iconbtn:focus-visible { outline: 2px solid var(--bv-volt-500); outline-offset: 2px; }

/* ---------- Log ---------- */
.bv-log {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1rem;
  background: var(--bv-slate-50);
  scrollbar-width: thin;
}

.bv-msg {
  display: flex;
  margin-bottom: 0.75rem;
  animation: bv-msg-in 0.28s var(--bv-ease) both;
}
@keyframes bv-msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.bv-msg--user { justify-content: flex-end; }

.bv-bubble {
  max-width: 88%;
  padding: 0.6875rem 0.875rem;
  border-radius: var(--bv-radius);
  font-size: 0.9063rem;
  overflow-wrap: anywhere;
}

.bv-msg--bot .bv-bubble {
  background: #fff;
  border: 1px solid var(--bv-slate-200);
  border-bottom-left-radius: 0.3125rem;
  box-shadow: 0 1px 2px rgba(6, 11, 20, 0.05);
}

.bv-msg--user .bv-bubble {
  background: var(--bv-ink-900);
  color: #fff;
  border-bottom-right-radius: 0.3125rem;
}

.bv-bubble p { margin: 0 0 0.5rem; }
.bv-bubble p:last-child { margin-bottom: 0; }
.bv-bubble strong { font-weight: 800; }
.bv-bubble ul { margin: 0 0 0.5rem; padding-left: 1.125rem; }
.bv-bubble ul:last-child { margin-bottom: 0; }
.bv-bubble li { margin-bottom: 0.25rem; }
.bv-bubble a { color: var(--bv-volt-700); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }

.bv-bubble--alert {
  background: var(--bv-danger-bg) !important;
  border-color: #fecaca !important;
  color: #7f1d1d;
}
.bv-bubble--alert a { color: var(--bv-danger); }

.bv-note {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--bv-slate-200);
  font-size: 0.75rem;
  color: var(--bv-slate-500);
  line-height: 1.45;
}

/* ---------- Typing ---------- */
.bv-typing { display: inline-flex; gap: 0.25rem; padding: 0.25rem 0; }
.bv-typing span {
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 999px;
  background: var(--bv-slate-300);
  animation: bv-blink 1.2s infinite ease-in-out;
}
.bv-typing span:nth-child(2) { animation-delay: 0.18s; }
.bv-typing span:nth-child(3) { animation-delay: 0.36s; }
@keyframes bv-blink { 0%, 60%, 100% { opacity: 0.3; } 30% { opacity: 1; } }

/* ---------- Chips ---------- */
.bv-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4375rem;
  padding: 0 1rem 0.75rem;
  background: var(--bv-slate-50);
  flex: 0 0 auto;
}
.bv-chips:empty { display: none; }

.bv-chip {
  border: 1px solid var(--bv-slate-200);
  border-radius: 999px;
  background: #fff;
  padding: 0.4375rem 0.75rem;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--bv-ink-800);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s var(--bv-ease);
  text-align: left;
}
.bv-chip:hover { border-color: rgba(245, 158, 11, 0.55); background: rgba(254, 243, 199, 0.45); transform: translateY(-1px); }
.bv-chip:focus-visible { outline: 2px solid var(--bv-volt-500); outline-offset: 2px; }
.bv-chip--primary { background: var(--bv-volt-500); border-color: var(--bv-volt-500); color: var(--bv-ink-950); }
.bv-chip--primary:hover { background: var(--bv-volt-400); border-color: var(--bv-volt-400); }

/* ---------- Composer ---------- */
.bv-composer {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid var(--bv-slate-200);
  background: #fff;
  padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
}

.bv-input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 2.75rem;
  max-height: 7rem;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--bv-slate-200);
  border-radius: 0.875rem;
  background: var(--bv-slate-50);
  font: inherit;
  font-size: 0.9063rem;
  color: var(--bv-ink-900);
  resize: none;
  overflow-y: auto;
}
.bv-input::placeholder { color: var(--bv-slate-500); }
.bv-input:focus { outline: none; border-color: var(--bv-volt-500); background: #fff; box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18); }

.bv-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 auto;
  border: 0;
  border-radius: 0.875rem;
  background: var(--bv-volt-500);
  color: var(--bv-ink-950);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s var(--bv-ease);
}
.bv-send:hover:not(:disabled) { background: var(--bv-volt-400); transform: translateY(-1px); }
.bv-send:disabled { opacity: 0.45; cursor: not-allowed; }
.bv-send:focus-visible { outline: 2px solid var(--bv-ink-900); outline-offset: 2px; }

.bv-foot {
  flex: 0 0 auto;
  padding: 0 0.75rem 0.625rem;
  background: #fff;
  font-size: 0.6875rem;
  line-height: 1.4;
  color: var(--bv-slate-500);
  text-align: center;
}
.bv-foot a { color: var(--bv-slate-600); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- In-chat form ---------- */
.bv-form {
  border: 1px solid var(--bv-slate-200);
  border-radius: var(--bv-radius);
  background: #fff;
  padding: 0.875rem;
  box-shadow: 0 1px 2px rgba(6, 11, 20, 0.05);
  max-width: 100%;
}

.bv-form__title { margin: 0 0 0.125rem; font-size: 0.875rem; font-weight: 800; }
.bv-form__hint { margin: 0 0 0.75rem; font-size: 0.75rem; color: var(--bv-slate-500); }

.bv-field { margin-bottom: 0.625rem; }
.bv-field:last-of-type { margin-bottom: 0.75rem; }

.bv-label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bv-slate-500);
}

.bv-control {
  display: block;
  width: 100%;
  padding: 0.5625rem 0.75rem;
  border: 1px solid var(--bv-slate-200);
  border-radius: 0.625rem;
  background: var(--bv-slate-50);
  font: inherit;
  font-size: 0.875rem;
  color: var(--bv-ink-900);
}
.bv-control:focus { outline: none; border-color: var(--bv-volt-500); background: #fff; box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18); }
textarea.bv-control { resize: vertical; min-height: 4.5rem; }
.bv-control[aria-invalid="true"] { border-color: #dc2626; background: var(--bv-danger-bg); }

.bv-error { margin: 0.25rem 0 0; font-size: 0.6875rem; font-weight: 700; color: var(--bv-danger); }
.bv-error:empty { display: none; }

.bv-check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--bv-slate-600);
  cursor: pointer;
  margin-bottom: 0.75rem;
}
.bv-check input { margin-top: 0.1875rem; width: 1rem; height: 1rem; flex: 0 0 auto; accent-color: var(--bv-volt-600); }

.bv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4375rem;
  width: 100%;
  min-height: 2.75rem;
  padding: 0 1rem;
  border: 1px solid transparent;
  border-radius: 0.75rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s var(--bv-ease);
  text-decoration: none;
}
.bv-btn:focus-visible { outline: 2px solid var(--bv-volt-500); outline-offset: 2px; }
.bv-btn--volt { background: var(--bv-volt-500); color: var(--bv-ink-950); }
.bv-btn--volt:hover:not(:disabled) { background: var(--bv-volt-400); transform: translateY(-1px); }
.bv-btn--ink { background: var(--bv-ink-900); color: #fff; }
.bv-btn--ink:hover { background: var(--bv-ink-800); transform: translateY(-1px); }
.bv-btn--ghost { background: #fff; border-color: var(--bv-slate-200); color: var(--bv-ink-800); }
.bv-btn--ghost:hover { border-color: var(--bv-slate-300); }
.bv-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.bv-btn + .bv-btn { margin-top: 0.4375rem; }

.bv-progress {
  display: flex;
  gap: 0.1875rem;
  margin-bottom: 0.75rem;
}
.bv-progress span {
  height: 0.1875rem;
  flex: 1 1 0;
  border-radius: 999px;
  background: var(--bv-slate-200);
}
.bv-progress span.is-done { background: var(--bv-volt-500); }

.bv-summary {
  margin: 0 0 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.625rem;
  background: var(--bv-slate-50);
  border: 1px solid var(--bv-slate-200);
  font-size: 0.75rem;
  color: var(--bv-slate-600);
}
.bv-summary dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0.1875rem 0.625rem; }
.bv-summary dt { font-weight: 800; color: var(--bv-slate-500); }
.bv-summary dd { margin: 0; overflow-wrap: anywhere; }

.bv-ok { color: var(--bv-ok); font-weight: 800; }

.bv-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
