/* Health Declaration form — Vietnam Arrival Card inspired styling */

:root {
  --hd-navy: #e65100;
  --hd-navy-dark: #bf360c;
  --hd-blue: #f57c00;
  --hd-link: #fb8c00;
  --hd-text: #2b2b2b;
  --hd-muted: #8a6a4a;
  --hd-line: #ffcc80;
  --hd-bg: #fff8f0;
  --hd-panel: #ffffff;
  --hd-selected: #fff3e0;
  --hd-req: #d0021b;
  --hd-green: #1e9e57;
  --hd-radius: 4px;
}

* { box-sizing: border-box; }

.hd-body {
  margin: 0;
  background: var(--hd-bg);
  color: var(--hd-text);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

/* ---------- Header + stepper ---------- */
.hd-header {
  background: var(--hd-navy);
  color: #fff;
  padding: 18px 16px 22px;
  text-align: center;
}
.hd-title {
  margin: 0 0 16px;
  font-size: 1.25rem;
  font-weight: 700;
}
.hd-stepper {
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 0;
  margin: 0 auto;
  padding: 0;
  max-width: 520px;
}
.hd-step {
  position: relative;
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #ffe0b2;
  font-size: 0.78rem;
}
.hd-step:not(:first-child)::before {
  content: "";
  position: absolute;
  top: 14px;
  right: 50%;
  width: 100%;
  height: 2px;
  background: #fb8c00;
}
.hd-step-dot {
  position: relative;
  z-index: 1;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fb8c00;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
}
.hd-step.is-active .hd-step-dot { background: #fff; color: var(--hd-navy); }
.hd-step.is-done .hd-step-dot { background: #fff; color: var(--hd-navy); }
.hd-step.is-active,
.hd-step.is-done { color: #fff; }
.hd-step.is-done:not(:first-child)::before,
.hd-step.is-active:not(:first-child)::before { background: #fff; }

/* ---------- Layout ---------- */
.hd-main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 18px 16px 40px;
}
.hd-screen { display: none; }
.hd-screen.is-active { display: block; }

.hd-infobar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid var(--hd-line);
  border-radius: var(--hd-radius);
  padding: 10px 14px;
  font-size: 0.85rem;
  color: var(--hd-muted);
  margin-bottom: 14px;
}
.hd-infobar--note { color: var(--hd-text); line-height: 1.45; }
.hd-infobar-time { white-space: nowrap; }

.hd-req { color: var(--hd-req); font-weight: 700; }

/* ---------- Panel ---------- */
.hd-panel {
  background: var(--hd-panel);
  border: 1px solid var(--hd-line);
  border-radius: var(--hd-radius);
  overflow: hidden;
  margin-bottom: 16px;
}
.hd-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff3e0;
  border-bottom: 1px solid var(--hd-line);
  padding: 12px 16px;
}
.hd-panel-head--plain { background: #fff; }
.hd-panel-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--hd-blue);
  font-weight: 700;
}
.hd-panel-body { padding: 18px 16px 22px; }

/* ---------- Section titles ---------- */
.hd-section-title {
  color: var(--hd-blue);
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 12px;
}
.hd-section-title--health { margin-top: 26px; }
.hd-subhead-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 26px 0 14px;
}
.hd-section-title--inline { margin: 0; }

.hd-help {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--hd-navy);
  color: #fff;
  font-size: 0.65rem;
  font-style: normal;
  font-weight: 700;
  cursor: help;
  vertical-align: middle;
}

/* ---------- Date of arrival options ---------- */
.hd-arrival-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.hd-arrival {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--hd-line);
  border-radius: var(--hd-radius);
  padding: 9px 14px;
  cursor: pointer;
  background: #fff;
  transition: border-color .15s, background .15s;
}
.hd-arrival:hover { border-color: var(--hd-blue); }
.hd-arrival input { accent-color: var(--hd-blue); }
.hd-arrival.is-selected {
  border-color: var(--hd-blue);
  background: var(--hd-selected);
  font-weight: 600;
}

/* ---------- Vietpass button ---------- */
.hd-vietpass-btn {
  border: none;
  background: #f4333d;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: var(--hd-radius);
  cursor: pointer;
}
.hd-vietpass-btn strong { font-weight: 800; }
.hd-vietpass-btn:hover { background: #d92831; }

/* ---------- Fields ---------- */
.hd-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 26px;
}
.hd-field { display: flex; flex-direction: column; gap: 6px; }
.hd-label { font-size: 0.9rem; color: var(--hd-text); }
.hd-input {
  border: none;
  border-bottom: 1px solid #ffcc80;
  background: transparent;
  padding: 7px 2px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--hd-text);
  border-radius: 0;
}
.hd-input:focus {
  outline: none;
  border-bottom-color: var(--hd-blue);
  box-shadow: 0 1px 0 0 var(--hd-blue);
}
.hd-input.is-invalid { border-bottom-color: var(--hd-req); box-shadow: 0 1px 0 0 var(--hd-req); }

/* ---------- Health declaration ---------- */
.hd-fineprint { color: var(--hd-text); margin: 0 0 16px; }
.hd-yesno { border: none; margin: 0 0 18px; padding: 0; }
.hd-question {
  padding: 0;
  margin-bottom: 8px;
  font-size: 0.92rem;
  color: var(--hd-text);
}
.hd-yesno-options { display: flex; gap: 10px; }
.hd-radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--hd-line);
  border-radius: var(--hd-radius);
  padding: 8px 16px;
  cursor: pointer;
}
.hd-radio input { accent-color: var(--hd-blue); }
.hd-radio:has(input:checked) {
  border-color: var(--hd-blue);
  background: var(--hd-selected);
  font-weight: 600;
}

/* ---------- Add traveller ---------- */
.hd-add-traveller {
  background: none;
  border: none;
  color: var(--hd-blue);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  padding: 6px 2px;
  margin-bottom: 16px;
}
.hd-add-traveller:hover { text-decoration: underline; }

/* ---------- Errors ---------- */
.hd-error {
  color: var(--hd-req);
  font-size: 0.8rem;
  margin-top: 2px;
}

/* ---------- Actions / buttons ---------- */
.hd-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}
.hd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--hd-radius);
  padding: 10px 22px;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
}
.hd-btn--primary { background: var(--hd-navy); color: #fff; }
.hd-btn--primary:hover { background: var(--hd-navy-dark); }
.hd-btn--ghost { background: #fff; color: var(--hd-text); border-color: #ffcc80; }
.hd-btn--ghost:hover { border-color: var(--hd-navy); }
.hd-btn--dark { background: var(--hd-navy); color: #fff; }
.hd-btn--dark:hover { background: var(--hd-navy-dark); }
.hd-btn:disabled { opacity: .6; cursor: not-allowed; }

/* ---------- Review ---------- */
.hd-edit-btn {
  border: none;
  background: none;
  color: var(--hd-blue);
  cursor: pointer;
  padding: 4px;
  display: inline-flex;
}
.hd-edit-btn:hover { color: var(--hd-navy); }
.hd-review-group {
  color: var(--hd-blue);
  font-size: 0.98rem;
  margin: 22px 0 10px;
}
.hd-review-group:first-child { margin-top: 0; }
.hd-review-list { margin: 0; display: grid; gap: 14px; }
.hd-review-list > div { display: flex; flex-direction: column; gap: 2px; }
.hd-review-list dt { color: var(--hd-muted); font-size: 0.82rem; margin: 0; }
.hd-review-list dd { margin: 0; font-size: 0.95rem; color: var(--hd-text); }
.hd-review-list--qa dt { color: var(--hd-muted); font-size: 0.88rem; }

.hd-agree {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 8px 0 4px;
  font-size: 0.92rem;
}
.hd-agree input { margin-top: 3px; accent-color: var(--hd-blue); }
.hd-agree a { color: var(--hd-link); }

/* ---------- Confirmation ---------- */
.hd-success {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.hd-success-icon { display: inline-flex; }
.hd-success-text { margin: 0; font-size: 1.05rem; font-weight: 600; }
.hd-conf-note { margin: 0 0 8px; color: var(--hd-text); }
.hd-divider { border: none; border-top: 1px solid var(--hd-line); margin: 22px 0; }
.hd-conf-count { font-size: 1.3rem; margin: 0 0 6px; }
.hd-conf-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.hd-conf-date { margin: 0; font-size: 0.9rem; }
.hd-conf-meta-actions { display: flex; gap: 10px; }
.hd-conf-card {
  border: 1px solid var(--hd-line);
  border-radius: var(--hd-radius);
  background: #fff;
}
.hd-conf-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
  padding: 16px;
}
.hd-conf-grid > div { display: flex; flex-direction: column; gap: 3px; }
.hd-conf-key { font-weight: 700; font-size: 0.85rem; }
.hd-conf-val { font-size: 0.95rem; }

.hd-other-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-bottom: 22px;
}
.hd-other p { color: var(--hd-muted); font-size: 0.82rem; margin: 10px 0 0; }

/* ---------- Footer ---------- */
.hd-footer {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 16px 40px;
  color: var(--hd-muted);
  font-size: 0.78rem;
}
.hd-footer-copy { margin-top: 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 680px) {
  .hd-title { font-size: 1.05rem; }
  .hd-grid,
  .hd-conf-grid,
  .hd-other-grid { grid-template-columns: 1fr; }
  .hd-step-label { font-size: 0.68rem; }
  .hd-actions { flex-direction: row; }
  .hd-btn { padding: 10px 16px; }
}

/* ---------- Print ---------- */
@media print {
  .hd-header,
  .hd-footer,
  .hd-actions,
  .hd-conf-meta-actions,
  .hd-other-grid { display: none !important; }
  .hd-body { background: #fff; }
}
