/* ===========================
   REGISTER PAGE BASE
=========================== */
.reg-page {
  background: var(--light);
  min-height: 100vh;
}
.reg-page .navbar { position: sticky; top: 0; background: var(--dark); }
.back-link {
  color: rgba(255,255,255,.65);
  font-size: .9rem;
  font-weight: 500;
  margin-left: auto;
  transition: color .25s;
}
.back-link:hover { color: #fff; }

.reg-main { padding: 40px 20px 80px; }
.reg-container {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* ===========================
   REG HEADER
=========================== */
.reg-header {
  text-align: center;
  padding: 8px 0 4px;
}
.reg-header h1 {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  color: var(--dark);
  line-height: 1.1;
  margin-bottom: 8px;
}
.reg-header p {
  color: var(--grey);
  font-size: .95rem;
}

/* ===========================
   STATUS BANNER
=========================== */
.reg-status-banner {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: .95rem;
  color: #856404;
  text-align: center;
  font-weight: 500;
}
.reg-status-banner.closed {
  background: #f8d7da;
  border-color: #f5c6cb;
  color: #721c24;
}

/* ===========================
   STEP PROGRESS
=========================== */
.step-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0 8px;
}
.step-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  position: relative;
  flex-shrink: 0;
}
.step-dot-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e2e8f0;
  color: var(--grey);
  font-weight: 700;
  font-size: .9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .3s, color .3s;
}
.step-dot.active .step-dot-num  { background: var(--red); color: #fff; }
.step-dot.done .step-dot-num    { background: #38a169; color: #fff; }
.step-dot-label {
  font-size: .7rem;
  font-weight: 600;
  color: var(--grey);
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
}
.step-dot.active .step-dot-label { color: var(--red); }
.step-dot.done .step-dot-label   { color: #38a169; }
.step-line {
  flex: 1;
  height: 2px;
  background: #e2e8f0;
  margin: 0 8px;
  margin-bottom: 22px;
  transition: background .3s;
  min-width: 32px;
}
.step-line.done { background: #38a169; }

/* ===========================
   FORM STEPS
=========================== */
.form-step { display: none; }
.form-step.active { display: block; }

.step-title {
  font-family: var(--font-head);
  font-size: 1.8rem;
  color: var(--dark);
  margin-bottom: 8px;
}
.step-subtitle {
  color: var(--grey);
  font-size: .92rem;
  margin-bottom: 32px;
}
.req-star { color: var(--red); }

/* ===========================
   RACE SELECT CARDS (Step 1)
=========================== */
.race-select-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}
.race-select-card {
  cursor: pointer;
  display: block;
}
.race-select-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.rsc-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--white);
  border: 2px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color .2s, box-shadow .2s;
  position: relative;
}
.race-select-card:hover .rsc-inner { border-color: #a0aec0; }
.race-select-card input:checked ~ .rsc-inner {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(27,94,168,.12);
}
.rsc-left { flex-shrink: 0; text-align: center; min-width: 72px; }
.rsc-badge {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 50px;
  margin-bottom: 6px;
}
.rsc-badge-fun { background: var(--mid); }
.rsc-dist {
  font-family: var(--font-head);
  font-size: 3rem;
  color: var(--dark);
  line-height: 1;
}
.rsc-price {
  font-family: var(--font-head);
  font-size: 1.5rem;
  color: var(--red);
}
.rsc-price-note {
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 600;
  color: var(--green);
  display: block;
  letter-spacing: 0;
}
.rsc-perks {
  flex: 1;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rsc-perks li {
  font-size: .88rem;
  color: var(--mid);
  padding-left: 16px;
  position: relative;
}
.rsc-perks li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--red);
  font-size: .8rem;
}
.rsc-check {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: .85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity .2s, transform .2s;
}
.race-select-card input:checked ~ .rsc-inner .rsc-check {
  opacity: 1;
  transform: scale(1);
}

/* ===========================
   FORM GRID (Step 2)
=========================== */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 32px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field-full { grid-column: 1 / -1; }
.field label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--dark);
}
.field input,
.field select,
.field textarea {
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: .95rem;
  color: var(--dark);
  background: var(--white);
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.field input:focus,
.field select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(27,94,168,.1);
}
.field input.has-error,
.field select.has-error {
  border-color: #e53e3e;
}
.field-hint {
  font-size: .78rem;
  color: var(--grey);
}
.field-err {
  font-size: .78rem;
  color: #e53e3e;
  font-weight: 500;
  min-height: 16px;
}

/* 5K-only fields */
.field-5k-only { display: flex; }
.field-5k-only.hidden { display: none; }

/* File upload */
.file-upload-area {
  position: relative;
  border: 2px dashed #e2e8f0;
  border-radius: 8px;
  background: var(--light);
  transition: border-color .2s;
  cursor: pointer;
  overflow: hidden;
}
.file-upload-area:hover,
.file-upload-area.dragging { border-color: var(--red); background: #fff5f5; }
.file-upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  z-index: 1;
  border: none;
  padding: 0;
}
.file-upload-ui {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 28px 20px;
  pointer-events: none;
}
.file-icon { font-size: 2rem; }
.file-text { font-weight: 600; color: var(--mid); font-size: .9rem; }
.file-hint { font-size: .78rem; color: var(--grey); }
.file-preview {
  padding: 16px;
  font-size: .88rem;
  color: #38a169;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
}

/* ===========================
   DECLARATION (Step 3)
=========================== */
.declaration-box {
  background: var(--white);
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 24px;
  max-height: 280px;
  overflow-y: auto;
  font-size: .9rem;
  line-height: 1.75;
  color: var(--mid);
  margin-bottom: 24px;
  -webkit-overflow-scrolling: touch;
}
.declaration-box p { margin-bottom: 16px; }
.declaration-box p:last-child { margin-bottom: 0; }

.declaration-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: .95rem;
  color: var(--dark);
  font-weight: 500;
}
.declaration-check input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-width: 20px;
  margin-top: 2px;
  accent-color: var(--red);
  cursor: pointer;
}

/* ===========================
   PAYMENT (Step 4)
=========================== */
.order-summary {
  background: var(--white);
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 20px;
}
.order-summary h3 {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--grey);
  margin-bottom: 16px;
}
.order-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .95rem;
  color: var(--mid);
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}
.order-total {
  border: none;
  padding-top: 12px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--dark);
}

.runner-summary {
  background: var(--light);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 24px;
  font-size: .88rem;
  color: var(--mid);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 20px;
}
.runner-summary span { display: block; }
.runner-summary strong { color: var(--dark); }

.payment-methods h3 {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--grey);
  margin-bottom: 16px;
}
.pay-note {
  font-size: .82rem;
  color: #b7791f;
  background: #fffbeb;
  border: 1px solid #fbbf24;
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 16px;
}
.pay-options { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.pay-option { cursor: pointer; }
.pay-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.pay-opt-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--white);
  border: 2px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 16px 20px;
  transition: border-color .2s;
  position: relative;
}
.pay-option.active .pay-opt-inner { border-color: var(--red); }
.pay-option input:checked ~ .pay-opt-inner { border-color: var(--red); box-shadow: 0 0 0 3px rgba(27,94,168,.1); }
.pay-option-soon { opacity: .6; cursor: not-allowed; }
.pay-option-soon .pay-opt-inner { background: var(--light); }
.pay-logo { font-size: 1.4rem; flex-shrink: 0; }
.pay-opt-inner div { flex: 1; }
.pay-opt-inner strong { display: block; font-size: .95rem; color: var(--dark); margin-bottom: 2px; }
.pay-opt-inner span  { font-size: .82rem; color: var(--grey); }
.pay-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: .8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .2s;
  flex-shrink: 0;
}
.pay-option input:checked ~ .pay-opt-inner .pay-check { opacity: 1; }
.pay-badge-soon {
  background: var(--grey);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 50px;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* ===========================
   STEP NAV
=========================== */
.step-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  margin-top: 8px;
  border-top: 1px solid #e2e8f0;
}
.btn-ghost-dark {
  background: transparent;
  border: 2px solid #e2e8f0;
  color: var(--mid);
}
.btn-ghost-dark:hover { border-color: var(--mid); background: var(--light); }
.btn-submit { min-width: 200px; justify-content: center; }
.btn-submit:disabled { opacity: .6; cursor: not-allowed; pointer-events: none; }

/* ===========================
   CONFIRMATION VIEW
=========================== */
.confirmation {
  text-align: center;
  padding: 20px 0 40px;
}
.conf-icon { font-size: 3.5rem; margin-bottom: 16px; }
.confirmation h2 {
  font-family: var(--font-head);
  font-size: 2.4rem;
  color: var(--dark);
  margin-bottom: 8px;
}
.conf-sub { color: var(--grey); font-size: 1rem; margin-bottom: 28px; }
.conf-details {
  background: var(--white);
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 28px;
  text-align: left;
  font-size: .9rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
}
.conf-details span { display: block; }
.conf-details strong { color: var(--dark); font-size: .78rem; text-transform: uppercase; letter-spacing: 1px; }
.conf-next {
  background: var(--light);
  border-radius: var(--radius);
  padding: 24px;
  text-align: left;
}
.conf-next h3 { font-size: 1rem; color: var(--dark); margin-bottom: 16px; }
.conf-next ol { padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
.conf-next li { font-size: .9rem; color: var(--mid); line-height: 1.6; }
.conf-omt-name { font-size: .85rem; color: var(--grey); display: block; margin-top: 4px; }
.conf-omt-name a { color: var(--red); }
.conf-deadline-banner {
  background: #fff8e1;
  border: 2px solid #e53e3e;
  border-radius: var(--radius);
  padding: 14px 20px;
  font-size: .95rem;
  color: #c53030;
  text-align: center;
  margin-bottom: 16px;
}

/* ===========================
   TEAM CHIPS
=========================== */
.team-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.team-chips-label {
  width: 100%;
  font-size: .78rem;
  color: var(--grey);
  margin-bottom: 2px;
}
.team-chip {
  background: #f0f4ff;
  border: 1.5px solid #c3d0f7;
  border-radius: 20px;
  padding: 5px 14px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--dark);
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.team-chip:hover  { background: #dde6ff; border-color: var(--red); }
.team-chip.active { background: var(--red); border-color: var(--red); color: #fff; }

/* ===========================
   PHONE INPUT
=========================== */
.phone-input-wrap {
  display: flex;
  gap: 0;
  border: 1.5px solid #d1d5db;
  border-radius: var(--radius-field);
  overflow: hidden;
  background: #fff;
  transition: border-color .2s;
}
.phone-input-wrap:focus-within {
  border-color: var(--dark);
  box-shadow: 0 0 0 3px rgba(26,26,46,.08);
}
.phone-prefix {
  flex: 0 0 auto;
  border: none;
  background: #f3f4f6;
  padding: 0 10px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--dark);
  cursor: pointer;
  outline: none;
  border-right: 1.5px solid #d1d5db;
  min-width: 120px;
  max-width: 170px;
}
.phone-input-wrap input[type="tel"] {
  flex: 1;
  border: none;
  background: transparent;
  padding: 12px;
  font-size: .95rem;
  outline: none;
  box-shadow: none;
}
.phone-input-wrap input[type="tel"]:focus {
  box-shadow: none;
  border: none;
}

/* ===========================
   FOOTER
=========================== */
.reg-footer {
  text-align: center;
  padding: 20px;
  color: var(--grey);
  font-size: .82rem;
}
.reg-footer a { color: var(--grey); text-decoration: underline; }

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 600px) {
  .reg-main { padding: 24px 16px 64px; }
  .form-grid { grid-template-columns: 1fr; }
  .field-full { grid-column: auto; }
  .rsc-inner { flex-wrap: wrap; gap: 16px; }
  .rsc-perks { min-width: 100%; }
  .runner-summary { grid-template-columns: 1fr; }
  .conf-details { grid-template-columns: 1fr; }
  .step-dot-label { display: none; }
  .step-line { min-width: 16px; }
}

@media (max-width: 360px) {
  .step-dot-num { width: 28px; height: 28px; font-size: .8rem; }
  .rsc-dist { font-size: 2.4rem; }
}

/* ===========================
   WHATSAPP STICKY BUTTON
=========================== */
.wa-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #25D366;
  color: #fff;
  text-decoration: none;
  padding: 12px 18px 12px 14px;
  border-radius: 50px;
  box-shadow: 0 4px 20px rgba(37,211,102,.45);
  font-size: .88rem;
  font-weight: 700;
  transition: transform .2s, box-shadow .2s;
  white-space: nowrap;
}
.wa-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(37,211,102,.55);
  color: #fff;
}
.wa-fab svg { flex-shrink: 0; }

@media (max-width: 480px) {
  /* Show icon only on small screens to save space */
  .wa-fab { padding: 13px; border-radius: 50%; }
  .wa-fab-label { display: none; }
}
