.fvac-shell {
  --fvac-primary: #111111;
  --fvac-accent: #c0392b;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.fvac-floating-root {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9999;
}

.fvac-bubble {
  border: 0;
  border-radius: 999px;
  background: var(--fvac-accent);
  color: #fff;
  padding: 14px 18px;
  font-weight: 700;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  margin-bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.fvac-bubble-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.fvac-bubble-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.fvac-panel {
  width: min(390px, calc(100vw - 32px));
  height: 640px;
  max-height: calc(var(--fvac-app-height, 100vh) - 100px);
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
  overflow: hidden;
  display: none;
  flex-direction: column;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.fvac-panel.is-open,
.fvac-panel.is-embedded {
  display: flex;
}

.fvac-panel.is-embedded {
  width: 100%;
  max-width: 820px;
  height: 720px;
  margin: 24px auto;
}

.fvac-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  background: var(--fvac-primary);
  color: #fff;
  padding: 18px 20px;
}

.fvac-header h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.fvac-header p {
  margin: 4px 0 0;
  font-size: 13px;
  opacity: 0.92;
}

.fvac-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fvac-reset {
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.fvac-close {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.fvac-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  background: #f8fafc;
}

.fvac-message {
  display: flex;
  margin-bottom: 14px;
}

.fvac-message.user {
  justify-content: flex-end;
}

.fvac-message-inner {
  max-width: 82%;
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.55;
  background: #fff;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.fvac-message.user .fvac-message-inner {
  background: #0f172a;
  color: #fff;
  border-bottom-right-radius: 6px;
}

.fvac-message.assistant .fvac-message-inner {
  border-bottom-left-radius: 6px;
}

.fvac-typing {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.fvac-typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.fvac-typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.28;
  animation: fvacTypingDot 1.2s infinite ease-in-out;
}

.fvac-typing-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.fvac-typing-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes fvacTypingDot {
  0%, 80%, 100% {
    opacity: 0.28;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

.fvac-message-inner a {
  color: var(--fvac-accent);
  font-weight: 700;
}

.fvac-inline-actions {
  margin-top: 12px;
}

.fvac-quick-prompts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 18px 12px;
  background: #fff;
}

.fvac-quick-prompts.is-hidden {
  display: none;
}

.fvac-chip,
.fvac-cta {
  border: 1px solid rgba(192, 57, 43, 0.18);
  background: #fff5f5;
  color: var(--fvac-accent);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.fvac-chip-primary,
.fvac-cta.primary {
  background: var(--fvac-accent);
  border-color: var(--fvac-accent);
  color: #fff;
}

.fvac-form {
  display: flex;
  gap: 12px;
  padding: 14px 18px 18px;
  background: #fff;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.fvac-form textarea {
  flex: 1;
  resize: none;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  min-height: 48px;
}

.fvac-form button {
  border: 0;
  border-radius: 14px;
  background: var(--fvac-accent);
  color: #fff;
  font-weight: 700;
  padding: 0 18px;
  cursor: pointer;
}

@media (max-width: 640px) {
  .fvac-floating-root {
    right: 12px;
    bottom: 12px;
  }

  .fvac-panel {
    width: calc(100vw - 24px);
    height: calc(var(--fvac-app-height, 100vh) - 24px);
    max-height: calc(var(--fvac-app-height, 100vh) - 24px);
    min-height: 360px;
  }

  .fvac-messages {
    padding-bottom: 12px;
  }

  .fvac-form {
    padding-bottom: max(18px, env(safe-area-inset-bottom));
  }

  .fvac-message-inner {
    max-width: 90%;
  }
}
