/* MFR Quick Register
   Palette: ink #17212b · steel #5a6875 · line #d9dfe4 · plate #f1f4f6 · navy #1d3b5c · signal amber #f0a202
   Signal amber is used only on the current step marker. Font inherits from the theme. */

/* ---------- Language switcher (site-wide) ---------- */
.mfr-lang {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid #d9dfe4;
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  line-height: 1;
}
.mfr-lang a {
  padding: 7px 12px;
  border-radius: 999px;
  color: #5a6875;
  text-decoration: none;
  font-weight: 500;
}
.mfr-lang a:hover { color: #17212b; }
.mfr-lang a.is-active { background: #1d3b5c; color: #fff; }
.mfr-lang a:focus-visible { outline: 2px solid #1d3b5c; outline-offset: 2px; }
.mfr-lang--floating {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 9999;
  box-shadow: 0 6px 20px rgba(23, 33, 43, .14);
}

/* ---------- Wrapper ---------- */
.mfr-wrap {
  --ink: #17212b;
  --steel: #5a6875;
  --line: #d9dfe4;
  --plate: #f1f4f6;
  --navy: #1d3b5c;
  --navy-hover: #152d47;
  --amber: #f0a202;
  --danger: #b42318;
  --danger-bg: #fdf0ee;
  --ok: #117a52;
  --ok-bg: #eaf6f0;
  --info-bg: #eef3f8;

  max-width: 480px;
  margin: 40px auto;
  padding: 0 16px;
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.55;
}
.mfr-wrap--wide { max-width: 640px; }
.mfr-wrap *, .mfr-wrap *::before, .mfr-wrap *::after { box-sizing: border-box; }

.mfr-topbar { display: flex; justify-content: flex-end; margin-bottom: 12px; }

.mfr-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px 28px 24px;
}
.mfr-card--center { text-align: center; }
.mfr-card--center .mfr-form { text-align: left; }

/* ---------- Stepper: a production line of 4 stations ---------- */
.mfr-steps {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  counter-reset: none;
}
.mfr-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 0;
  text-align: center;
}
.mfr-step::before {           /* rail between stations */
  content: "";
  position: absolute;
  top: 13px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: var(--line);
  z-index: 0;
}
.mfr-step:first-child::before { display: none; }
.mfr-step.is-done::before,
.mfr-step.is-current::before { background: var(--navy); }

.mfr-step__dot {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: #fff;
  color: var(--steel);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.mfr-step.is-done .mfr-step__dot { background: var(--navy); border-color: var(--navy); color: #fff; }
.mfr-step.is-current .mfr-step__dot {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--ink);
  box-shadow: 0 0 0 4px rgba(240, 162, 2, .22);
}
.mfr-step__label {
  font-size: 12px;
  line-height: 1.3;
  color: var(--steel);
  max-width: 11ch;
}
.mfr-step.is-current .mfr-step__label { color: var(--ink); font-weight: 600; }

/* ---------- Headings ---------- */
.mfr-head { margin-bottom: 20px; }
.mfr-head--row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.mfr-wrap .mfr-title {
  margin: 0 0 6px;
  font-size: 22px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.mfr-sub { margin: 0; color: var(--steel); }
.mfr-sub strong, .mfr-email { color: var(--ink); word-break: break-all; }
.mfr-note {
  margin: 14px auto 20px;
  padding: 10px 14px;
  max-width: 38ch;
  background: var(--plate);
  border-radius: 8px;
  font-size: 13px;
  color: var(--steel);
}

.mfr-hero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--info-bg);
  color: var(--navy);
}
.mfr-hero--ok { background: var(--ok-bg); color: var(--ok); }
.mfr-hero--warn { background: var(--danger-bg); color: var(--danger); }

/* ---------- Form ---------- */
.mfr-form { display: flex; flex-direction: column; gap: 18px; }
.mfr-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mfr-field > label, .mfr-label, .mfr-label-row label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.mfr-label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.mfr-count { font-size: 12px; color: var(--steel); font-variant-numeric: tabular-nums; }

.mfr-wrap input[type=text],
.mfr-wrap input[type=email],
.mfr-wrap input[type=password],
.mfr-wrap input[type=tel],
.mfr-wrap select,
.mfr-wrap textarea {
  width: 100%;
  min-height: 46px;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid #c5cdd4;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  line-height: 1.4;
  box-shadow: none;
  transition: border-color .15s, box-shadow .15s;
}
.mfr-wrap textarea { min-height: 104px; resize: vertical; }
.mfr-wrap select { appearance: auto; }
.mfr-wrap input::placeholder, .mfr-wrap textarea::placeholder { color: #9aa5af; }
.mfr-wrap input:focus, .mfr-wrap select:focus, .mfr-wrap textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(29, 59, 92, .16);
}
.mfr-field.has-error input,
.mfr-field.has-error select,
.mfr-field.has-error textarea { border-color: var(--danger); }
.mfr-field.has-error input:focus,
.mfr-field.has-error select:focus,
.mfr-field.has-error textarea:focus { box-shadow: 0 0 0 3px rgba(180, 35, 24, .14); }

.mfr-hint { margin: 0; font-size: 13px; color: var(--steel); }
.mfr-error {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--danger);
}
.mfr-error::before { content: "! "; font-weight: 700; }

/* small inline link (e.g. forgot password) */
.mfr-smalllink { font-size: 13px; font-weight: 500; color: var(--navy); text-decoration: underline; text-underline-offset: 2px; }

/* password */
.mfr-pw { position: relative; }
.mfr-pw input { padding-right: 76px; }
.mfr-pw__toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  padding: 6px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--navy);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.mfr-pw__toggle:hover { background: var(--plate); }
.mfr-pw__toggle:focus-visible { outline: 2px solid var(--navy); outline-offset: 1px; }

/* checkbox */
.mfr-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; font-weight: 400; cursor: pointer; }
.mfr-check input { width: 18px; height: 18px; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--navy); }
.mfr-check a { color: var(--navy); text-decoration: underline; text-underline-offset: 2px; }

/* honeypot */
.mfr-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* grid */
.mfr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* fieldsets */
.mfr-set { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.mfr-set legend {
  width: 100%;
  margin: 0 0 2px;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
  color: var(--steel);
}
.mfr-set--optional { margin-top: 10px; }

/* required / optional marks */
.mfr-req { margin-left: 3px; color: var(--danger); font-weight: 700; }
.mfr-opt { font-weight: 400; color: var(--steel); font-size: 13px; }

/* multi-select checkbox groups */
.mfr-multi { display: flex; flex-direction: column; gap: 12px; }
.mfr-search { position: relative; margin-top: 4px; }
.mfr-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--steel); pointer-events: none; }
.mfr-wrap .mfr-search input[type=search] {
  width: 100%;
  min-height: 42px;
  padding: 8px 12px 8px 36px;
  border: 1px solid #c5cdd4;
  border-radius: 8px;
  background: var(--plate);
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
}
.mfr-wrap .mfr-search input[type=search]:focus { outline: none; background: #fff; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(29, 59, 92, .16); }

.mfr-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 4px;
}
.mfr-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--ink);
  cursor: pointer;
  transition: border-color .12s, background-color .12s;
}
.mfr-option[hidden] { display: none; }
.mfr-option:hover { border-color: #9fb0c1; }
.mfr-option input { flex: 0 0 auto; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--navy); cursor: pointer; }
.mfr-option:has(input:checked) { border-color: var(--navy); background: var(--info-bg); }
.mfr-option:has(input:focus-visible) { outline: 2px solid var(--navy); outline-offset: 1px; }
.mfr-option--other span { color: var(--steel); }
.mfr-field.has-error .mfr-option { border-color: #e8b4ad; }

.mfr-nomatch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  padding: 10px 12px;
  border: 1px dashed #c5cdd4;
  border-radius: 8px;
  font-size: 14px;
  color: var(--steel);
}
.mfr-nomatch[hidden] { display: none; }
.mfr-linkbtn {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.mfr-linkbtn:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }

.mfr-other { padding: 12px 14px; border-left: 3px solid var(--navy); background: var(--plate); border-radius: 0 8px 8px 0; }
.mfr-other[hidden] { display: none; }

/* consent */
.mfr-consent { padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--plate); }
.mfr-consent__text { margin: 0 0 4px; font-size: 14px; color: var(--ink); }
.mfr-field.mfr-consent.has-error { border-color: var(--danger); background: var(--danger-bg); }

/* ---------- Buttons ---------- */
.mfr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none !important;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.mfr-btn:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.mfr-btn[disabled] { cursor: not-allowed; opacity: .7; }
.mfr-btn--primary { width: 100%; background: var(--navy); color: #fff !important; }
.mfr-btn--primary:hover:not([disabled]) { background: var(--navy-hover); }
.mfr-btn--secondary { width: 100%; background: #fff; border-color: #c5cdd4; color: var(--navy) !important; }
.mfr-btn--secondary:hover:not([disabled]) { border-color: var(--navy); }
.mfr-btn--ghost { background: transparent; color: var(--steel) !important; }
.mfr-btn--ghost:hover { color: var(--ink) !important; background: var(--plate); }
.mfr-btn.is-busy { position: relative; }

.mfr-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.mfr-badge--soft { background: var(--plate); color: var(--steel); padding: 5px 10px; }

.mfr-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 22px; }
.mfr-actions--split { flex-direction: row; justify-content: flex-end; align-items: center; margin-top: 6px; }
.mfr-actions--split .mfr-btn--primary { width: auto; min-width: 180px; }

/* ---------- Alerts ---------- */
.mfr-alert {
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
  border-left: 3px solid;
}
.mfr-alert[hidden] { display: none; }
.mfr-alert a { color: inherit; font-weight: 600; text-decoration: underline; }
.mfr-alert--error { background: var(--danger-bg); border-color: var(--danger); color: #7a1a12; }
.mfr-alert--success { background: var(--ok-bg); border-color: var(--ok); color: #0b5a3c; }
.mfr-alert--info { background: var(--info-bg); border-color: var(--navy); color: var(--ink); }

.mfr-foot { margin: 20px 0 0; text-align: center; font-size: 14px; color: var(--steel); }
.mfr-foot a { color: var(--navy); font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 560px) {
  .mfr-wrap { margin: 20px auto; padding: 0 12px; }
  .mfr-card { padding: 22px 18px 20px; border-radius: 10px; }
  .mfr-grid { grid-template-columns: 1fr; }
  .mfr-options { grid-template-columns: 1fr; }
  .mfr-step__label { font-size: 11px; }
  .mfr-step:not(.is-current) .mfr-step__label { visibility: hidden; height: 0; }
  .mfr-steps { margin-bottom: 22px; }
  .mfr-head--row { flex-direction: column-reverse; gap: 10px; }
  .mfr-actions--split { flex-direction: column-reverse; align-items: stretch; }
  .mfr-actions--split .mfr-btn--primary { width: 100%; }
  .mfr-lang--floating { right: 12px; bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .mfr-wrap *, .mfr-lang * { transition: none !important; }
}
