/* ---------- Forms ---------- */
.form-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(24px, 4vw, 40px);
}

.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px 20px;
}
.form-grid > * {
  min-width: 0;
}
.form-grid .full {
  grid-column: 1 / -1;
}
@media (max-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.field label {
  display: block;
  font-weight: 700;
  font-size: 0.93rem;
  color: var(--navy-800);
  margin-bottom: 7px;
}
.field .req {
  color: var(--danger);
}
.field .hint {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 2px;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="date"],
.field input[type="number"],
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
  min-height: 48px;
}
.field textarea {
  min-height: 110px;
  resize: vertical;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent-ink);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.22);
}
.field.invalid input,
.field.invalid select,
.field.invalid textarea,
.field.invalid input:focus,
.field.invalid select:focus,
.field.invalid textarea:focus {
  /* The theme's input treatment is important; validation must remain visible. */
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 12%, transparent) !important;
}
.field.invalid .radio-card label {
  border-color: var(--danger);
}
.field .error-msg {
  display: none;
  color: var(--danger);
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 6px;
}
.field.invalid .error-msg {
  display: block;
}

/* Checkbox / consent row */
.check-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.95rem;
  color: var(--muted);
}
.check-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--ink);
}

/* Radio cards (plan type picker) */
.radio-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (max-width: 640px) {
  .radio-cards {
    grid-template-columns: 1fr;
  }
}
.radio-card {
  position: relative;
}
.radio-card input {
  position: absolute;
  opacity: 0;
  inset: 0;
}
.radio-card label {
  display: block;
  height: 100%;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}
.radio-card label strong {
  display: block;
  color: var(--navy-800);
  margin-bottom: 4px;
}
.radio-card label span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  display: block;
}
.radio-card input:checked + label {
  border-color: var(--gold-500);
  background: var(--gold-100);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.18);
}
.radio-card input:focus-visible + label {
  outline: 3px solid var(--accent-ink);
  outline-offset: 2px;
}

/* Fieldset used as a plain field wrapper (e.g. the plan-type radio group) —
   strip the UA's default fieldset chrome. */
fieldset.field {
  border: 0;
  padding: 0;
  margin: 0;
  min-inline-size: 0;
}

/* Wizard */
.wizard-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 30px;
  padding: 0;
  list-style: none;
  counter-reset: wstep;
}
.wizard-progress li {
  counter-increment: wstep;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  flex: 1;
  position: relative;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}
.wizard-progress li::before {
  content: counter(wstep);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
  transition: all 0.2s ease;
}
.wizard-progress li::after {
  content: "";
  position: absolute;
  top: 19px;
  left: calc(50% + 26px);
  right: calc(-50% + 26px);
  height: 2px;
  background: var(--line);
}
.wizard-progress li:last-child::after {
  display: none;
}
.wizard-progress li.current {
  color: var(--navy-800);
}
.wizard-progress li.current::before {
  border-color: var(--gold-500);
  background: var(--gold-100);
  color: var(--navy-800);
}
.wizard-progress li.done::before {
  content: "✓";
  background: var(--navy-800);
  border-color: var(--navy-800);
  color: var(--accent);
}
.wizard-progress li.done::after {
  background: var(--gold-500);
}
@media (max-width: 640px) {
  .wizard-progress li span {
    display: none;
  }
  .wizard-progress li::after {
    left: calc(50% + 24px);
    right: calc(-50% + 24px);
  }
}

.wizard-step {
  display: none;
}
.wizard-step.active {
  display: block;
  animation: fadeUp 0.3s ease;
}
.wizard-step > h3 {
  margin-bottom: 4px;
}
.wizard-step > .step-desc {
  color: var(--muted);
  margin-bottom: 22px;
}

.wizard-nav {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

/* Traveller repeater */
.traveller-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  background: var(--paper);
}
.traveller-card .traveller-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.traveller-card .traveller-head h4 {
  margin: 0;
}
.btn-remove {
  background: transparent;
  border: 1px solid var(--danger);
  color: var(--danger);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.btn-remove:hover {
  background: var(--danger-bg);
}
.btn-add {
  background: transparent;
  border: 2px dashed var(--gold-500);
  color: var(--accent-ink);
  border-radius: var(--radius);
  padding: 13px 20px;
  width: 100%;
  font-size: 0.98rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn-add:hover {
  background: var(--gold-100);
}

/* Review summary */
.review-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 14px;
  overflow: hidden;
}
.review-block .review-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--paper);
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}
.review-block .review-head h4 {
  margin: 0;
  font-size: 0.98rem;
}
.btn-edit {
  background: none;
  border: none;
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  padding: 4px 10px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.btn-edit:hover {
  text-decoration: underline;
}
.btn-edit[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}
.review-block dl {
  margin: 0;
  padding: 14px 18px;
  display: grid;
  grid-template-columns: minmax(0, 40%) minmax(0, 1fr);
  gap: 8px 16px;
  font-size: 0.95rem;
}
.review-block dt {
  color: var(--muted);
  font-weight: 600;
}
.review-block dd {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* Form status messages */
.form-status {
  margin-top: 18px;
}
.form-status .status-ok,
.form-status .status-err {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border-radius: var(--radius);
  padding: 16px 18px;
  font-weight: 600;
}
.form-status .status-ok {
  background: color-mix(in srgb, var(--success) 9%, var(--white));
  color: var(--success);
  border: 1px solid rgba(29, 122, 79, 0.3);
}
.form-status .status-err {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(179, 38, 30, 0.3);
}
.form-status svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Honeypot — visually hidden from humans, present for bots */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Success panel */
.success-panel {
  text-align: center;
  padding: clamp(30px, 5vw, 56px) 20px;
}
.success-panel .success-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--success) 9%, var(--white));
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
}
.success-panel .success-icon svg {
  width: 36px;
  height: 36px;
}
.success-panel p {
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto 1em;
}

/* ---------- WeChat panel ---------- */
.wechat-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 4vw, 44px);
  margin-top: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(22px, 4vw, 36px);
}
.wechat-panel .wechat-qr {
  width: 240px;
  max-width: 70vw;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.wechat-panel > div {
  max-width: 420px;
}
.wechat-panel h3 {
  margin-bottom: 6px;
}
.wechat-panel p {
  color: var(--muted);
  margin-bottom: 0.5em;
}
.wechat-panel p:last-child {
  margin-bottom: 0;
}

/* ---------- Contact info cards ---------- */
.contact-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.contact-card h3 {
  font-size: 1.02rem;
  margin-bottom: 4px;
}
.contact-card p,
.contact-card a {
  color: var(--muted);
  margin: 0;
  font-size: 0.98rem;
}
.contact-card a {
  font-weight: 700;
  color: var(--navy-700);
}
.contact-card a:hover {
  color: var(--accent-ink);
}

/* ---------- Cookie consent banner ---------- */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 150; /* above header (100) and lang menu (120), below skip link (200) */
  background: var(--navy-900);
  color: #c6d2e2;
  border-top: 2px solid rgba(212, 175, 55, 0.45);
  box-shadow: 0 -12px 32px rgba(8, 23, 41, 0.4);
  max-height: 88vh;
  overflow-y: auto;
  padding: 20px 0;
}
.cookie-banner[hidden] {
  display: none;
}
@media (prefers-reduced-motion: no-preference) {
  .cookie-banner {
    animation: fadeUp 0.35s ease;
  }
}

.cookie-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
}
.cookie-copy {
  flex: 1 1 420px;
  min-width: 260px;
}
.cookie-title {
  color: #fff;
  font-size: 1.05rem;
  margin-bottom: 0.3em;
}
.cookie-text {
  font-size: 0.92rem;
  margin: 0 0 6px;
}
.cookie-link {
  margin: 0;
  font-size: 0.92rem;
}
.cookie-link a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cookie-link a:hover {
  color: var(--gold-100);
}

.cookie-options {
  flex: 1 1 100%;
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
}
.cookie-options[hidden] {
  display: none;
}
.cookie-cat-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}
.cookie-cat-label input {
  width: 19px;
  height: 19px;
  margin: 3px 0 0;
  flex-shrink: 0;
  accent-color: var(--gold-500);
  cursor: pointer;
}
.cookie-cat-label input[disabled] {
  cursor: default;
}
.cookie-cat-copy {
  display: block;
}
.cookie-cat-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.cookie-cat-title strong {
  color: #fff;
  font-size: 0.95rem;
}
.cookie-cat-title .cookie-always {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cookie-cat-copy small {
  display: block;
  font-size: 0.86rem;
  line-height: 1.5;
  color: #a9b8cc;
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.cookie-actions .btn[hidden] {
  display: none;
}

@media (max-width: 560px) {
  .cookie-actions {
    flex: 1 1 100%;
  }
  .cookie-actions .btn {
    flex: 1 1 100%;
  }
}

/* While the banner is open it owns the bottom edge: the back-to-top button
   would sit underneath it (and body padding, set from JS, reserves the rest) */
body.cookie-banner-open .back-to-top {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Footer "Cookie settings" control, styled like the legal links around it */
.link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.link-btn:hover {
  color: var(--accent);
}
