/*
 * MOTN public registration – step-by-step forms (Event, Build, Vapp).
 * Brand: festival blue sky with sparkles, the chunky white logo with its hard
 * black extrusion. That hard offset shadow is the one bold device here (card,
 * main button, chosen options); everything else stays quiet.
 */
@font-face { font-family: 'Manrope'; font-weight: 400; font-display: swap; src: url('../fonts/Manrope/Manrope-Regular.woff2') format('woff2'); }
@font-face { font-family: 'Manrope'; font-weight: 500; font-display: swap; src: url('../fonts/Manrope/Manrope-Medium.woff2') format('woff2'); }
@font-face { font-family: 'Manrope'; font-weight: 600; font-display: swap; src: url('../fonts/Manrope/Manrope-SemiBold.woff2') format('woff2'); }
@font-face { font-family: 'Manrope'; font-weight: 700; font-display: swap; src: url('../fonts/Manrope/Manrope-Bold.woff2') format('woff2'); }
@font-face { font-family: 'Manrope'; font-weight: 800; font-display: swap; src: url('../fonts/Manrope/Manrope-ExtraBold.woff2') format('woff2'); }

:root {
  --sky: #4459C5;          /* festival blue */
  --sky-deep: #3346AE;
  --ink: #22205E;          /* midnight: text, outlines, the logo's extrusion */
  --ink-2: #5B5A86;        /* secondary text */
  --sun: #FFC71F;          /* main action, current step */
  --sun-press: #F2B600;
  --flamingo: #E5258A;     /* chosen options */
  --flamingo-wash: #FDEAF4;
  --leaf: #179C55;         /* done, filled from the ID */
  --leaf-wash: #E8F6EE;
  --wash: #F1F2FB;         /* field fill */
  --line: #D6D8EE;
  --danger: #C62D3A;
  --danger-wash: #FDECEE;
  --shadow: 6px 6px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);
  --r-card: 22px;
  --r-field: 12px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.rw-page {
  margin: 0; min-height: 100vh;
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px; line-height: 1.5; color: var(--ink);
  background: var(--sky) url('../images/motn_2025/motn-bg-landing-page-web-01-01.webp') center top / cover fixed no-repeat;
}

/* ------------------------------------------------------------- page head */
.rw-top { display: flex; flex-direction: column; align-items: center; padding: 28px 16px 18px; text-align: center; }
.rw-top a { display: inline-block; }
.rw-logo { width: 180px; max-width: 46vw; height: auto; display: block; }
.rw-top p { margin: 10px 0 0; color: #fff; font-weight: 600; font-size: 15px; opacity: .92; }

.rw-wrap { max-width: 760px; margin: 0 auto; padding: 0 16px 48px; }

/* ------------------------------------------------------------- the card */
.rw-card {
  background: #fff; border: 2px solid var(--ink); border-radius: var(--r-card);
  box-shadow: var(--shadow); overflow: visible; position: relative;
}
.rw-head { padding: 26px 30px 18px; border-bottom: 1px solid var(--line); }
.rw-head h1 { margin: 0; font-size: 28px; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; }
.rw-head .rw-sub { margin: 6px 0 0; color: var(--ink-2); font-size: 15px; }
.rw-head .rw-sub a { color: var(--sky-deep); font-weight: 700; }

/* stepper: the steps really are a sequence, so they are numbered */
.rw-stepper { display: flex; gap: 0; margin: 20px 0 0; padding: 0; list-style: none; counter-reset: rw; }
.rw-stepper li { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.rw-stepper li::before { /* connecting line */
  content: ''; position: absolute; top: 17px; left: -50%; right: 50%; height: 3px; background: var(--line); z-index: 0;
}
.rw-stepper li:first-child::before { display: none; }
.rw-stepper li.is-done::before, .rw-stepper li.is-current::before { background: var(--ink); }
.rw-stepper button {
  position: relative; z-index: 1; width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--line);
  background: #fff; color: var(--ink-2); font: 800 15px/1 'Manrope', sans-serif; display: grid; place-items: center;
  cursor: default; padding: 0;
}
.rw-stepper li.is-done button { background: var(--ink); border-color: var(--ink); color: #fff; cursor: pointer; }
.rw-stepper li.is-current button { background: var(--sun); border-color: var(--ink); color: var(--ink); box-shadow: var(--shadow-sm); }
.rw-stepper span { margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; padding: 0 2px; }
.rw-stepper li.is-current span { color: var(--ink); font-weight: 800; }
.rw-stepper svg { width: 16px; height: 16px; }
.rw-progress-text { display: none; margin: 12px 0 0; font-size: 14px; font-weight: 700; color: var(--ink-2); }

/* ------------------------------------------------------------- steps */
.rw-body { padding: 26px 30px 8px; }
.rw-step { display: none; }
.rw-step.is-active { display: block; animation: rw-in .28s ease-out; }
@keyframes rw-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.rw-step.is-back.is-active { animation-name: rw-in-back; }
@keyframes rw-in-back { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .rw-step.is-active { animation: none; } }

.rw-step h2 { margin: 0 0 4px; font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.rw-step .rw-lead { margin: 0 0 22px; color: var(--ink-2); font-size: 15px; max-width: 62ch; }
.rw-step h3 { margin: 26px 0 12px; font-size: 16px; font-weight: 800; }

.rw-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 18px; }
.rw-grid .rw-span { grid-column: 1 / -1; }
@media (max-width: 640px) { .rw-grid { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------- fields */
.rw-field { min-width: 0; }
.rw-field > label, .rw-label { display: block; margin: 0 0 6px; font-size: 14px; font-weight: 700; color: var(--ink); }
.rw-field .rw-help { display: block; margin-top: 5px; font-size: 13px; color: var(--ink-2); }
.rw-page .form-control, .rw-page .form-select {
  height: 50px; padding: 10px 14px; font: 500 16px 'Manrope', sans-serif; color: var(--ink);
  background-color: var(--wash); border: 1.5px solid transparent; border-radius: var(--r-field);
  box-shadow: none; transition: border-color .15s, background-color .15s;
}
.rw-page .form-select { padding-right: 40px; background-position: right 14px center; }
.rw-page .form-control::placeholder { color: #9C9BBC; }
.rw-page .form-control:hover, .rw-page .form-select:hover { border-color: var(--line); }
.rw-page .form-control:focus, .rw-page .form-select:focus {
  background-color: #fff; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(68, 89, 197, .22); outline: none;
}
.rw-page .form-control.is-invalid { border-color: var(--danger); background-image: none; }
.rw-field.rw-invalid .form-control, .rw-field.rw-invalid .form-select,
.rw-field.rw-invalid .select2-selection { border-color: var(--danger) !important; background-color: var(--danger-wash) !important; }
.rw-msg { display: flex; gap: 6px; align-items: flex-start; margin-top: 6px; font-size: 13.5px; font-weight: 600; color: var(--danger); }
.rw-msg::before { content: '!'; flex: none; width: 17px; height: 17px; border-radius: 50%; background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; margin-top: 1px; }

/* the old inline error spans ("Expired", "Select any one") keep working, restyled */
.rw-page .id-expiry-date-is-not-valid, .rw-page .locations-not-valid, .rw-page .build-locations-not-valid,
.rw-page .cardtype-options-no-location, .rw-page #country-error {
  display: block; margin-top: 6px; margin-left: 0 !important; font-size: 13.5px; font-weight: 600; color: var(--danger) !important;
}
.rw-page .id-expiry-date-is-not-valid.d-none, .rw-page .locations-not-valid.d-none, .rw-page .build-locations-not-valid.d-none,
.rw-page .cardtype-options-no-location.d-none, .rw-page #country-error.d-none { display: none !important; }

/* the wizard says "Choose at least one location" itself */
.rw-page .locations-not-valid, .rw-page .build-locations-not-valid { display: none !important; }

/* filled from the ID (id-assist.js adds .ai-filled) */
.rw-page .form-control.ai-filled { background-color: var(--leaf-wash) !important; border-color: #8ED0AB !important; }

/* select2 (nationality) made to look like the other fields */
.rw-page .select2-container--bootstrap-5 .select2-selection {
  min-height: 50px; padding: 11px 14px; border: 1.5px solid transparent; border-radius: var(--r-field);
  background-color: var(--wash); font: 500 16px 'Manrope', sans-serif;
}
.rw-page .select2-container--bootstrap-5.select2-container--focus .select2-selection,
.rw-page .select2-container--bootstrap-5.select2-container--open .select2-selection { border-color: var(--ink); background-color: #fff; box-shadow: 0 0 0 3px rgba(68, 89, 197, .22); }
.rw-page .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered { color: var(--ink); padding: 0; line-height: 1.5; }
.rw-page .select2-container--bootstrap-5 .select2-selection--single .select2-selection__placeholder { color: #9C9BBC; }
.rw-page .select2-container--bootstrap-5 .select2-dropdown { border: 2px solid var(--ink); border-radius: 12px; font-family: 'Manrope', sans-serif; overflow: hidden; }
.rw-page .select2-container--bootstrap-5 .select2-dropdown .select2-results__option--highlighted { background: var(--sky); color: #fff; }

/* ------------------------------------------------------------- choice cards (ID type, event pass yes/no) */
.rw-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rw-choice {
  position: relative; display: flex; gap: 14px; align-items: center; padding: 16px; margin: 0;
  border: 2px solid var(--line); border-radius: 16px; background: #fff; cursor: pointer; text-align: left;
  font: inherit; color: var(--ink); transition: border-color .15s, box-shadow .15s, transform .15s;
}
.rw-choice:hover { border-color: var(--ink-2); }
.rw-choice .rw-choice-icon { flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--wash); color: var(--ink); }
.rw-choice .rw-choice-icon svg { width: 26px; height: 26px; }
.rw-choice b { display: block; font-size: 16px; font-weight: 800; }
.rw-choice small { display: block; font-size: 13px; color: var(--ink-2); line-height: 1.35; margin-top: 2px; }
.rw-choice.is-on, .rw-choice:has(input:checked) {
  border-color: var(--ink); box-shadow: var(--shadow-sm); transform: translate(-1px, -1px);
}
.rw-choice.is-on .rw-choice-icon, .rw-choice:has(input:checked) .rw-choice-icon { background: var(--flamingo); color: #fff; }
.rw-choice input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.rw-choice:focus-visible, .rw-choice:has(input:focus-visible) { outline: 3px solid var(--sky); outline-offset: 2px; }
@media (max-width: 480px) { .rw-choices { grid-template-columns: 1fr; } }

/* location chips (the real checkboxes stay inside: existing scripts use them) */
.rw-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.rw-chip {
  position: relative; display: inline-flex; align-items: center; gap: 10px; margin: 0; padding: 11px 16px 11px 12px;
  border: 2px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer; font-weight: 700; font-size: 15px;
  transition: border-color .15s, background-color .15s;
}
.rw-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rw-chip .rw-tick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; background: #fff; }
.rw-chip .rw-tick svg { width: 13px; height: 13px; opacity: 0; color: #fff; }
.rw-chip:hover { border-color: var(--ink-2); }
.rw-chip:has(input:checked) { border-color: var(--ink); background: var(--flamingo-wash); }
.rw-chip:has(input:checked) .rw-tick { background: var(--flamingo); border-color: var(--flamingo); }
.rw-chip:has(input:checked) .rw-tick svg { opacity: 1; }
.rw-chip:has(input:focus-visible) { outline: 3px solid var(--sky); outline-offset: 2px; }

/* ------------------------------------------------------------- uploads */
.rw-upload { position: relative; }
.rw-drop {
  height: 148px; border: 2px dashed #B9BCE3; border-radius: 16px; background: var(--wash);
  display: flex; align-items: center; gap: 16px; padding: 16px 18px; transition: border-color .15s, background-color .15s; overflow: hidden;
}
.rw-upload input[type=file] {
  position: absolute; top: 0; left: 0; width: 100%; height: 148px; opacity: 0; cursor: pointer; z-index: 2;
}
.rw-upload:hover .rw-drop { border-color: var(--sky); background: #E9EBFA; }
.rw-upload:has(input[type=file]:focus-visible) .rw-drop { outline: 3px solid var(--sky); outline-offset: 2px; }
.rw-drop-icon { flex: none; width: 56px; height: 56px; border-radius: 14px; background: #fff; border: 2px solid var(--ink); display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.rw-drop-icon svg { width: 28px; height: 28px; }
.rw-drop-text { min-width: 0; }
.rw-drop-text b { display: block; font-size: 16px; font-weight: 800; }
.rw-drop-text small { display: block; font-size: 13.5px; color: var(--ink-2); line-height: 1.4; margin-top: 2px; }
.rw-drop-text .rw-drop-name { display: none; margin-top: 6px; font-size: 13.5px; font-weight: 700; color: var(--leaf); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rw-drop-thumb { display: none; flex: none; width: 110px; height: 110px; object-fit: cover; border-radius: 10px; border: 2px solid var(--ink); background: #fff; }
.rw-drop-pdf { display: none; flex: none; width: 84px; height: 110px; border-radius: 10px; border: 2px solid var(--ink); background: #fff; color: var(--danger); font-weight: 800; place-items: center; font-size: 18px; }
.rw-upload.has-file .rw-drop { border-style: solid; border-color: var(--leaf); background: var(--leaf-wash); }
.rw-upload.has-file .rw-drop-icon { display: none; }
.rw-upload.has-file .rw-drop-thumb { display: block; }
.rw-upload.has-file.is-pdf .rw-drop-thumb { display: none; }
.rw-upload.has-file.is-pdf .rw-drop-pdf { display: grid; }
.rw-upload.has-file .rw-drop-name { display: block; }
.rw-upload.rw-invalid .rw-drop { border-color: var(--danger); background: var(--danger-wash); }
.rw-upload .text-mute { display: none; } /* the old "(MAX FILE SIZE IS 3MB)" line: large photos are now made smaller */

/* the badge photo: portrait preview */
.rw-photo-layout { display: grid; grid-template-columns: 1fr 200px; gap: 22px; align-items: start; }
.rw-photo-frame { width: 200px; aspect-ratio: 4 / 5; border-radius: 16px; border: 2px solid var(--ink); background: var(--wash); box-shadow: var(--shadow); overflow: hidden; display: grid; place-items: center; color: var(--ink-2); text-align: center; font-size: 13px; padding: 12px; }
.rw-photo-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rw-photo-frame.has-photo { padding: 0; }
.rw-tips { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 8px; }
.rw-tips li { display: flex; gap: 10px; font-size: 14.5px; color: var(--ink); }
.rw-tips svg { flex: none; width: 20px; height: 20px; color: var(--leaf); margin-top: 1px; }
@media (max-width: 640px) {
  .rw-photo-layout { grid-template-columns: 1fr; }
  .rw-photo-frame { width: 160px; margin: 0 auto; grid-row: 1; }
}

/* messages from the ID reader / photo check (id-assist.js) */
.rw-page .ai-box { margin-top: 12px; padding: 12px 14px; border-radius: 12px; font-size: 14.5px; line-height: 1.45; background: var(--wash); color: var(--ink); border: 1.5px solid var(--line); }
.rw-page .ai-box.ok { background: var(--leaf-wash); border-color: #A9DEC1; color: #10603A; }
.rw-page .ai-box.warn { background: #FFF6DB; border-color: #F1D98A; color: #6E4F00; }
.rw-page .ai-box.err { background: var(--danger-wash); border-color: #F2C2C7; color: var(--danger); }
.rw-page .ai-box button { background: var(--ink); border-radius: 10px; padding: 8px 14px; font: 700 14px 'Manrope', sans-serif; }
.rw-page .ai-hint { font-size: 13.5px; font-weight: 600; color: #9A5B00; margin-top: 6px; }
.rw-id-mirror { margin: 0 0 20px; }
.rw-id-mirror:empty { display: none; }
.rw-note { margin: 18px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--wash); color: var(--ink-2); font-size: 14px; }
.rw-note b { color: var(--ink); }

/* ------------------------------------------------------------- review */
.rw-review { display: grid; gap: 14px; }
.rw-review section { border: 1.5px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.rw-review header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.rw-review h4 { margin: 0; font-size: 15px; font-weight: 800; }
.rw-review .rw-edit { border: 0; background: none; color: var(--sky-deep); font: 700 14px 'Manrope', sans-serif; padding: 4px 6px; border-radius: 8px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.rw-review dl { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 6px 14px; margin: 0; font-size: 14.5px; }
.rw-review dt { color: var(--ink-2); font-weight: 600; }
.rw-review dd { margin: 0; font-weight: 700; word-break: break-word; }
.rw-review dd.rw-missing { color: var(--danger); }
.rw-review .rw-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.rw-review .rw-thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1.5px solid var(--line); }
@media (max-width: 480px) { .rw-review dl { grid-template-columns: 1fr; gap: 0; } .rw-review dd { margin-bottom: 8px; } }

.rw-terms { display: flex; gap: 12px; align-items: flex-start; margin: 22px 0 6px; padding: 14px 16px; border-radius: 14px; background: var(--wash); cursor: pointer; font-size: 15px; }
.rw-terms input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--ink); flex: none; cursor: pointer; }
.rw-terms a { color: var(--sky-deep); font-weight: 700; }
.rw-terms.rw-invalid { background: var(--danger-wash); outline: 2px solid var(--danger); }

/* ------------------------------------------------------------- footer actions */
.rw-actions {
  position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 12px;
  padding: 16px 30px; margin-top: 18px; background: #fff; border-top: 1px solid var(--line);
  border-radius: 0 0 var(--r-card) var(--r-card);
}
.rw-actions .rw-spacer { flex: 1; }
.rw-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 12px 26px;
  border-radius: 14px; font: 800 16px/1.1 'Manrope', sans-serif; cursor: pointer; text-decoration: none; transition: transform .1s, box-shadow .1s, background-color .15s;
}
.rw-btn-primary { background: var(--sun); color: var(--ink); border: 2px solid var(--ink); box-shadow: var(--shadow-sm); }
.rw-btn-primary:hover { background: var(--sun-press); }
.rw-btn-primary:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.rw-btn-primary:disabled { opacity: .65; cursor: progress; }
.rw-btn-ghost { background: transparent; color: var(--ink); border: 2px solid transparent; padding-left: 12px; padding-right: 14px; }
.rw-btn-ghost:hover { background: var(--wash); }
.rw-btn:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }
.rw-btn svg { width: 18px; height: 18px; }
.rw-btn .spinner-border { width: 18px; height: 18px; border-width: 3px; }
.rw-reset { background: none; border: 0; color: var(--ink-2); font: 600 14px 'Manrope', sans-serif; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 6px 4px; }

/* hidden helpers that keep their values for the form (ID type select) */
.rw-visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; border: 0 !important; padding: 0 !important; margin: -1px !important; }

/* crop popup */
.rw-page .modal-content { border: 2px solid var(--ink); border-radius: 20px; box-shadow: var(--shadow); background: #fff !important; color: var(--ink) !important; overflow: hidden; }
.rw-page .modal-header, .rw-page .modal-footer { border-color: var(--line) !important; padding: 14px 20px; }
.rw-page .modal-title { font-weight: 800; font-size: 19px; }
.rw-page .modal-body { padding: 16px 20px; }
.rw-page #cropper-container { width: 100%; max-height: 62vh; overflow: hidden; display: block !important; }
.rw-page #cropper-container img { max-width: 100%; display: block; }
.rw-page .crop_cont { position: static !important; padding: 10px 0 0 !important; display: block !important; color: var(--ink-2); }
.rw-page .crop_cont p { font-size: 14px !important; margin: 0; color: var(--ink-2) !important; }
.rw-page .modal-footer .btn { border-radius: 12px; font-weight: 800; min-height: 48px; padding: 10px 20px; }
.rw-page .modal-footer .btn-light, .rw-page .modal-footer .btn-success { background: var(--sun); color: var(--ink); border: 2px solid var(--ink); }
.rw-page .modal-footer .btn-danger, .rw-page .modal-footer .btn-secondary { background: #fff; color: var(--ink); border: 2px solid var(--line); }

/* ------------------------------------------------------------- phones */
@media (max-width: 640px) {
  body.rw-page { background-attachment: scroll; }
  .rw-top { padding: 18px 16px 14px; }
  .rw-logo { width: 140px; }
  .rw-wrap { padding: 0 10px 28px; }
  .rw-card { border-radius: 18px; box-shadow: 4px 4px 0 var(--ink); }
  .rw-head { padding: 20px 18px 14px; }
  .rw-head h1 { font-size: 23px; }
  .rw-stepper span { display: none; }
  .rw-stepper button { width: 32px; height: 32px; font-size: 14px; }
  .rw-stepper li::before { top: 15px; }
  .rw-progress-text { display: block; }
  .rw-body { padding: 20px 18px 4px; }
  .rw-actions { padding: 12px 14px; border-radius: 0 0 16px 16px; }
  .rw-btn { min-height: 50px; padding: 12px 18px; }
  .rw-actions .rw-btn-primary { flex: 1; }
  .rw-drop { height: 128px; gap: 12px; padding: 12px 14px; }
  .rw-upload input[type=file] { height: 128px; }
  .rw-drop-thumb { width: 92px; height: 92px; }
  .rw-drop-pdf { width: 70px; height: 92px; }
}

/* Build: the page script shows the event-pass part with display:flex */
.additional-row > .rw-extra { width: 100%; min-width: 0; }

/* phones: a fixed background is jumpy on mobile browsers */
@media (max-width: 900px) { body.rw-page { background-attachment: scroll; } }
