/* Santubong International Nature Trail Run 2026 — registration */

:root {
  --yellow: #c6d447;
  --yellow-dark: #a8b82e;
  --navy: #0b1f3f;
  --navy-light: #152d52;
  --blue: #1f4d73;
  --white: #ffffff;
  --text: #1a1a1a;
  --red: #c41e3a;
  --shadow: 0 4px 24px rgba(11, 31, 63, 0.12);
  --radius: 8px;
  --font: "Montserrat", system-ui, sans-serif;
  --header-h: 72px;
}

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

html,
body {
  margin: 0;
}

body {
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  line-height: 1.6;
  background-color: #eef3e6;
  background-image:
    linear-gradient(180deg, rgba(238, 243, 230, 0.92), rgba(238, 243, 230, 0.96)),
    url("../images/sintr-bg.png");
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a {
  color: inherit;
}

.reg-header {
  background: var(--navy);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.reg-header__inner {
  width: min(960px, 94%);
  min-height: var(--header-h);
  margin: 0 auto;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.reg-header__brand {
  display: flex;
  align-items: center;
  min-width: 0;
  text-decoration: none;
  color: var(--white);
}

.reg-header__brand img {
  height: 56px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
}

.reg-header__brand span {
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.reg-header__back {
  flex-shrink: 0;
  color: var(--yellow);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
}

.reg-header__back:hover {
  color: var(--white);
}

.reg-wrap {
  max-width: min(960px, 94%);
  margin: 1.5rem auto 3rem;
  padding: 0 1rem;
}

.reg-title {
  font-weight: 800;
  color: var(--navy);
  margin: 0 0 0.5rem;
  font-size: 1.6rem;
}

.reg-subtitle {
  margin: 0 0 1.5rem;
  color: #5a6578;
}

.reg-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--yellow);
}

@media (min-width: 640px) {
  .reg-card {
    padding: 2rem;
  }
}

.reg-steps {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.reg-steps span {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: #e8ecf2;
  color: var(--navy);
}

.reg-steps span.active {
  background: var(--yellow);
  color: var(--navy);
}

.reg-steps span.done {
  background: var(--navy);
  color: var(--white);
}

.form-field label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
  color: var(--navy);
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  border: 1px solid #d0d7e2;
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
  font-family: inherit;
  font-size: 0.95rem;
  box-sizing: border-box;
  background: var(--white);
  color: var(--navy);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 2px solid var(--yellow);
  outline-offset: 1px;
  border-color: var(--navy);
}

.form-field input[readonly],
.form-field .age-display {
  background: #f4f6ee;
  color: var(--navy);
  font-weight: 700;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 1rem;
}

@media (min-width: 640px) {
  .form-grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.form-field--full {
  grid-column: 1 / -1;
}

.form-field-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.form-field-row .form-field {
  margin-bottom: 1rem;
}

.form-field-row .form-field:last-child {
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .form-field-row--name-gender {
    grid-template-columns: 1fr minmax(8.5rem, 11rem);
    gap: 0 1rem;
  }

  .form-field-row--dob-age {
    grid-template-columns: 1fr minmax(8.5rem, 12rem);
    gap: 0 1rem;
  }

  .form-field-row--id {
    grid-template-columns: minmax(10.5rem, 12.5rem) 1fr;
    gap: 0 1rem;
    align-items: end;
  }

  .form-field-row--id .id-type-options {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0.45rem;
  }

  .form-field-row--id .id-type-option {
    font-size: 0.85rem;
  }
}

.form-field-row--id .form-field-sublabel {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
  color: var(--navy);
}

.form-field-row--id .id-type-options {
  margin-top: 0;
}

.form-field-row__hint {
  grid-column: 1 / -1;
  margin: -0.35rem 0 1rem;
}

.phone-with-country {
  display: grid;
  grid-template-columns: minmax(9.5rem, 12.5rem) 1fr;
  gap: 0.5rem;
  align-items: stretch;
}

.phone-with-country select {
  min-width: 0;
  font-size: 0.82rem;
  padding-right: 0.4rem;
}

.phone-with-country input[type="tel"] {
  min-width: 0;
}

@media (max-width: 480px) {
  .phone-with-country {
    grid-template-columns: 1fr;
  }
}

.form-field {
  margin-bottom: 1rem;
}

.btn-primary,
.btn-secondary {
  font-family: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s, color 0.2s;
}

.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--navy);
  color: var(--white);
  border: 2px solid var(--navy);
}

.btn-primary:hover {
  background: var(--navy-light);
  border-color: var(--navy-light);
}

.btn-secondary {
  background: var(--yellow);
  color: var(--navy);
  border: 2px solid var(--yellow);
  display: inline-block;
}

.btn-secondary:hover {
  background: var(--yellow-dark);
  border-color: var(--yellow-dark);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

@media (max-width: 639px) {
  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn-primary,
  .form-actions .btn-secondary {
    width: 100%;
    box-sizing: border-box;
  }
}

.alert-error {
  background: #fde8eb;
  color: var(--red);
  padding: 0.75rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.participant-block {
  border: 1px solid #e0e6ef;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  background: #fafbfc;
  border-left: 4px solid var(--yellow);
}

@media (min-width: 640px) {
  .participant-block {
    padding: 1.25rem 1.5rem;
  }
}

.participant-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.participant-block h3.participant-heading {
  font-weight: 700;
  margin: 0;
  color: var(--navy);
  font-size: 1rem;
}

.btn-remove-participant {
  background: transparent;
  color: var(--red);
  border: 1px solid #e8b4bc;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

.btn-remove-participant:hover {
  background: #fde8eb;
}

.addon-block .form-field {
  margin-bottom: 0;
}

.addon-block-row {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.addon-image-thumb {
  padding: 0;
  border: none;
  background: none;
  cursor: zoom-in;
  border-radius: var(--radius);
  flex-shrink: 0;
  line-height: 0;
}

.addon-image-thumb:hover .addon-block-image {
  opacity: 0.92;
}

.addon-image-thumb:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}

.addon-block-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
  transition: opacity 0.15s;
}

.addon-image-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.addon-image-modal.is-open {
  display: flex;
}

.addon-image-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 31, 63, 0.82);
  border: none;
  cursor: pointer;
}

.addon-image-modal__panel {
  position: relative;
  z-index: 1;
  width: min(92vw, 560px);
  max-height: 90vh;
  background: var(--white);
  border-radius: 12px;
  padding: 1rem 1rem 1.25rem;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.addon-image-modal__panel--wide {
  width: min(96vw, 920px);
}

.addon-image-modal__panel--wide .addon-image-modal__img {
  max-height: min(82vh, 720px);
}

.form-field-label-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.35rem;
}

.form-field-label-row label {
  margin-bottom: 0;
}

.sizing-chart-link {
  border: none;
  background: none;
  padding: 0;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.sizing-chart-link:hover {
  color: var(--yellow-dark);
}

.sizing-chart-link:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
  border-radius: 2px;
}

.addon-image-modal__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  text-align: center;
}

.addon-image-modal__img {
  max-width: 100%;
  max-height: min(70vh, 480px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius);
}

.addon-image-modal__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 6px;
  background: #eef3e6;
  color: var(--navy);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
}

.addon-image-modal__close:hover {
  background: var(--yellow);
}

body.addon-image-modal-open {
  overflow: hidden;
}

.addon-block-details {
  flex: 1;
  min-width: 0;
}

.addon-block-qty {
  max-width: 12rem;
}

.field-hint {
  display: block;
  font-size: 0.75rem;
  color: #666;
  margin: 0.4rem 0 0;
  line-height: 1.4;
}

.field-hint--standalone {
  margin: 0;
}

.field-hint--error {
  color: var(--red);
  margin-top: 0.4rem;
}

.id-type-options {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.25rem;
}

.id-type-option {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--navy);
}

.id-type-option input {
  width: auto;
  margin: 0;
  accent-color: var(--navy);
}

.email-verify-notice {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  background: #f4f8dc;
  border: 1px solid var(--yellow);
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--navy);
  line-height: 1.5;
}

.email-verify-notice #email-verify-address {
  font-weight: 700;
  word-break: break-all;
}

.summary-section {
  margin-bottom: 1.75rem;
}

.summary-section__heading {
  font-weight: 700;
  font-size: 1rem;
  margin: 0 0 0.75rem;
  color: var(--navy);
}

.summary-dl {
  display: grid;
  grid-template-columns: minmax(6.5rem, 8.5rem) 1fr;
  gap: 0.4rem 0.85rem;
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
}

.summary-dl dt {
  font-weight: 600;
  color: #5a6578;
  margin: 0;
}

.summary-dl dd {
  margin: 0;
  color: var(--navy);
  word-break: break-word;
}

.summary-dl--contact {
  max-width: 32rem;
}

.summary-participant {
  border: 1px solid #e0e6ef;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  background: #fafbfc;
  border-left: 4px solid var(--yellow);
}

.summary-participant__title {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
}

.summary-participant__fee {
  margin: 0.75rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid #e0e6ef;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy);
}

.summary-subtotal {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
}

.summary-addon-list {
  margin: 0;
  padding: 0 0 0 1.1rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--navy);
}

.summary-total {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0 0 1.5rem;
  color: var(--navy);
}

.terms-agreement {
  flex-basis: 100%;
  margin: -0.25rem 0 0.5rem;
  padding: 0.85rem 1rem;
  border: 1px solid #e0e6ef;
  border-radius: var(--radius);
  background: #fafbfc;
}

.terms-agreement__label {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--navy);
  cursor: pointer;
}

.terms-agreement__label input {
  width: auto;
  margin-top: 0.25rem;
  flex-shrink: 0;
  accent-color: var(--navy);
}

.terms-agreement__label a {
  color: var(--navy);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
