/* =========================================================
   BLOCK GEMINI CONCIERGE — sitewide contact widget
   Reuses brand: navy field, cyan/mint accents, mono labels.
   ========================================================= */

:root {
  --bgc-bg: #050a14;
  --bgc-bg-2: #0a1424;
  --bgc-bg-3: #0e1a2e;
  --bgc-line: rgba(120, 150, 200, 0.18);
  --bgc-line-2: rgba(120, 150, 200, 0.30);
  --bgc-text: #e6ecf5;
  --bgc-text-2: rgba(220, 230, 245, 0.78);
  --bgc-text-3: rgba(200, 215, 235, 0.55);
  --bgc-cyan: #4FC8FF;
  --bgc-mint: #34D399;
  --bgc-blue: #0055FF;
  --bgc-amber: #FFB554;
  --bgc-red: #FF6B6B;
}

/* ========================================================= */
/* LAUNCHER — bright BG-branded flashing pill                 */
/* ========================================================= */
.bgc-launch {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9000;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 14px 26px 14px 14px;
  background: linear-gradient(180deg, #0a1426 0%, #050a14 100%);
  border: 2px solid rgba(79, 200, 255, 0.7);
  border-radius: 999px;
  color: #fff;
  font-family: inherit;
  cursor: pointer;
  isolation: isolate;
  box-shadow:
    0 0 0 1px rgba(79, 200, 255, 0.35),
    0 0 28px rgba(79, 200, 255, 0.55),
    0 14px 40px rgba(0, 85, 255, 0.45),
    0 6px 18px rgba(0, 0, 0, 0.4);
  animation: bgcLaunchFlash 1.6s ease-in-out infinite;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.bgc-launch.hidden { opacity: 0; pointer-events: none; transform: scale(0.9); }
.bgc-launch:hover { transform: translateY(-2px); }

/* Soft halo behind the pill — flashes, doesn't rotate */
.bgc-launch-glow {
  position: absolute;
  inset: -6px;
  border-radius: 999px;
  z-index: -1;
  background: radial-gradient(ellipse at center, rgba(79, 200, 255, 0.55) 0%, rgba(0, 85, 255, 0.35) 45%, transparent 75%);
  filter: blur(14px);
  animation: bgcLaunchHalo 1.6s ease-in-out infinite;
}

@keyframes bgcLaunchFlash {
  0%, 100% {
    border-color: rgba(79, 200, 255, 0.7);
    box-shadow:
      0 0 0 1px rgba(79, 200, 255, 0.35),
      0 0 28px rgba(79, 200, 255, 0.55),
      0 14px 40px rgba(0, 85, 255, 0.45),
      0 6px 18px rgba(0, 0, 0, 0.4);
  }
  50% {
    border-color: rgba(140, 220, 255, 1);
    box-shadow:
      0 0 0 2px rgba(79, 200, 255, 0.7),
      0 0 50px rgba(79, 200, 255, 0.95),
      0 18px 56px rgba(0, 85, 255, 0.75),
      0 6px 18px rgba(0, 0, 0, 0.4);
  }
}
@keyframes bgcLaunchHalo {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}

.bgc-launch-icon {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 30%, rgba(79, 200, 255, 0.45), rgba(0, 85, 255, 0.28) 60%, rgba(0,0,0,0.3) 90%);
  border: 1px solid rgba(79, 200, 255, 0.6);
  flex: 0 0 42px;
  box-shadow: inset 0 0 12px rgba(79, 200, 255, 0.25);
}
.bgc-launch-icon svg { width: 22px; height: 22px; stroke-width: 1.8; color: #fff; }
.bgc-launch-icon::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1.5px solid rgba(79, 200, 255, 0.55);
  animation: bgcRing 2.2s ease-out infinite;
}
@keyframes bgcRing {
  0% { transform: scale(0.92); opacity: 0.85; }
  80%, 100% { transform: scale(1.5); opacity: 0; }
}

.bgc-launch-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  line-height: 1;
}
.bgc-launch-label {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: #fff;
  text-shadow: 0 0 12px rgba(79, 200, 255, 0.4);
}
.bgc-launch-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(220, 235, 255, 0.85);
}
.bgc-launch-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 6px #22C55E, 0 0 0 3px rgba(34, 197, 94, 0.22);
  animation: bgcLiveDot 1.4s ease-in-out infinite;
}
@keyframes bgcLiveDot {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px #22C55E, 0 0 0 3px rgba(34, 197, 94, 0.22); }
  50% { opacity: 0.55; box-shadow: 0 0 10px #22C55E, 0 0 0 5px rgba(34, 197, 94, 0.05); }
}
.bgc-launch-status-text { line-height: 1; white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  .bgc-launch, .bgc-launch-glow, .bgc-launch-icon::after, .bgc-launch-status-dot { animation: none !important; }
}

/* ========================================================= */
/* HOVER PREVIEW — peeks open above launcher */
/* ========================================================= */
.bgc-preview {
  position: fixed;
  right: 28px;
  bottom: 96px;
  z-index: 8999;
  width: 320px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(14, 26, 46, 0.98), rgba(6, 12, 22, 0.98));
  border: 1px solid var(--bgc-line-2);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.22s ease;
  backdrop-filter: blur(12px);
}
.bgc-preview.on { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.bgc-preview-h {
  font-family: var(--font-mono, monospace);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--bgc-cyan);
  margin-bottom: 10px;
}
.bgc-preview-p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--bgc-text-2);
  margin-bottom: 14px;
}
.bgc-preview-row { display: flex; gap: 6px; }
.bgc-mini {
  flex: 1;
  padding: 9px 10px;
  background: rgba(79, 200, 255, 0.1);
  border: 1px solid rgba(79, 200, 255, 0.32);
  border-radius: 8px;
  color: var(--bgc-cyan);
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: background 0.15s ease;
}
.bgc-mini:hover { background: rgba(79, 200, 255, 0.18); }

/* ========================================================= */
/* OVERLAY + EXPANDED PANEL */
/* ========================================================= */
.bgc-overlay {
  position: fixed; inset: 0;
  background: rgba(2, 6, 14, 0.72);
  backdrop-filter: blur(6px);
  z-index: 9100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.bgc-overlay.on { opacity: 1; pointer-events: auto; }

.bgc-panel {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 440px;
  max-width: calc(100vw - 32px);
  height: min(720px, calc(100vh - 48px));
  z-index: 9200;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #0a1426 0%, #060c1a 100%);
  border: 1px solid var(--bgc-line-2);
  border-radius: 18px;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(79, 200, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}
.bgc-panel.on { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

/* Header */
.bgc-head {
  position: relative;
  padding: 22px 22px 18px;
  border-bottom: 1px solid var(--bgc-line);
  background:
    radial-gradient(80% 100% at 100% 0%, rgba(79, 200, 255, 0.10), transparent 60%),
    linear-gradient(180deg, rgba(20, 32, 56, 0.6), transparent);
  display: flex; align-items: center; gap: 14px;
}
.bgc-head-mark {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(79, 200, 255, 0.22), rgba(0, 85, 255, 0.18));
  border: 1px solid rgba(79, 200, 255, 0.42);
  display: grid; place-items: center;
  color: var(--bgc-cyan);
  flex: 0 0 44px;
}
.bgc-head-mark svg { width: 22px; height: 22px; }
.bgc-head-text { flex: 1; min-width: 0; }
.bgc-head-h {
  font-size: 16px;
  font-weight: 600;
  color: var(--bgc-text);
  letter-spacing: -0.005em;
  margin-bottom: 4px;
}
.bgc-head-s {
  font-family: var(--font-mono, monospace);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--bgc-text-3);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.bgc-head-s .live {
  color: var(--bgc-mint);
  display: inline-flex; align-items: center; gap: 5px;
}
.bgc-head-s .live .d {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--bgc-mint);
  box-shadow: 0 0 6px var(--bgc-mint);
  animation: bgcPulse 2s ease-in-out infinite;
}
.bgc-head-s .sep { opacity: 0.4; }
.bgc-close {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--bgc-line);
  color: var(--bgc-text-2);
  cursor: pointer;
  display: grid; place-items: center;
  transition: background 0.15s ease;
  flex: 0 0 32px;
}
.bgc-close svg { width: 16px; height: 16px; }
.bgc-close:hover { background: rgba(255, 255, 255, 0.08); color: var(--bgc-text); }

/* Tabs */
.bgc-tabs {
  display: flex; gap: 0;
  padding: 4px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--bgc-line);
  border-radius: 10px;
  overflow-x: auto;
}
.bgc-tab {
  flex: 1;
  padding: 8px 8px;
  border: 0;
  background: transparent;
  color: var(--bgc-text-3);
  font-family: var(--font-mono, monospace);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  cursor: pointer;
  border-radius: 7px;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.bgc-tab:hover { color: var(--bgc-text-2); }
.bgc-tab.on {
  background: linear-gradient(180deg, rgba(79, 200, 255, 0.18), rgba(79, 200, 255, 0.08));
  color: var(--bgc-cyan);
  box-shadow: inset 0 0 0 1px rgba(79, 200, 255, 0.32);
}

/* Body */
.bgc-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.bgc-body::-webkit-scrollbar { width: 6px; }
.bgc-body::-webkit-scrollbar-track { background: transparent; }
.bgc-body::-webkit-scrollbar-thumb { background: rgba(120, 150, 200, 0.2); border-radius: 3px; }

.bgc-pagechip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(79, 200, 255, 0.06);
  border: 1px solid rgba(79, 200, 255, 0.22);
  border-radius: 6px;
  width: fit-content;
  font-family: var(--font-mono, monospace);
  font-size: 9px;
  letter-spacing: 0.14em;
}
.bgc-pagechip .l { color: var(--bgc-text-3); }
.bgc-pagechip .v { color: var(--bgc-cyan); }

.bgc-intro {
  font-size: 14px;
  line-height: 1.55;
  color: var(--bgc-text-2);
  text-wrap: pretty;
}
.bgc-intro b { color: var(--bgc-text); font-weight: 600; }

/* Prompt suggestions */
.bgc-prompts {
  display: flex; flex-direction: column; gap: 6px;
}
.bgc-prompt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--bgc-line);
  border-radius: 9px;
  color: var(--bgc-text-2);
  font-family: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.bgc-prompt:hover {
  background: rgba(79, 200, 255, 0.06);
  border-color: rgba(79, 200, 255, 0.3);
  color: var(--bgc-text);
}
.bgc-prompt .ar { color: var(--bgc-cyan); font-size: 14px; }

/* Channel cards */
.bgc-sep {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono, monospace);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--bgc-text-3);
  margin: 4px 0 -2px;
}
.bgc-sep::before, .bgc-sep::after {
  content: ''; flex: 1; height: 1px;
  background: var(--bgc-line);
}
.bgc-channels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.bgc-ch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 6px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--bgc-line);
  border-radius: 10px;
  color: var(--bgc-text-2);
  font-family: var(--font-mono, monospace);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.bgc-ch svg { width: 20px; height: 20px; color: var(--bgc-cyan); }
.bgc-ch:hover {
  background: rgba(79, 200, 255, 0.06);
  border-color: rgba(79, 200, 255, 0.32);
  color: var(--bgc-text);
}
.bgc-ch-l { font-weight: 500; }

.bgc-cta {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 18px;
  background: linear-gradient(180deg, var(--bgc-blue), #003ec2);
  border: 1px solid rgba(79, 200, 255, 0.5);
  border-radius: 10px;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(79, 200, 255, 0.18), 0 8px 20px rgba(0, 85, 255, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.bgc-cta:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(79, 200, 255, 0.32), 0 12px 28px rgba(0, 85, 255, 0.4); }
.bgc-cta svg { width: 16px; height: 16px; }
.bgc-cta.ghost {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--bgc-line-2);
  color: var(--bgc-text);
  box-shadow: none;
}
.bgc-cta.ghost:hover { background: rgba(255, 255, 255, 0.08); }

/* Quick-switch row inside chat: WhatsApp / Call / Callback / Demo */
.bgc-switch {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.bgc-switch-btn {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 9px 4px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--bgc-line);
  border-radius: 9px;
  color: var(--bgc-text-2);
  font-family: var(--font-mono, monospace);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.bgc-switch-btn svg { width: 16px; height: 16px; color: var(--bgc-cyan); }
.bgc-switch-btn:hover {
  background: rgba(79, 200, 255, 0.06);
  border-color: rgba(79, 200, 255, 0.3);
  color: var(--bgc-text);
}
.bgc-switch-btn.wa svg { color: #25D366; }
.bgc-switch-btn.primary {
  background: linear-gradient(180deg, rgba(0, 85, 255, 0.32), rgba(0, 85, 255, 0.18));
  border-color: rgba(79, 200, 255, 0.4);
  color: #fff;
}
.bgc-switch-btn.primary svg { color: #fff; }

/* ========================================================= */
/* CHAT VIEW */
/* ========================================================= */
.bgc-chat-msgs {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 240px;
}
.bgc-msg {
  max-width: 86%;
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.5;
  animation: bgcMsgIn 0.25s ease-out;
}
@keyframes bgcMsgIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.bgc-msg.them {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--bgc-line);
  color: var(--bgc-text);
  border-bottom-left-radius: 4px;
}
.bgc-msg.you {
  align-self: flex-end;
  background: linear-gradient(180deg, rgba(0, 85, 255, 0.32), rgba(0, 85, 255, 0.22));
  border: 1px solid rgba(79, 200, 255, 0.4);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.bgc-msg-meta {
  font-family: var(--font-mono, monospace);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--bgc-text-3);
  margin-bottom: 4px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.bgc-msg-meta.them { align-self: flex-start; }
.bgc-msg-meta.you { align-self: flex-end; color: var(--bgc-cyan); }
.bgc-msg-meta .d {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--bgc-mint);
  box-shadow: 0 0 4px var(--bgc-mint);
}
.bgc-msg-meta.you .d { background: var(--bgc-cyan); box-shadow: 0 0 4px var(--bgc-cyan); }

.bgc-typing {
  display: inline-flex; gap: 4px; padding: 2px 0;
}
.bgc-typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--bgc-text-3);
  animation: bgcDot 1.4s ease-in-out infinite;
}
.bgc-typing span:nth-child(2) { animation-delay: 0.18s; }
.bgc-typing span:nth-child(3) { animation-delay: 0.36s; }
@keyframes bgcDot {
  0%, 80%, 100% { opacity: 0.3; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}

.bgc-input-wrap {
  display: flex;
  gap: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--bgc-line);
  border-radius: 12px;
  margin-top: 6px;
}
.bgc-input-wrap input {
  flex: 1;
  background: transparent;
  border: 0;
  color: var(--bgc-text);
  font-family: inherit;
  font-size: 13.5px;
  padding: 6px 4px;
  outline: none;
}
.bgc-input-wrap input::placeholder { color: var(--bgc-text-3); }
.bgc-input-wrap button {
  width: 38px; height: 38px;
  border: 0;
  border-radius: 9px;
  background: linear-gradient(180deg, var(--bgc-blue), #003ec2);
  color: #fff;
  cursor: pointer;
  display: grid; place-items: center;
  transition: transform 0.15s ease;
}
.bgc-input-wrap button:hover { transform: translateY(-1px); }
.bgc-input-wrap button svg { width: 16px; height: 16px; }

/* ========================================================= */
/* DEMO + CALLBACK FORMS */
/* ========================================================= */
.bgc-form { display: flex; flex-direction: column; gap: 12px; }
.bgc-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.bgc-form-row.full { grid-template-columns: 1fr; }
.bgc-field { display: flex; flex-direction: column; gap: 5px; }
.bgc-field label {
  font-family: var(--font-mono, monospace);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--bgc-text-3);
}
.bgc-field input, .bgc-field select, .bgc-field textarea {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--bgc-line);
  border-radius: 8px;
  color: var(--bgc-text);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
  width: 100%;
  box-sizing: border-box;
}
.bgc-field textarea { resize: vertical; min-height: 60px; font-family: inherit; }
.bgc-field input::placeholder, .bgc-field textarea::placeholder { color: var(--bgc-text-3); }
.bgc-field input:focus, .bgc-field select:focus, .bgc-field textarea:focus {
  border-color: rgba(79, 200, 255, 0.5);
  background: rgba(79, 200, 255, 0.04);
}
.bgc-field select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2378a8d8' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  padding-right: 32px;
}

/* Success state */
.bgc-success {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; text-align: center;
  padding: 28px 16px;
}
.bgc-success svg {
  width: 48px; height: 48px;
  color: var(--bgc-mint);
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.4);
  border-radius: 50%;
  padding: 10px;
  box-sizing: border-box;
}
.bgc-success h4 { font-size: 18px; font-weight: 600; color: var(--bgc-text); margin: 0; }
.bgc-success p { font-size: 13.5px; line-height: 1.55; color: var(--bgc-text-2); margin: 0; max-width: 280px; }

/* footer removed — disclaimer no longer shown */

/* ========================================================= */
/* VOICE AGENT VIEW                                           */
/* ========================================================= */
.bgc-voice { display: flex; flex-direction: column; gap: 14px; }

.bgc-voice-stage {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px;
  padding: 22px 18px 18px;
  border-radius: 14px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(0,85,255,0.22), transparent 60%),
    linear-gradient(180deg, rgba(14,26,46,0.92), rgba(6,12,22,0.96));
  border: 1px solid var(--bgc-line);
  overflow: hidden;
}
.bgc-voice-orb {
  position: relative;
  width: 110px; height: 110px;
  display: grid; place-items: center;
}
.bgc-voice-orb .core {
  width: 64px; height: 64px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #b6e5ff 0%, #4FC8FF 35%, #0055FF 75%, #001a55 100%);
  box-shadow: 0 0 32px rgba(79,200,255,0.65), inset 0 0 18px rgba(255,255,255,0.25);
  animation: bgcOrbPulse 2.4s ease-in-out infinite;
}
.bgc-voice-orb .ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(79,200,255,0.45);
  opacity: 0;
}
.state-idle .ring { animation: none; }
.state-listening .ring,
.state-speaking .ring,
.state-connecting .ring,
.state-thinking .ring {
  animation: bgcOrbRing 2.4s ease-out infinite;
}
.bgc-voice-orb .ring.r2 { animation-delay: 0.8s; }
.bgc-voice-orb .ring.r3 { animation-delay: 1.6s; }
.state-listening .bgc-voice-orb .core { animation-duration: 1.2s; box-shadow: 0 0 38px rgba(52,211,153,0.7), inset 0 0 18px rgba(255,255,255,0.3); }
.state-speaking .bgc-voice-orb .core { animation-duration: 0.6s; }
.state-thinking .bgc-voice-orb .core { animation-duration: 1.8s; filter: hue-rotate(20deg); }

@keyframes bgcOrbPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
@keyframes bgcOrbRing {
  0% { transform: scale(0.6); opacity: 0.6; }
  100% { transform: scale(1.6); opacity: 0; }
}

.bgc-voice-status {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono, monospace);
  font-size: 10px; letter-spacing: 0.16em;
  color: var(--bgc-cyan);
}
.bgc-voice-status .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--bgc-mint);
  box-shadow: 0 0 10px var(--bgc-mint);
  animation: bgcDotBlink 1.2s ease-in-out infinite;
}
.state-idle .bgc-voice-status .dot { background: var(--bgc-text-3); box-shadow: none; animation: none; }
.bgc-voice-status .timer { color: var(--bgc-text-3); margin-left: 2px; }
@keyframes bgcDotBlink { 50% { opacity: 0.35; } }
.bgc-voice-name { font-size: 12.5px; color: var(--bgc-text-2); letter-spacing: 0.02em; }

.bgc-voice-pre { display: flex; flex-direction: column; gap: 12px; }
.bgc-voice-pre p { font-size: 13.5px; line-height: 1.55; color: var(--bgc-text-2); margin: 0; }
.bgc-voice-warn {
  padding: 10px 12px;
  background: rgba(255, 181, 84, 0.08);
  border: 1px solid rgba(255, 181, 84, 0.32);
  border-radius: 8px;
  font-size: 12px;
  color: #ffd28a;
  line-height: 1.5;
}
.bgc-voice-start { background: linear-gradient(180deg, #0070ff, #003ec2) !important; }

.bgc-voice-transcript {
  max-height: 180px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--bgc-line);
  border-radius: 10px;
  background: rgba(0,0,0,0.22);
}
.bgc-voice-line { display: flex; gap: 10px; align-items: flex-start; }
.bgc-voice-line .who {
  flex: 0 0 auto;
  font-family: var(--font-mono, monospace);
  font-size: 9px; letter-spacing: 0.14em;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--bgc-line);
  color: var(--bgc-text-3);
  margin-top: 1px;
}
.bgc-voice-line.agent .who { color: var(--bgc-cyan); border-color: rgba(79,200,255,0.35); }
.bgc-voice-line.you .who { color: var(--bgc-mint); border-color: rgba(52,211,153,0.35); }
.bgc-voice-line .txt { font-size: 13px; line-height: 1.5; color: var(--bgc-text); }
.bgc-voice-line.interim .txt { color: var(--bgc-text-3); font-style: italic; }

.bgc-voice-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bgc-voice-ctrl {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--bgc-line-2);
  border-radius: 9px;
  color: var(--bgc-text);
  font-family: inherit; font-size: 13px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.bgc-voice-ctrl svg { width: 16px; height: 16px; }
.bgc-voice-ctrl:hover { background: rgba(255,255,255,0.08); }
.bgc-voice-ctrl.on { background: rgba(255,181,84,0.12); border-color: rgba(255,181,84,0.4); color: #ffd28a; }
.bgc-voice-ctrl.end {
  background: rgba(255,107,107,0.14);
  border-color: rgba(255,107,107,0.45);
  color: #ffb0b0;
}
.bgc-voice-ctrl.end:hover { background: rgba(255,107,107,0.22); }

/* Phone (traditional) card */
.bgc-phone-card {
  padding: 14px;
  border: 1px solid var(--bgc-line);
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
  display: flex; flex-direction: column; gap: 10px;
}
.bgc-phone-card-head { display: flex; align-items: center; gap: 10px; }
.bgc-phone-card-head svg { width: 22px; height: 22px; color: var(--bgc-text-2); }
.bgc-phone-card-head .t { font-size: 13px; color: var(--bgc-text); font-weight: 500; }
.bgc-phone-card-head .s { font-size: 11.5px; color: var(--bgc-text-3); }
.bgc-phone-number {
  display: block;
  font-family: var(--font-mono, monospace);
  font-size: 22px; letter-spacing: 0.04em;
  color: var(--bgc-cyan);
  text-decoration: none;
  text-align: center;
  padding: 8px 4px;
  border-top: 1px dashed var(--bgc-line);
  border-bottom: 1px dashed var(--bgc-line);
}
.bgc-phone-actions { display: flex; gap: 8px; }

/* Inline phone line under home channels */
.bgc-phone-line {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border: 1px dashed var(--bgc-line-2);
  border-radius: 10px;
  font-size: 12.5px; color: var(--bgc-text-2);
}
.bgc-phone-line svg { width: 16px; height: 16px; color: var(--bgc-text-3); flex: 0 0 auto; }
.bgc-phone-line b { color: var(--bgc-text); font-family: var(--font-mono, monospace); letter-spacing: 0.04em; }
.bgc-phone-link {
  margin-left: auto;
  background: transparent; border: 0;
  color: var(--bgc-cyan); cursor: pointer;
  font-family: var(--font-mono, monospace);
  font-size: 10px; letter-spacing: 0.12em;
}

/* Voice CTA strip inside chat */
.bgc-voice-cta {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(0,85,255,0.18), rgba(79,200,255,0.10));
  border: 1px solid rgba(79,200,255,0.35);
  cursor: pointer;
  color: var(--bgc-text);
  text-align: left;
  font: inherit;
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.bgc-voice-cta:hover { transform: translateY(-1px); border-color: rgba(79,200,255,0.6); }
.bgc-voice-cta svg { width: 20px; height: 20px; color: var(--bgc-cyan); flex: 0 0 auto; }
.bgc-voice-cta-text { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.bgc-voice-cta-text b { font-size: 13px; font-weight: 600; }
.bgc-voice-cta-text span { font-size: 11.5px; color: var(--bgc-text-3); }
.bgc-voice-cta-arrow { color: var(--bgc-cyan); font-size: 18px; }
.bgc-voice-cta-pulse {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(79,200,255,0.4);
  filter: blur(8px);
  animation: bgcCtaPulse 1.8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes bgcCtaPulse { 0%,100% { opacity: 0.3; transform: translateY(-50%) scale(0.9); } 50% { opacity: 0.7; transform: translateY(-50%) scale(1.2); } }

/* Voice button in chat switch row */
.bgc-switch-btn.voice svg { color: var(--bgc-mint); }

/* ========================================================= */
/* TOAST (scroll/time trigger) */
/* ========================================================= */
.bgc-toast {
  position: fixed;
  right: 28px;
  bottom: 96px;
  z-index: 8950;
  width: 320px;
  padding: 14px 16px;
  background: linear-gradient(180deg, rgba(14, 26, 46, 0.98), rgba(6, 12, 22, 0.98));
  border: 1px solid rgba(79, 200, 255, 0.42);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(79, 200, 255, 0.16);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.bgc-toast.on { opacity: 1; transform: translateY(0); pointer-events: auto; }
.bgc-toast-h {
  font-family: var(--font-mono, monospace);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--bgc-cyan);
  margin-bottom: 6px;
  display: flex; justify-content: space-between; align-items: center;
}
.bgc-toast-h .x { background: transparent; border: 0; color: var(--bgc-text-3); cursor: pointer; padding: 0 2px; line-height: 1; font-size: 16px; }
.bgc-toast-h .x:hover { color: var(--bgc-text); }
.bgc-toast-p { font-size: 13px; line-height: 1.5; color: var(--bgc-text-2); margin-bottom: 10px; }
.bgc-toast-btn {
  width: 100%;
  padding: 8px 12px;
  background: rgba(79, 200, 255, 0.12);
  border: 1px solid rgba(79, 200, 255, 0.4);
  border-radius: 7px;
  color: var(--bgc-cyan);
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: background 0.15s ease;
}
.bgc-toast-btn:hover { background: rgba(79, 200, 255, 0.2); }

/* ========================================================= */
/* MOBILE STICKY BAR */
/* ========================================================= */
.bgc-mob {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 9000;
  padding: 8px 8px calc(env(safe-area-inset-bottom, 0) + 8px);
  background: linear-gradient(180deg, rgba(8, 14, 26, 0.92), rgba(4, 8, 16, 0.98));
  border-top: 1px solid var(--bgc-line-2);
  backdrop-filter: blur(12px);
  gap: 6px;
}
.bgc-mob-btn {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 4px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--bgc-line);
  border-radius: 9px;
  color: var(--bgc-text-2);
  font-family: var(--font-mono, monospace);
  font-size: 9px;
  letter-spacing: 0.1em;
  cursor: pointer;
}
.bgc-mob-btn svg { width: 18px; height: 18px; color: var(--bgc-cyan); }
.bgc-mob-btn.primary {
  background: linear-gradient(180deg, var(--bgc-blue), #003ec2);
  color: #fff;
  border-color: rgba(79, 200, 255, 0.5);
}
.bgc-mob-btn.primary svg { color: #fff; }
.bgc-mob-btn .l { font-weight: 500; }

/* ========================================================= */
/* EXIT INTENT MODAL */
/* ========================================================= */
.bgc-exit {
  position: fixed; inset: 0;
  z-index: 9300;
  background: rgba(2, 6, 14, 0.78);
  backdrop-filter: blur(8px);
  display: grid; place-items: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.28s ease;
}
.bgc-exit.on { opacity: 1; pointer-events: auto; }
.bgc-exit-card {
  position: relative;
  width: 100%; max-width: 520px;
  padding: 36px 32px 32px;
  background: linear-gradient(180deg, #0a1426, #060c1a);
  border: 1px solid var(--bgc-line-2);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(79, 200, 255, 0.12);
  transform: translateY(10px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.bgc-exit.on .bgc-exit-card { transform: translateY(0); }
.bgc-exit-card .bgc-close {
  position: absolute; top: 14px; right: 14px;
}
.bgc-exit-eye {
  font-family: var(--font-mono, monospace);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--bgc-cyan);
  margin-bottom: 12px;
  display: inline-flex; align-items: center; gap: 6px;
}
.bgc-exit-eye .d {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--bgc-cyan);
  box-shadow: 0 0 6px var(--bgc-cyan);
}
.bgc-exit-h {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--bgc-text);
  margin-bottom: 10px;
  text-wrap: balance;
}
.bgc-exit-p {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--bgc-text-2);
  margin-bottom: 20px;
}
.bgc-exit-btns {
  display: flex; gap: 8px; flex-wrap: wrap;
}

/* ========================================================= */
/* RESPONSIVE */
/* ========================================================= */
@media (max-width: 720px) {
  .bgc-launch { display: none; }
  .bgc-preview { display: none; }
  .bgc-mob { display: flex; }
  body.bgc-has-mob { padding-bottom: 72px; }
  .bgc-toast { display: none; }
  .bgc-panel {
    right: 0; bottom: 0; left: 0;
    width: 100%; max-width: 100%;
    height: 100vh; height: 100dvh;
    border-radius: 0;
    margin: 0;
  }
  .bgc-form-row { grid-template-columns: 1fr; }
}

@media (min-width: 721px) {
  .bgc-mob { display: none !important; }
  body.bgc-has-mob { padding-bottom: 0 !important; }
}
