/* ==========================================================================
   Training registration form
   Index: page ground + track · header card · section cards · fields
          · chip rows · info / consent boxes · submit · breakpoints
   Mobile-first; two-column field rows start at 40rem (640px).
   ========================================================================== */

/* ---- Page ground + track ------------------------------------------------
   The design's column on this page is 864px. Used together with .container. */
.page-register main { background: var(--page); }
.reg { --container: 54rem; padding-block: var(--sp-4) var(--sp-10); }

/* ---- Header card ------------------------------------------------------- */
.reg-head {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-block-end: var(--sp-6);
  padding: var(--sp-6) var(--sp-5);
  background: var(--surface);
  border-block-start: 6px solid var(--burgundy);
  border-radius: var(--r-8);
  box-shadow: var(--sh-sm);
}
.reg-head__brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .375rem;
  font-size: var(--fs-14);
  font-weight: 700;
  line-height: 1.45;
  color: var(--burgundy);
}
.reg-head__brand .icon { font-size: 1.0625rem; }
.reg-head__title {
  font-size: clamp(1.625rem, 1.2rem + 2vw, 2.125rem);
  font-weight: 700;
  line-height: 1.35;
  color: var(--navy-soft);
}
.reg-head__lead { font-size: var(--fs-14); line-height: 1.7; color: var(--text); }
.reg-head__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2) var(--sp-4);
  margin-block-start: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  background: var(--gray);
  border-radius: var(--r-4);
}
.reg-head__note {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-14);
  line-height: 1.5;
  color: var(--text);
}
.reg-head__note .icon { font-size: .9375rem; color: var(--amber-ink); }
.reg-head__cohort {
  font-size: var(--fs-12);
  font-weight: 700;
  line-height: 1.35;
  color: var(--navy-soft);
}

/* ---- Section cards ----------------------------------------------------- */
.reg-form { display: flex; flex-direction: column; gap: var(--sp-6); }
.reg-section {
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
  padding: var(--sp-6) var(--sp-5);
  background: var(--surface);
  border-radius: var(--r-8);
  box-shadow: var(--sh-sm);
}
.reg-section__title {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin-block-end: var(--sp-2);
  font-size: var(--fs-22);
  font-weight: 700;
  line-height: 1.35;
  color: var(--navy-soft);
}
.reg-section__num {
  display: grid;
  place-items: center;
  flex: none;
  width: 2rem;
  height: 2rem;
  font-size: var(--fs-18);
  font-weight: 600;
  line-height: 1;
  color: var(--surface);
  background: var(--burgundy);
  border-radius: var(--r-12);
}
.reg-grid { display: grid; gap: var(--sp-4); }

/* ---- Fields (labels are .field__label--inline: the star / "(اختياري)" marker follows the text) ---- */
.reg-form .field__label { color: var(--navy-soft); }
.reg-form .field__opt { font-weight: 400; color: var(--text); }
.reg-form textarea.input { min-height: 4.25rem; padding-block: .625rem; }
.reg-form textarea.input[rows="3"] { min-height: 5.75rem; }

/* ---- Chip rows (radio groups; the group is validated by app.js) ---------- */
.reg-form .choices legend { margin-block-end: var(--sp-2); padding: 0; }
.reg-form .choice__label { padding-inline: var(--sp-5); border-radius: var(--r-6); }

/* ---- Specialty note (shared .callout) and consent box -------------------- */
.reg-note { --callout-bg: var(--gray); --callout-radius: var(--r-4); --callout-accent: var(--amber-ink); }
.reg-note .callout__icon { font-size: 1rem; }
.reg-note .callout__title { color: var(--navy-soft); }
.reg-note .callout__text { line-height: 1.5; }
.reg-consent { padding: var(--sp-4); background: var(--gray); border-radius: var(--r-4); }
.reg-consent .choice__label { background: var(--surface); }

/* ---- Submit -------------------------------------------------------------- */
.reg-submit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
  padding-block: var(--sp-4);
}
.reg-submit__btn {
  width: 100%;
  max-width: 19.5rem;
  min-height: 3.375rem;
  font-size: var(--fs-18);
  border-radius: var(--r-8);
  box-shadow: var(--sh-md);
}
/* the send arrow points forward (left) in RTL, as in the design */
[dir="rtl"] .reg-submit__btn .icon { scale: -1 1; }
.reg-submit__status-icon { margin-block-start: .1875rem; font-size: 1rem; }

/* ---- ≥ 640px: roomier cards, two-column rows, compact chips -------------- */
@media (min-width: 40rem) {
  .reg-head, .reg-section { padding: var(--sp-10); }
  .reg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reg-grid__wide { grid-column: 1 / -1; }
  .reg-form .choice__label { padding-inline: var(--sp-4); }
}

/* ---- Required star: the last word and the star never split across lines ---- */
.reg-nw { white-space: nowrap; }

/* ---- English (dir="ltr") fixes ------------------------------------------------
   The shared .input[dir="ltr"] rule keeps e-mail and phone values right-aligned, which only fits the
   Arabic page. NEEDS-SHARED: it belongs in components.css behind [dir="rtl"]. */
html[dir="ltr"] .reg-form .input[dir="ltr"],
html[dir="ltr"] .reg-form .input[dir="ltr"]::placeholder { text-align: left; }
