/* Dental Destinations: Vietnam tour booking form. Colours and fonts from dentaldestinations.co */

:root {
  --dd-navy: #1c1a46;
  --dd-navy-2: #27245f;
  --dd-ink-soft: #3a3860;
  --dd-muted: #5b6072;
  --dd-paper: #ffffff;
  --dd-tint: #f2f4fc;
  --dd-tint-deep: #e8ecfd;
  --dd-hairline: #dde2f6;
  --dd-accent: #5f77ed;
  --dd-accent-hover: #4a62d8;
  --dd-error: #b42318;
  --dd-radius: 16px;
  --dd-step: 1;
  --dd-steps: 5;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: transparent;
  font-family: "Nunito Sans", system-ui, sans-serif;
  color: var(--dd-navy);
  line-height: 1.5;
}

.survey { max-width: 560px; margin: 0 auto; padding: 8px 4px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
[hidden] { display: none !important; }

/* ---------- Card ---------- */
.card {
  background: transparent;
  padding: 4px 0 0;
}

/* ---------- Progress ---------- */
.progress { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.progress-track { flex: 1; height: 3px; background: #c9cde0; overflow: hidden; }
.progress-fill {
  height: 100%;
  width: calc(var(--dd-step) / var(--dd-steps) * 100%);
  background: #000;
  transition: width 0.3s ease;
}
.progress-count { font-weight: 700; font-size: 13px; color: var(--dd-muted); white-space: nowrap; }
.is-done .progress { display: none; }

/* ---------- Headings ---------- */
.step h2 {
  font-family: "Roboto", system-ui, sans-serif;
  font-weight: 700;
  font-size: 24px;
  line-height: 1.25;
  text-align: center;
  margin: 0 0 18px;
  text-wrap: balance;
}
.step h3 {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.5;
  color: var(--dd-muted);
  text-align: center;
  max-width: 40ch;
  margin: 0 auto 16px;
  text-wrap: balance;
}

/* ---------- Choices ---------- */
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.gap { margin-top: 22px; }

.q {
  font-family: "Roboto", system-ui, sans-serif;
  font-weight: 600;
  font-size: 17px;
  line-height: 1.35;
  padding: 0;
  margin-bottom: 12px;
}
.q .optional { margin-left: 4px; }

.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: #fff;
  border: 1.5px solid #c9cde0;
  border-radius: 2px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.choice:last-child { margin-bottom: 0; }
.choice:hover { border-color: #000; }
.choice input { flex: 0 0 auto; width: 20px; height: 20px; margin: 0; accent-color: #000; }
.choice small { display: block; font-weight: 400; font-size: 13px; color: var(--dd-muted); }
.choice:has(input:checked) { border-color: #000; box-shadow: inset 0 0 0 1px #000; }
.choice:has(input:focus-visible) { box-shadow: 0 0 0 3px rgba(95, 119, 237, 0.35); }

.chips { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.chips-wide { grid-template-columns: repeat(3, 1fr); }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 6px;
  background: #fff;
  border: 1.5px solid #c9cde0;
  border-radius: 2px;
  font-family: "Roboto", system-ui, sans-serif;
  font-weight: 700;
  font-size: 17px;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.chips-wide .chip span { font-size: 15px; }
.chip:hover span { border-color: #000; }
.chip input:checked + span { background: #000; border-color: #000; color: #fff; }
.chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(95, 119, 237, 0.35); }

.note { margin: 14px 0 0; font-size: 13px; line-height: 1.5; color: var(--dd-muted); }
.note-tight { margin: -4px 0 12px; }
.lead { margin: -8px auto 20px; max-width: 46ch; text-align: center; font-size: 14px; line-height: 1.55; color: var(--dd-muted); }
.chips-two { grid-template-columns: repeat(2, 1fr); }
.yes-more, .other-field { margin-top: 14px; }
.confirms { display: grid; gap: 14px; }
.confirms .consent { padding-bottom: 14px; border-bottom: 1px solid var(--dd-hairline); }
.confirms .consent:last-child { border-bottom: 0; padding-bottom: 0; }
.field.gap { margin-top: 24px; }
.field input[type="date"] { min-height: 52px; }

/* ---------- Text fields ---------- */
.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }
.field > label {
  display: block;
  font-family: "Roboto", system-ui, sans-serif;
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 8px;
}
.req { color: var(--dd-error); }
.optional { font-family: "Nunito Sans", system-ui, sans-serif; font-weight: 400; font-size: 14px; color: var(--dd-muted); }

.field input,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px; /* 16px stops iOS zooming in on focus */
  color: var(--dd-navy);
  background: #fff;
  border: 1.5px solid #c9cde0;
  border-radius: 2px;
  transition: border-color 0.15s, background 0.15s;
}
.field textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
.field input::placeholder, .field textarea::placeholder { color: #9095a8; }
.field input:focus, .field textarea:focus {
  background: var(--dd-paper);
  border-color: #000;
  outline: none;
  box-shadow: inset 0 0 0 1px #000;
}
.field input[aria-invalid="true"] { border-color: var(--dd-error); }

/* ---------- Consent ---------- */
.consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.6;
  color: var(--dd-ink-soft);
  cursor: pointer;
}
.field + .consent { margin-top: 6px; }
.consent input { flex: 0 0 auto; width: 22px; height: 22px; margin: 1px 0 0; accent-color: #000; }
.cf-turnstile { margin-top: 18px; }

/* ---------- Done ---------- */
.done { text-align: center; padding: 12px 0 6px; }
.done-tick {
  display: grid;
  place-items: center;
  width: 64px; height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--dd-accent);
  color: #fff;
}
.done-tick svg { width: 32px; height: 32px; }
.done p { margin: 0; font-size: 15px; color: var(--dd-ink-soft); }
.done-link { margin-top: 20px; width: 100%; text-decoration: none; }

/* ---------- Errors ---------- */
.error { margin: 16px 0 0; color: var(--dd-error); font-size: 14px; font-weight: 600; }

/* ---------- Footer buttons ---------- */
.footer { display: flex; gap: 10px; padding: 16px 0 8px; }
.is-done .footer { display: none; }

.btn {
  flex: 1 1 0;
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: "Nunito Sans", system-ui, sans-serif;
  font-family: "Roboto", system-ui, sans-serif;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 2px;
  border: 0;
  cursor: pointer;
  transition: transform 0.1s, background 0.15s;
}
.btn:active { transform: scale(0.98); }
.btn svg { width: 18px; height: 18px; }
.btn:focus-visible { outline: 3px solid rgba(95, 119, 237, 0.5); outline-offset: 2px; }

.btn-next, .btn-done { background: var(--dd-accent); color: #fff; }
.btn-next:hover, .btn-done:hover { background: var(--dd-accent-hover); }
.btn-next:disabled { opacity: 0.75; cursor: progress; }

.btn-back {
  flex: 0 0 auto;
  padding: 0 22px;
  background: transparent;
  color: var(--dd-navy);
  border: 1.5px solid var(--dd-navy);
}

@media (max-width: 480px) {
  .step h2 { font-size: 21px; }
  .q { font-size: 16px; }
  .chip span { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
