.vf-recipe-chatbot-root {
  position: fixed;
  right: 28px;
  bottom: 88px;
  z-index: 9999;
}

.vf-chatbot {
  --vf-accent: #111827;
  --vf-surface: #ffffff;
  --vf-border: #d9dee8;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}

.vf-panel[hidden],
.vf-launcher[hidden] {
  display: none !important;
}

.vf-launcher,
.vf-submit,
.vf-close,
.vf-quick-chip {
  cursor: pointer;
  border: 0;
}

.vf-launcher {
  order: 2;
  background: linear-gradient(135deg, var(--vf-accent), #334155);
  color: #fff;
  padding: 14px 18px;
  border-radius: 999px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.25);
  font-weight: 700;
}

.vf-panel {
  order: 1;
  width: min(380px, calc(100vw - 56px));
  height: min(560px, calc(100vh - 160px));
  background: var(--vf-surface);
  border: 1px solid var(--vf-border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

.vf-header {
  position: relative;
  padding: 18px 18px 16px;
  color: #fff;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.22), transparent 30%),
    linear-gradient(145deg, var(--vf-accent), #111827 70%);
}

.vf-title {
  font-size: 18px;
  font-weight: 800;
}

.vf-subtitle {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.4;
  max-width: 280px;
  color: rgba(255, 255, 255, 0.88);
}

.vf-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 18px;
}

.vf-body {
  height: 420px;
  overflow-y: auto;
  padding: 16px;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}

.vf-message {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
}

.vf-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.vf-quick-chip {
  background: #e9eef7;
  color: #0f172a;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
}

.vf-user {
  align-items: flex-end;
}

.vf-bubble {
  max-width: 88%;
  white-space: pre-wrap;
  padding: 12px 14px;
  border-radius: 18px;
  line-height: 1.45;
  font-size: 14px;
}

.vf-bot .vf-bubble {
  background: #ffffff;
  border: 1px solid #dde3ed;
  color: #111827;
}

.vf-user .vf-bubble {
  background: var(--vf-accent);
  color: #ffffff;
}

.vf-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.vf-link {
  font-size: 12px;
  color: var(--vf-accent);
  text-decoration: none;
  background: #fff;
  border: 1px solid #d6dce7;
  border-radius: 999px;
  padding: 6px 10px;
}

.vf-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--vf-border);
  background: #fff;
}

.vf-verify {
  grid-column: 1 / -1;
  background: #f6f8fc;
  border: 1px solid #d6dce7;
  border-radius: 16px;
  padding: 10px 12px;
}

.vf-verify.is-verified {
  background: #eff9f0;
  border-color: #b9dfbf;
}

.vf-verify-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}

.vf-verify-input {
  width: 100%;
  border: 1px solid #ccd5e3;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  background: #fff;
}

.vf-verify-status {
  margin-top: 8px;
  font-size: 12px;
  color: #475569;
}

.vf-verify-status.is-error {
  color: #b91c1c;
}

.vf-verify-status.is-success {
  color: #166534;
}

.vf-input {
  border: 1px solid #ccd5e3;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 14px;
}

.vf-input:focus {
  outline: 2px solid rgba(15, 23, 42, 0.12);
  border-color: var(--vf-accent);
}

.vf-submit {
  border-radius: 14px;
  padding: 0 16px;
  background: var(--vf-accent);
  color: #fff;
  font-weight: 700;
}

.vf-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 640px) {
  .vf-recipe-chatbot-root {
    right: 12px;
    bottom: 84px;
    left: 12px;
  }

  .vf-panel {
    width: 100%;
    height: min(72vh, 640px);
  }

  .vf-launcher {
    margin-left: auto;
    display: block;
  }
}
