/* ══════════════════════════════════════════════
   Pasaporte Colombia — Form Design System
   ══════════════════════════════════════════════ */

:root {
  --navy: #1B2D6E;
  --navy-dark: #14235A;
  --navy-light: #E8EDF7;
  --navy-mid: #2D4A9A;
  --bg: #EFF3F9;
  --white: #ffffff;
  --gray-100: #F4F6FA;
  --gray-200: #E4EAF3;
  --gray-400: #B0BCCF;
  --gray-500: #8A97B0;
  --gray-700: #5A6A85;
  --gray-900: #1E2A40;
  --border: #D0D9EB;
  --radius-card: 14px;
  --radius-btn: 50px;
  --shadow-card: 0 4px 28px rgba(27,45,110,0.09);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--gray-900);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Page wrapper ── */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 16px 60px;
  background: var(--bg);
}

/* ── Title block ── */
.form-title {
  text-align: center;
  margin-bottom: 24px;
}
.form-title h1 {
  font-size: 30px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.3px;
  line-height: 1.15;
}
.form-title .subtitle {
  font-size: 15px;
  color: var(--gray-500);
  margin-top: 5px;
}
.form-title .time-est {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--gray-400);
  margin-top: 4px;
}
.form-title .time-est svg { flex-shrink: 0; }

/* ── Step indicator ── */
.steps-bar {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  margin-bottom: 28px;
  width: 100%;
  max-width: 600px;
}
.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  position: relative;
}
.step-item:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 18px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--gray-200);
  z-index: 0;
}
.step-item.done:not(:last-child)::after { background: var(--navy); }

.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  position: relative;
  z-index: 1;
  transition: background 0.2s;
}
.step-item.done .step-circle {
  background: var(--navy);
  color: #fff;
}
.step-item.active .step-circle {
  background: var(--navy);
  color: #fff;
}
.step-item.future .step-circle {
  background: var(--white);
  color: var(--gray-400);
  border: 2px solid var(--gray-200);
}
.step-label {
  font-size: 10.5px;
  color: var(--gray-500);
  text-align: center;
  font-weight: 500;
  white-space: nowrap;
  line-height: 1.3;
}
.step-item.done .step-label,
.step-item.active .step-label {
  color: var(--navy);
  font-weight: 600;
}

/* ── Form card ── */
.form-card {
  background: var(--white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
  width: 100%;
  max-width: 720px;
  padding: 28px 32px 32px;
}

.card-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}
.card-desc {
  font-size: 14px;
  color: var(--gray-500);
  margin-bottom: 20px;
  line-height: 1.5;
}
.card-divider {
  height: 1px;
  background: var(--gray-200);
  margin: 20px -32px;
}

/* ── Section heading ── */
.section-heading {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ── Form fields ── */
.form-group { margin-bottom: 16px; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 0;
}
.form-row.triple { grid-template-columns: 1fr 1fr 1fr; }

.field-label {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--gray-700);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.field-label .req { color: #E53E3E; }

.field-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14.5px;
  font-family: var(--font);
  color: var(--gray-900);
  background: #FAFBFD;
  transition: border-color 0.18s, box-shadow 0.18s;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
}
.field-input:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(27,45,110,0.10);
  background: var(--white);
}
.field-input::placeholder { color: var(--gray-400); }
.field-input.error { border-color: #E53E3E; }

select.field-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

.field-error {
  font-size: 12px;
  color: #E53E3E;
  margin-top: 4px;
  display: none;
}
.field-error.visible { display: block; }

/* ── Radio cards (sede, passport type) ── */
.radio-cards { display: flex; flex-direction: column; gap: 10px; }
.radio-card {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: border-color 0.15s, background 0.15s;
  background: var(--white);
}
.radio-card:hover { border-color: var(--navy); background: var(--navy-light); }
.radio-card.selected {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.radio-card.selected .rc-name { color: #fff; }
.radio-card.selected .rc-addr,
.radio-card.selected .rc-hours { color: rgba(255,255,255,0.75); }

.rc-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  transition: border-color 0.15s;
}
.radio-card.selected .rc-radio {
  border-color: #fff;
  background: #fff;
}
.radio-card.selected .rc-radio::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--navy);
}
.rc-body { flex: 1; }
.rc-name { font-size: 14px; font-weight: 600; color: var(--navy); line-height: 1.35; }
.rc-addr {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 2px;
  display: flex;
  align-items: flex-start;
  gap: 5px;
}
.rc-hours {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ── Pill toggle (tipo tramite) ── */
.pill-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.pill {
  padding: 8px 18px;
  border-radius: 50px;
  border: 1.5px solid var(--border);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  color: var(--gray-700);
  background: var(--white);
  transition: all 0.15s;
  font-family: var(--font);
  line-height: 1;
}
.pill:hover { border-color: var(--navy); color: var(--navy); }
.pill.selected {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
  font-weight: 600;
}

/* ── Cost breakdown card ── */
.cost-card {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
}
.cost-card-header {
  background: var(--navy);
  color: #fff;
  padding: 13px 18px;
  font-size: 13px;
  font-weight: 600;
}
.cost-row {
  padding: 14px 18px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.cost-row:last-child { border-bottom: none; }
.cost-row .cr-label { font-size: 13.5px; font-weight: 600; color: var(--navy); }
.cost-row .cr-desc { font-size: 12px; color: var(--gray-500); line-height: 1.4; margin-top: 2px; }
.cost-row .cr-amount { font-size: 14px; font-weight: 700; color: var(--gray-900); white-space: nowrap; }
.cost-total {
  padding: 14px 18px;
  border-top: 2px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 800;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cost-total .ct-amount { font-size: 16px; }
.cost-highlight {
  background: var(--navy-light);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 10px 10px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cost-highlight .ch-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.cost-highlight .ch-sub { font-size: 11px; color: var(--gray-500); margin-top: 2px; }
.cost-highlight .ch-amount { font-size: 16px; font-weight: 800; color: var(--navy); }

/* ── Bogotá expander ── */
.expander {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 10px;
}
.expander-trigger {
  padding: 14px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-700);
  background: var(--white);
  user-select: none;
}
.expander-trigger:hover { background: var(--gray-100); }
.expander-trigger .exp-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--navy-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.expander-trigger .exp-chevron {
  margin-left: auto;
  color: var(--gray-400);
  transition: transform 0.2s;
}
.expander-trigger.open .exp-chevron { transform: rotate(180deg); }
.expander-body {
  display: none;
  padding: 14px;
  border-top: 1px solid var(--gray-200);
  background: var(--gray-100);
}
.expander-body.open { display: block; }
.expander-info {
  font-size: 12.5px;
  color: var(--gray-700);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #E8F0FD;
  border-radius: 6px;
  margin-top: 10px;
}
.back-to-local {
  font-size: 12px;
  color: var(--navy);
  text-decoration: underline;
  cursor: pointer;
  margin-bottom: 8px;
  display: inline-block;
}
.bogota-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ── Calendar ── */
.calendar-wrap {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
}
.cal-header {
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
}
.cal-month { font-size: 16px; font-weight: 600; }
.cal-nav {
  background: none;
  border: none;
  color: rgba(255,255,255,0.85);
  font-size: 22px;
  cursor: pointer;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  font-family: var(--font);
  line-height: 1;
}
.cal-nav:hover { background: rgba(255,255,255,0.18); }
.cal-grid { padding: 12px 14px; }
.cal-dow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  margin-bottom: 4px;
}
.cal-dow span {
  font-size: 11px;
  font-weight: 700;
  color: var(--navy);
  padding: 6px 0;
  letter-spacing: 0.04em;
}
.cal-dow .dow-weekend { color: var(--gray-400); }
.cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.cal-day {
  text-align: center;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 400;
  color: var(--gray-400);
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, color 0.12s;
  cursor: default;
  border: none;
  background: transparent;
  font-family: var(--font);
}
.cal-day.available {
  color: var(--navy) !important;
  font-weight: 600;
  cursor: pointer;
}
.cal-day.available:hover { background: var(--navy-light); }
.cal-day.selected {
  background: var(--navy) !important;
  color: #fff !important;
  font-weight: 700;
}
.cal-day.today {
  outline: 2px solid var(--navy);
  outline-offset: -2px;
}
.cal-footer {
  padding: 8px 14px 12px;
  font-size: 11.5px;
  color: var(--gray-500);
  text-align: center;
  border-top: 1px solid var(--gray-200);
}
.cal-selected-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
}

/* ── Time slots ── */
.time-section { margin-top: 20px; }
.time-section-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.time-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.time-btn {
  padding: 10px 4px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--gray-100);
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-700);
  cursor: pointer;
  text-align: center;
  transition: all 0.12s;
  font-family: var(--font);
}
.time-btn:hover {
  border-color: var(--navy);
  color: var(--navy);
  background: var(--navy-light);
}
.time-btn.selected {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
  font-weight: 600;
}

/* ── Payment summary row (bottom of step 4) ── */
.pay-summary {
  background: var(--gray-100);
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  border: 1px solid var(--border);
}
.ps-label { font-size: 12.5px; color: var(--gray-500); }
.ps-value { font-size: 15px; font-weight: 700; color: var(--navy); }
.pay-row-sm {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 13.5px;
}
.pay-row-sm.total { font-weight: 700; color: var(--navy); padding-top: 10px; }

/* ── Summary review cards ── */
.summary-block {
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}
.summary-block-header {
  background: var(--navy);
  color: #fff;
  padding: 13px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sbh-title { font-size: 14px; font-weight: 700; }
.sbh-edit {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.4);
  color: #fff;
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  font-family: var(--font);
}
.sbh-edit:hover { background: rgba(255,255,255,0.25); }
.summary-body { padding: 16px 18px; background: var(--white); }
.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 24px;
}
.sg-item .sg-label {
  font-size: 11px;
  color: var(--gray-500);
  margin-bottom: 2px;
}
.sg-item .sg-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-900);
}
.summary-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  background: var(--navy-light);
  border-top: 1px solid var(--border);
}
.str-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--navy);
}
.str-amount { font-size: 18px; font-weight: 800; color: var(--navy); }

/* ── Buttons ── */
.btn-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  gap: 12px;
}
.btn {
  padding: 12px 28px;
  border-radius: var(--radius-btn);
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  border: none;
  transition: all 0.18s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
}
.btn-outline {
  background: var(--white);
  border: 2px solid var(--border);
  color: var(--gray-700);
}
.btn-outline:hover {
  border-color: var(--navy);
  color: var(--navy);
}
.btn-primary {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 3px 10px rgba(27,45,110,0.22);
}
.btn-primary:hover {
  background: var(--navy-dark);
  box-shadow: 0 5px 16px rgba(27,45,110,0.35);
}
.btn-primary:disabled {
  background: var(--gray-400);
  box-shadow: none;
  cursor: not-allowed;
}

/* ── Privacy step ── */
.privacy-box {
  background: var(--gray-100);
  border-radius: 10px;
  padding: 20px;
  font-size: 13.5px;
  color: var(--gray-700);
  line-height: 1.7;
  margin-bottom: 20px;
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--border);
}
.privacy-box p { margin-bottom: 10px; }
.privacy-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-900);
  cursor: pointer;
  margin-bottom: 8px;
}
.privacy-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--navy);
  cursor: pointer;
}

/* ── Payment page extras ── */
.security-notice {
  border-left: 3px solid var(--navy);
  background: var(--navy-light);
  border-radius: 0 8px 8px 0;
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 16px 0;
}
.security-notice .sn-icon { flex-shrink: 0; color: var(--navy); margin-top: 1px; }
.security-notice .sn-title { font-size: 14px; font-weight: 600; color: var(--navy); }
.security-notice .sn-text { font-size: 12.5px; color: var(--gray-700); line-height: 1.5; margin-top: 3px; }
.pay-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 13.5px;
  border-bottom: 1px solid var(--gray-200);
  color: var(--gray-700);
}
.pay-line:last-child { border-bottom: none; }
.pay-line strong { color: var(--navy); font-weight: 700; }

/* ── Success / confirmation ── */
.success-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #EAF7EF;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 38px;
}

/* ── Alerts & info ── */
.info-row {
  font-size: 12.5px;
  color: var(--navy);
  background: var(--navy-light);
  border-radius: 8px;
  padding: 9px 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
}
.error-box {
  background: #FFF5F5;
  border: 1.5px solid #FECACA;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #B91C1C;
  margin-bottom: 14px;
  display: none;
}
.error-box.visible { display: block; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .form-card { padding: 22px 18px 24px; }
  .card-divider { margin: 16px -18px; }
  .form-row { grid-template-columns: 1fr; }
  .form-row.triple { grid-template-columns: 1fr; }
  .time-grid { grid-template-columns: repeat(3, 1fr); }
  .summary-grid { grid-template-columns: 1fr; }
  .steps-bar { gap: 0; }
  .step-label { font-size: 9px; }
}

/* ─── Payment result (return from Stripe) ─────────────── */
.pago-result {
  text-align: center;
  padding: 48px 28px 52px;
  max-width: 520px;
  margin: 0 auto;
}
.pago-result h2 {
  color: var(--navy);
  font-size: 24px;
  font-weight: 800;
  margin: 18px 0 10px;
}
.pago-result p {
  color: var(--gray-500);
  font-size: 15px;
  line-height: 1.6;
  margin: 0 auto 26px;
  max-width: 420px;
}
.pago-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  font-weight: 800;
  margin: 0 auto;
  color: #fff;
}
.pago-icon.ok   { background: #1A8A4F; }
.pago-icon.err  { background: #C0392B; }
.pago-icon.warn { background: #E0922F; }
.pago-btn {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  padding: 13px 28px;
  border-radius: 8px;
  transition: background .15s ease;
}
.pago-btn:hover { background: var(--navy-dark); }
.pago-btn-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 4px;
}
.pago-btn-outline {
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--navy-light);
}
.pago-btn-outline:hover { background: var(--navy-light); }
.pago-spinner {
  width: 54px;
  height: 54px;
  border: 5px solid var(--navy-light);
  border-top-color: var(--navy);
  border-radius: 50%;
  margin: 0 auto;
  animation: pago-spin .8s linear infinite;
}
@keyframes pago-spin { to { transform: rotate(360deg); } }
