/* BrookCherit Vapi AI Shopping Assistant */
.bc-vapi {
  --bc-vapi-navy: #05162e;
  --bc-vapi-navy-mid: #0a2240;
  --bc-vapi-gold: #d4af37;
  --bc-vapi-gold-dark: #c5a028;
  --bc-vapi-cream: #f7f3e8;
  --bc-vapi-text: #333;
  --bc-vapi-muted: #6b7280;
  font-family: Jost, "Segoe UI", sans-serif;
  z-index: 10050;
}

.bc-vapi-fab {
  position: fixed;
  right: 24px;
  bottom: 88px;
  z-index: 10051;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 18px 0 14px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--bc-vapi-navy) 0%, var(--bc-vapi-navy-mid) 100%);
  color: #fff;
  box-shadow: 0 10px 28px rgba(5, 22, 46, 0.35);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bc-vapi-fab:hover,
.bc-vapi-fab:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(5, 22, 46, 0.4);
  outline: 2px solid var(--bc-vapi-gold);
  outline-offset: 2px;
}

.bc-vapi-fab-label {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.bc-vapi-online {
  position: absolute;
  top: 10px;
  left: 34px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid var(--bc-vapi-navy);
}

.bc-vapi-fab-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 999px;
  border: 2px solid rgba(212, 175, 55, 0.55);
  opacity: 0;
  pointer-events: none;
}

.bc-vapi-fab.is-pulse .bc-vapi-fab-pulse {
  animation: bc-vapi-pulse 1.6s ease-out 2;
}

.bc-vapi-fab.is-shake {
  animation: bc-vapi-shake 0.45s ease-in-out 4;
}

@keyframes bc-vapi-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

@keyframes bc-vapi-pulse {
  0% { opacity: 0.7; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.18); }
}

@media (prefers-reduced-motion: reduce) {
  .bc-vapi-fab.is-shake,
  .bc-vapi-fab.is-pulse .bc-vapi-fab-pulse,
  .bc-vapi-wave span {
    animation: none !important;
  }
}

.bc-vapi-bubble {
  position: fixed;
  right: 24px;
  bottom: 168px;
  z-index: 10052;
  max-width: 260px;
  background: #fff;
  color: var(--bc-vapi-text);
  border: 1px solid rgba(5, 22, 46, 0.08);
  border-radius: 14px;
  padding: 14px 36px 14px 14px;
  box-shadow: 0 12px 30px rgba(5, 22, 46, 0.18);
  font-size: 0.88rem;
  line-height: 1.4;
}

.bc-vapi-bubble::after {
  content: "";
  position: absolute;
  right: 28px;
  bottom: -8px;
  border: 8px solid transparent;
  border-top-color: #fff;
}

.bc-vapi-bubble-close {
  position: absolute;
  top: 6px;
  right: 8px;
  border: 0;
  background: transparent;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--bc-vapi-muted);
  cursor: pointer;
}

.bc-vapi-panel {
  position: fixed;
  right: 24px;
  bottom: 168px;
  z-index: 10053;
  width: min(420px, calc(100vw - 24px));
  max-height: min(82vh, 720px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(5, 22, 46, 0.28);
  border: 1px solid rgba(5, 22, 46, 0.08);
}

.bc-vapi-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--bc-vapi-navy), var(--bc-vapi-navy-mid));
  color: #fff;
}

.bc-vapi-brand {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.bc-vapi-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
}

.bc-vapi-header h2 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  color: #fff;
}

.bc-vapi-sub {
  margin: 2px 0 0;
  font-size: 0.72rem;
  opacity: 0.85;
}

.bc-vapi-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bc-vapi-status {
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  white-space: nowrap;
}

.bc-vapi-icon-btn {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: rgba(255,255,255,0.12);
  color: #fff;
  cursor: pointer;
  font-size: 1.1rem;
}

.bc-vapi-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  overflow: auto;
  background: linear-gradient(180deg, #fff 0%, var(--bc-vapi-cream) 140%);
}

.bc-vapi-privacy {
  font-size: 0.78rem;
  color: var(--bc-vapi-muted);
  margin: 0 0 8px;
  line-height: 1.45;
}

.bc-vapi-consent {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 0.82rem;
  margin-bottom: 10px;
}

.bc-vapi-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bc-vapi-suggestions button {
  border: 1px solid rgba(5, 22, 46, 0.12);
  background: #fff;
  color: var(--bc-vapi-navy);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.72rem;
  cursor: pointer;
}

.bc-vapi-suggestions button:hover,
.bc-vapi-suggestions button:focus-visible {
  border-color: var(--bc-vapi-gold);
  background: rgba(212, 175, 55, 0.12);
}

.bc-vapi-callbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(5, 22, 46, 0.04);
}

.bc-vapi-wave {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 22px;
}

.bc-vapi-wave span {
  width: 3px;
  height: 8px;
  border-radius: 2px;
  background: var(--bc-vapi-gold);
  opacity: 0.35;
}

.bc-vapi-wave.is-active span {
  opacity: 1;
  animation: bc-vapi-bar 0.9s ease-in-out infinite;
}

.bc-vapi-wave.is-active span:nth-child(2) { animation-delay: 0.1s; }
.bc-vapi-wave.is-active span:nth-child(3) { animation-delay: 0.2s; }
.bc-vapi-wave.is-active span:nth-child(4) { animation-delay: 0.15s; }
.bc-vapi-wave.is-active span:nth-child(5) { animation-delay: 0.25s; }

@keyframes bc-vapi-bar {
  0%, 100% { height: 6px; }
  50% { height: 20px; }
}

.bc-vapi-call-meta {
  display: flex;
  flex-direction: column;
  font-size: 0.75rem;
  color: var(--bc-vapi-muted);
  min-width: 90px;
}

.bc-vapi-call-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
}

.bc-vapi-btn {
  border: 0;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.bc-vapi-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.bc-vapi-btn-primary {
  background: var(--bc-vapi-gold);
  color: var(--bc-vapi-navy);
}

.bc-vapi-btn-danger {
  background: #b91c1c;
  color: #fff;
}

.bc-vapi-btn-ghost {
  background: rgba(5, 22, 46, 0.08);
  color: var(--bc-vapi-navy);
}

.bc-vapi-btn-outline {
  background: transparent;
  border: 1px solid var(--bc-vapi-navy);
  color: var(--bc-vapi-navy);
}

.bc-vapi-live-status {
  min-height: 1.2em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--bc-vapi-navy-mid);
}

.bc-vapi-captions-wrap {
  border: 1px solid rgba(5, 22, 46, 0.08);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.bc-vapi-captions-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(5, 22, 46, 0.06);
  font-size: 0.78rem;
}

.bc-vapi-captions {
  max-height: 240px;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bc-vapi-captions.is-collapsed {
  display: none;
}

.bc-vapi-msg {
  max-width: 92%;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 0.84rem;
  line-height: 1.4;
}

.bc-vapi-msg .who {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.bc-vapi-msg.customer {
  align-self: flex-end;
  background: rgba(212, 175, 55, 0.18);
  color: var(--bc-vapi-text);
}

.bc-vapi-msg.assistant {
  align-self: flex-start;
  background: rgba(5, 22, 46, 0.06);
  color: var(--bc-vapi-text);
}

.bc-vapi-msg.system,
.bc-vapi-msg.human {
  align-self: center;
  background: #eef2ff;
  color: #3730a3;
  font-size: 0.78rem;
}

.bc-vapi-msg.is-partial {
  opacity: 0.75;
  font-style: italic;
}

.bc-vapi-text-form {
  display: flex;
  gap: 6px;
}

.bc-vapi-text-form input {
  flex: 1;
  border: 1px solid rgba(5, 22, 46, 0.12);
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 0.85rem;
}

.bc-vapi-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.bc-vapi-link-btn {
  border: 0;
  background: transparent;
  color: var(--bc-vapi-navy-mid);
  text-decoration: underline;
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0;
}

.bc-vapi-products,
.bc-vapi-compare {
  display: grid;
  gap: 8px;
}

.bc-vapi-product-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 8px;
  padding: 8px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(5, 22, 46, 0.08);
}

.bc-vapi-product-card img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  background: #f3f4f6;
}

.bc-vapi-product-card h4 {
  margin: 0;
  font-size: 0.82rem;
}

.bc-vapi-product-card .price {
  font-weight: 700;
  color: var(--bc-vapi-navy);
  font-size: 0.8rem;
}

.bc-vapi-product-card .reason {
  font-size: 0.72rem;
  color: var(--bc-vapi-muted);
}

.bc-vapi-product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.bc-vapi-product-actions button,
.bc-vapi-product-actions a {
  font-size: 0.7rem;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid rgba(5, 22, 46, 0.15);
  background: #fff;
  color: var(--bc-vapi-navy);
  text-decoration: none;
  cursor: pointer;
}

.d-none { display: none !important; }

@media (max-width: 576px) {
  .bc-vapi-fab {
    right: 14px;
    bottom: 88px;
    min-height: 48px;
    padding: 0 12px 0 12px;
  }
  .bc-vapi-fab-label { display: none; }
  .bc-vapi-online { left: 28px; top: 8px; }
  .bc-vapi-bubble {
    right: 14px;
    bottom: 148px;
    max-width: calc(100vw - 28px);
  }
  .bc-vapi-panel {
    right: 0;
    left: 0;
    bottom: 0;
    width: 100vw;
    max-height: 88vh;
    border-radius: 18px 18px 0 0;
  }
}
