.contact-bot {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1200;
}

.contact-bot-trigger {
  border: 2px solid var(--accent-gold);
  background: linear-gradient(120deg, #0f172a, #1e293b);
  color: var(--pure-white);
  border-radius: 999px;
  padding: 12px 16px;
  font-weight: 800;
  min-height: 44px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.28);
}

.contact-bot-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  width: min(360px, calc(100vw - 24px));
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.22);
  border-radius: 14px;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.2);
  padding: 14px;
  max-height: min(72vh, 620px);
  overflow-y: auto;
  color: #0b1220;
}

.contact-bot-panel * {
  color: inherit;
}

.contact-bot-panel a {
  color: var(--primary-blue-deep);
}

.contact-bot-panel a:hover {
  color: var(--primary-blue);
}

.contact-bot-panel label {
  color: #0b1220;
}

.contact-bot-panel h3 {
  letter-spacing: -0.02em;
}

.contact-bot-panel p {
  color: #475569;
}

.contact-bot-panel h3 {
  margin: 0 0 4px;
  color: var(--primary-blue);
}

.contact-bot-panel p {
  margin: 0 0 10px;
  color: #334155;
  font-size: 0.95rem;
}

.contact-bot-panel .form-success,
.contact-bot-panel .form-error {
  margin-bottom: 10px;
}

.bot-step {
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 14px;
  padding: 12px;
  background: rgba(var(--accent-ice-rgb), 0.04);
}

.bot-step + .bot-step {
  margin-top: 10px;
}

.bot-step-heading {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  color: #0b1220;
  margin-bottom: 10px;
}

.contact-bot-chips {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
  gap: 6px;
  margin: 0;
  padding-bottom: 2px;
}

.bot-domain-row {
  display: grid;
  grid-template-columns: minmax(130px, 42%) minmax(0, 1fr);
  gap: 8px;
  align-items: end;
  margin-bottom: 8px;
}

.bot-domain-field label,
.bot-chip-field label {
  display: block;
  margin-bottom: 4px;
  font-weight: 700;
  color: #0b1220;
}

.bot-chip-field {
  min-width: 0;
}

.bot-chip {
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.92);
  color: #1e293b;
  font-weight: 700;
  font-size: 0.8rem;
}

.bot-chip:hover {
  background: rgba(var(--accent-ice-rgb), 0.10);
}

.bot-followup {
  margin-bottom: 8px;
}

.bot-nav-preview {
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 10px;
  padding: 10px;
  background: rgba(var(--accent-ice-rgb), 0.06);
  margin: 8px 0 10px;
}

.bot-nav-preview strong {
  color: #1e293b;
  font-size: 0.86rem;
  display: block;
  margin-bottom: 4px;
}

.bot-nav-preview p {
  margin: 0;
  color: #334155;
  font-size: 0.85rem;
  line-height: 1.45;
}

/* Ensure form controls remain readable even on dark-themed pages */
.contact-bot-panel input,
.contact-bot-panel textarea,
.contact-bot-panel select {
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.22);
  background: rgba(255, 255, 255, 0.98);
}

.contact-bot-panel input::placeholder,
.contact-bot-panel textarea::placeholder {
  color: rgba(15, 23, 42, 0.55);
}

.contact-bot-panel input:focus,
.contact-bot-panel textarea:focus,
.contact-bot-panel select:focus {
  border-color: rgba(var(--accent-ice-rgb), 0.95);
}

.contact-bot .quick-apply-form {
  gap: 8px;
}

.contact-bot .quick-apply-form label {
  margin-bottom: 4px;
}

.contact-bot .quick-apply-form input,
.contact-bot .quick-apply-form select,
.contact-bot .quick-apply-form textarea {
  margin-bottom: 8px;
}

.contact-bot .quick-apply-form input[type="submit"] {
  width: 100%;
  margin-top: 6px;
}

@media (max-width: 900px) {
  .contact-bot {
    right: 12px;
    bottom: 12px;
  }

  .contact-bot-panel {
    width: min(340px, calc(100vw - 18px));
    max-height: min(74vh, 580px);
  }

  .bot-chip {
    font-size: 0.76rem;
  }

  .bot-domain-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (max-width: 480px) {
  .contact-bot-trigger {
    padding: 10px 14px;
  }

  .contact-bot-panel {
    width: calc(100vw - 16px);
    padding: 12px;
    max-height: min(76vh, 540px);
  }

  .contact-bot-chips {
    gap: 5px;
  }

  .bot-chip {
    font-size: 0.74rem;
    padding: 6px 9px;
  }
}
