/* =============================================================================
   site.css — MFA Distribution Report — Public form global + component styles
   Phase 2 implementation
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;900&family=Tajawal:wght@300;400;500;700&display=swap');

/* ─── Base Reset & Body ──────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-latin);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-gray-800);
  background: #f0f4f8;
  -webkit-font-smoothing: antialiased;
}

body:lang(ar),
[dir="rtl"] {
  font-family: var(--font-arabic);
}

/* Accessibility */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ─── Form Header ─────────────────────────────────────────────────────────────── */
.form-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: var(--mfa-shell-bg);
  border-bottom: none;
  box-shadow: 0 2px 12px rgba(16, 39, 50, 0.35);
}

.form-header::after {
  content: "";
  display: block;
  height: 4px;
  width: 100%;
  background: var(--gradient-brand-stripe);
}

.form-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 64px;
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
}

.form-header__brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: inherit;
}

.form-header__logo {
  height: 48px;
  width: auto;
}

/* ─── Language Switcher Dropdown ─────────────────────────────────────────────── */
.lang-switcher {
  display: flex;
  align-items: center;
}



.lang-select {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-full);
  color: #ffffff;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  font-family: inherit;
  padding: 6px 20px;
  /* restores symmetrical standard vertical thickness for both LTR and RTL */
  min-width: 140px;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
  outline: none;
}

.lang-select:hover,
.lang-select:focus {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}



@media (max-width: 480px) {
  .lang-select {
    min-width: 110px;
    font-size: var(--text-xs);
  }
}

@media (max-width: 320px) {
  .lang-select {
    min-width: 90px;
  }
}

/* ─── Footer ──────────────────────────────────────────────────────────────────── */
.form-footer {
  background: var(--mfa-shell-bg);
  color: rgba(255, 255, 255, 0.65);
  padding: var(--space-6) 0;
  margin-top: var(--space-16);
}

.form-footer__inner {
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-footer__copy {
  margin: 0;
  font-size: var(--text-sm);
}

/* ─── Form Page Container ────────────────────────────────────────────────────── */
.form-page {
  max-width: var(--container-form);
  margin: var(--space-10) auto;
  padding: 0 var(--space-4);
}

.form-page__header {
  text-align: center;
  margin-bottom: var(--space-10);
}

.form-page__title {
  font-size: var(--text-3xl);
  font-weight: var(--font-black);
  background: var(--gradient-brand-smooth);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  display: inline-block;
  margin-bottom: var(--space-3);
  line-height: var(--leading-tight);
}

.form-page__subtitle {
  font-size: var(--text-base);
  color: var(--color-gray-600);
  max-width: 600px;
  margin: 0 auto;
  line-height: var(--leading-relaxed);
}

/* ─── Form Section Card ──────────────────────────────────────────────────────── */
.form-section {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  padding: var(--space-8);
  margin-bottom: var(--space-6);
  border: 1px solid var(--color-gray-200);
  transition: box-shadow var(--transition-base);
  scroll-margin-top: 120px;
}

.form-section:hover {
  box-shadow: var(--shadow-md);
}

.form-section__header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: calc(var(--space-8) * -1) calc(var(--space-8) * -1) var(--space-6) calc(var(--space-8) * -1);
  padding: var(--space-4) var(--space-8);
  background: var(--mfa-teal);
  border-radius: calc(var(--radius-xl) - 1px) calc(var(--radius-xl) - 1px) 0 0;
  border-bottom: none;
}

/* Rotate section header colors across numbered sections */
.form-section:nth-of-type(4n+1) .form-section__header {
  background: var(--mfa-teal);
}

.form-section:nth-of-type(4n+2) .form-section__header {
  background: var(--mfa-rose);
}

.form-section:nth-of-type(4n+3) .form-section__header {
  background: var(--mfa-orange);
}

.form-section:nth-of-type(4n+4) .form-section__header {
  background: var(--mfa-green);
}

/* RTL inherits the same solid section colors — no gradient to flip */

.form-section__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--color-white);
  color: var(--mfa-teal);
  font-size: var(--text-md);
  font-weight: var(--font-black);
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Match number pill color to its section header background */
.form-section:nth-of-type(4n+1) .form-section__number {
  color: var(--mfa-teal);
}

.form-section:nth-of-type(4n+2) .form-section__number {
  color: var(--mfa-rose);
}

.form-section:nth-of-type(4n+3) .form-section__number {
  color: var(--mfa-orange);
}

.form-section:nth-of-type(4n+4) .form-section__number {
  color: var(--mfa-green);
}

.form-section__title {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--color-white);
  margin: 0;
  letter-spacing: var(--tracking-tight);
}

/* ─── Form Fields ────────────────────────────────────────────────────────────── */
.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
  color: var(--mfa-heading-text);
  margin-bottom: var(--space-2);
}

.form-label .required-mark,
.form-check-label .required-mark {
  color: var(--color-danger);
  margin-inline-start: 2px;
}

.hint-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0 2px;
  margin-inline-start: 4px;
  color: var(--color-gray-400);
  font-size: 14px;
  cursor: pointer;
  vertical-align: middle;
  transition: color 0.15s;
}

.hint-toggle:hover,
.hint-toggle:focus {
  color: var(--mfa-heading-text);
  outline: none;
}

.form-help-text {
  font-size: var(--text-xs);
  color: var(--color-gray-500);
  margin-top: var(--space-1);
}

.form-hint-info {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-primary, #124e6c);
  background: var(--color-primary-subtle, rgba(18, 78, 108, 0.06));
  border: 1px solid rgba(18, 78, 108, 0.15);
  border-radius: var(--radius-md, 6px);
  animation: fadeIn 200ms ease both;
}

.form-control,
.form-select {
  display: block;
  width: 100%;
  height: var(--input-height);
  padding: var(--input-padding-y) var(--input-padding-x);
  font-size: var(--text-base);
  font-family: inherit;
  color: var(--color-gray-800);
  background-color: var(--input-bg);
  border: var(--input-border);
  border-radius: var(--input-radius);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  appearance: none;
}

.form-control:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: var(--input-shadow-focus);
}

.form-control.is-invalid,
.form-select.is-invalid {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.12);
}

textarea.form-control {
  height: auto;
  min-height: 120px;
  resize: vertical;
}

.field-validation-valid {
  display: none;
}

.field-validation-error {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-danger);
  margin-top: var(--space-1);
}

/* ─── Phone Field Group ──────────────────────────────────────────────────────── */
.phone-group {
  display: grid;
  grid-template-columns: 100px 80px 1fr;
  gap: var(--space-2);
  align-items: start;
}

@media (max-width: 480px) {
  .phone-group {
    grid-template-columns: 1fr 1fr;
  }

  .phone-group .phone-number-col {
    grid-column: 1 / -1;
  }
}

/* ─── Radio & Checkbox Groups ────────────────────────────────────────────────── */
.radio-group,
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.radio-group--inline,
.checkbox-group--inline {
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.form-check {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4) !important;
  /* Force override Bootstrap default paddings */
  margin: 0 !important;
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  cursor: pointer;
}

.form-check:hover {
  border-color: var(--color-primary-light);
  background: var(--color-primary-subtle);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.form-check:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(18, 78, 108, 0.15);
}

.form-check:has(.form-check-input:checked) {
  border-color: var(--color-primary);
  background: rgba(18, 78, 108, 0.03);
}

.form-check-input {
  float: none !important;
  /* Override Bootstrap negative margins and floats */
  margin: 2px 0 0 0 !important;
  /* Clear Bootstrap completely */
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.form-check-label {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-gray-800);
  cursor: pointer;
  line-height: 1.5;
  margin: 0;
  width: 100%;
}

/* Pill-style radio buttons for Area Type */
.radio-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.radio-pill {
  position: relative;
}

.radio-pill input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.radio-pill label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-gray-300);
  background: var(--color-white);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-gray-600);
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.radio-pill input[type="radio"]:checked+label {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: var(--color-white);
}

.radio-pill label:hover {
  border-color: var(--color-primary-light);
  background: var(--color-primary-subtle);
  color: var(--color-primary);
}

.radio-pill input[type="radio"]:checked+label:hover {
  background: var(--color-primary-dark);
  color: var(--color-white);
}

/* ─── Scale (1–5 rating buttons) ────────────────────────────────────────────── */
.scale-group {
  display: inline-flex;
  flex-direction: column;
  gap: var(--space-3);
  width: max-content;
  max-width: 100%;
}

.scale-buttons {
  display: flex;
  gap: var(--space-2);
  flex-wrap: nowrap;
  background: var(--color-white);
  padding: var(--space-2);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-gray-200);
  box-shadow: var(--shadow-xs);
  overflow-x: auto;
}

.scale-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  color: var(--color-gray-500);
  cursor: pointer;
  transition: all var(--transition-spring);
  font-family: inherit;
}

.scale-btn:hover {
  color: var(--color-primary);
  background: var(--color-primary-subtle);
  transform: translateY(-2px);
}

.scale-btn.active,
.scale-btn[aria-pressed="true"] {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: var(--color-white);
  box-shadow: 0 4px 10px rgba(18, 78, 108, 0.25);
  transform: translateY(-4px) scale(1.05);
}

.scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-gray-500);
  margin-top: var(--space-1);
  padding: 0 var(--space-2);
}

/* RTL: flexbox naturally reverses row direction, so labels follow the same
   order as the scale buttons — low value on the right (start). */

/* ─── Star Rating ──────────────────────────────────────────────────────────── */
.star-rating {
  display: flex;
  flex-direction: row-reverse;
  gap: var(--space-2);
  width: fit-content;
  background: var(--color-white);
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
}

.star-rating__input {
  display: none;
}

.star-rating__label {
  font-size: 2.5rem;
  color: var(--color-gray-200);
  cursor: pointer;
  transition: all var(--transition-fast);
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.star-rating__label:hover {
  transform: scale(1.15);
}

.star-rating__label:active {
  transform: scale(0.9);
}

/* Reverse-order hover: all stars before hovered one fill */
.star-rating__label:hover,
.star-rating__label:hover~.star-rating__label {
  color: var(--color-secondary-light);
}

/* Checked state color */
.star-rating__input:checked~.star-rating__label {
  color: var(--color-secondary);
  text-shadow: 0 2px 4px rgba(245, 152, 35, 0.4);
}

/* Override hover when container is hovered to show fresh preview */
.star-rating:hover .star-rating__label {
  color: var(--color-gray-200);
}

.star-rating:hover .star-rating__label:hover,
.star-rating:hover .star-rating__label:hover~.star-rating__label {
  color: var(--color-secondary-light);
}

/* Maintain checked style if container is NOT hovered */
.star-rating:not(:hover) .star-rating__input:checked~.star-rating__label {
  color: var(--color-secondary);
  text-shadow: 0 2px 4px rgba(245, 152, 35, 0.4);
}

/* ─── Conditional hidden fields ────────────────────────────────────────────── */
.conditional-field {
  display: none;
  animation: fadeIn 200ms ease both;
}

.conditional-field.is-visible {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── Container Info Card (shown after MFA Code selection) ───────────────────── */
.container-info-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-primary-subtle, rgba(18, 78, 108, 0.06));
  border: 1px solid var(--color-primary-light, rgba(18, 78, 108, 0.2));
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  color: var(--color-gray-700);
  animation: fadeIn 200ms ease both;
}

.container-info-card i {
  color: var(--color-primary);
  font-size: var(--text-base);
  flex-shrink: 0;
}

/* ─── Select2 customisation (global — applies to all pages) ──────────────────── */

/* Container: match form-control height, border and radius */
.select2-container--bootstrap-5 .select2-selection,
.select2-container .select2-selection--single {
  min-height: var(--input-height, 44px);
  border: var(--input-border, 1px solid #d1d5db);
  border-radius: var(--input-radius, 0.5rem);
  padding: var(--input-padding-y, 0.5rem) var(--input-padding-x, 0.75rem);
  font-family: inherit;
  font-size: var(--text-base, 1rem);
  background-color: var(--input-bg, #fff);
  transition: border-color var(--transition-fast, 0.15s), box-shadow var(--transition-fast, 0.15s);
}

/* Rendered text inside the control */
.select2-container .select2-selection--single .select2-selection__rendered {
  line-height: 1.5;
  padding: 0;
  color: var(--color-gray-800, #1f2937);
}

/* Arrow (chevron) positioning */
.select2-container .select2-selection--single .select2-selection__arrow {
  height: 100%;
  top: 0;
  right: 0.75rem;
  width: 1.5rem;
}

/* Focus state */
.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection,
.select2-container.select2-container--open .select2-selection--single {
  border-color: var(--color-primary, #124e6c);
  box-shadow: var(--input-shadow-focus, 0 0 0 3px rgba(18, 78, 108, 0.15));
  outline: none;
}

/* Dropdown panel */
.select2-container .select2-dropdown {
  border: 1px solid var(--color-gray-300, #d1d5db);
  border-radius: var(--radius-lg, 0.5rem);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

/* Search input inside the dropdown */
.select2-container .select2-search--dropdown .select2-search__field {
  border: 1px solid var(--color-gray-300, #d1d5db);
  border-radius: var(--radius-md, 0.375rem);
  padding: var(--space-2, 0.5rem) var(--space-3, 0.75rem);
  font-family: inherit;
  font-size: var(--text-sm, 0.875rem);
}

.select2-container .select2-search--dropdown .select2-search__field:focus {
  border-color: var(--color-primary, #124e6c);
  box-shadow: var(--input-shadow-focus, 0 0 0 3px rgba(18, 78, 108, 0.15));
  outline: none;
}

/* Option items */
.select2-container .select2-results__option {
  padding: var(--space-2, 0.5rem) var(--space-3, 0.75rem);
  font-size: var(--text-sm, 0.875rem);
  transition: background-color 0.1s;
}

/* Highlighted (hovered / keyboard-focused) option */
.select2-container .select2-results__option--highlighted[aria-selected] {
  background-color: var(--color-primary, #124e6c);
  color: var(--color-white, #fff);
}

/* Selected option */
.select2-container .select2-results__option[aria-selected="true"] {
  background-color: var(--color-primary-subtle, rgba(18, 78, 108, 0.06));
  color: var(--color-primary, #124e6c);
  font-weight: var(--font-medium, 500);
}

/* Placeholder text */
.select2-container .select2-selection__placeholder {
  color: var(--color-gray-400, #9ca3af);
}

/* "Searching..." and "No results" messages */
.select2-container .select2-results__message {
  color: var(--color-gray-500, #6b7280);
  font-size: var(--text-sm, 0.875rem);
  padding: var(--space-3, 0.75rem);
}

/* ─── FilePond customisation ─────────────────────────────────────────────────── */
.filepond--root {
  font-family: inherit;
  font-size: var(--text-sm);
}

.filepond--panel-root {
  border-radius: var(--radius-lg);
  background-color: var(--color-gray-50);
  border: 2px dashed var(--color-gray-300);
}

.filepond--drop-label {
  color: var(--color-gray-500);
  font-weight: var(--font-medium);
}

/* Hide the "Powered by PQINA" credit badge (FilePond is MIT-licensed) */
.filepond--credits {
  display: none !important;
}

/* ── FilePond grid layout ────────────────────────────────────────────────────
   FilePond v4 positions items with JavaScript (position:absolute + transform).
   We override that here so items render in a CSS Grid instead of a stacked list.
   All rules use !important to beat FilePond's runtime inline styles.

   Internal structure we are overriding:
     .filepond--root
       .filepond--list-scroller  ← JS manages height via inline style
         .filepond--list         ← position:relative, height managed
           .filepond--item       ← position:absolute, top + transform set by JS
   ────────────────────────────────────────────────────────────────────────── */

/* Outer wrapper — caps height so many files scroll instead of pushing content down */
.filepond-wrapper {
  min-height: 300px;
  max-height: 460px;
  border-radius: var(--radius-lg);
  border: 2px dashed var(--color-gray-300);
  background-color: var(--color-gray-50);
  padding: var(--space-2);
  margin-bottom: var(--space-3);
}

/* When wrapper is scrollable, add a subtle inner shadow for affordance */
.filepond-wrapper::-webkit-scrollbar {
  width: 6px;
}

.filepond-wrapper::-webkit-scrollbar-thumb {
  background: var(--color-gray-300);
  border-radius: 3px;
}

/* Remove panel border since the wrapper now provides it */
.filepond-wrapper .filepond--panel-root {
  border: none !important;
  background: transparent !important;
}

/* Allow root to grow with the grid */
.filepond--root {
  overflow-y: auto;
  overflow-x: hidden;
  height: auto !important;
  min-height: 280px;
  position: relative !important;
}

/* Make the scroller grow naturally */
.filepond--list-scroller {
  height: auto !important;
  transform: none !important;
  overflow: visible !important;
  position: relative !important;
  margin-top: var(--space-3);
}

/* Switch the item list from JS-absolute layout to CSS Grid */
.filepond--list {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-3);
  position: relative !important;
  height: auto !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  right: 0;
  left: 0;
  list-style: none !important;
}

/* Neutralize JS-injected absolute positioning on each item */
.filepond--item {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
  width: 100% !important;
  margin: 0 !important;
}

/* Tablet: tighten column min-width slightly */
@media (max-width: 768px) {
  .filepond--list {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--space-2);
  }

  .filepond-wrapper {
    max-height: 380px;
  }
}

/* Mobile: allow down to 2 columns or 1 on very small screens */
@media (max-width: 480px) {
  .filepond--list {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: var(--space-2);
  }

  .filepond-wrapper {
    max-height: 300px;
  }
}

.filepond-error-highlight .filepond--panel-root {
  border-color: var(--color-danger);
  animation: pulse-error 0.4s ease;
}

@keyframes pulse-error {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.01);
    border-color: var(--color-danger);
  }

  100% {
    transform: scale(1);
  }
}

/* ─── Form Actions ───────────────────────────────────────────────────────────── */
.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  padding: var(--space-6) var(--space-8);
  background: var(--color-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-gray-200);
  margin-top: var(--space-6);
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-8);
  background: linear-gradient(135deg, var(--mfa-green), #3ba34d);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius-lg);
  font-size: var(--text-base);
  font-weight: var(--font-semi);
  letter-spacing: var(--tracking-wide);
  cursor: pointer;
  transition: all var(--transition-base);
  text-transform: uppercase;
  font-family: inherit;
}

.btn-submit:hover {
  background: linear-gradient(135deg, #329144, var(--mfa-green));
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.btn-submit--outline {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-8);
  background: var(--color-white);
  color: var(--mfa-teal);
  border: 2px solid var(--mfa-teal);
  border-radius: var(--radius-lg);
  font-size: var(--text-base);
  font-weight: var(--font-semi);
  letter-spacing: var(--tracking-wide);
  cursor: pointer;
  transition: all var(--transition-base);
  text-transform: uppercase;
  font-family: inherit;
}

.btn-submit--outline:hover {
  background: rgba(18, 78, 108, 0.06);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* ── RTL: flip icon to visual trailing edge of the submit button ─────────────
   DOM order: <span>text</span> <icon>
   LTR flex-direction:row  → text … icon  (icon on right  ✓)
   RTL flex-direction:row  → text … icon  but content flows right-to-left,
                              so icon appears BEFORE text visually         ✗
   RTL flex-direction:row-reverse → icon … text in DOM = text then icon visually ✓
   The [dir="rtl"] selector is set by the language switcher on <html>.
────────────────────────────────────────────────────────────────────────────── */
/* -- RTL: button icon placement --
   Both buttons are inline-flex with flex-direction:row.
   In dir="rtl", row places DOM-first=visual-RIGHT, DOM-last=visual-LEFT.

   Submit DOM: [text][icon]
     RTL row: text=visual-RIGHT (reading-start), icon=visual-LEFT. Correct, no override needed.

   Clear DOM: [icon][text]
     RTL row: icon=visual-RIGHT (reading-start) WRONG, text=visual-LEFT WRONG.
     Fix: row-reverse makes text=visual-RIGHT, icon=visual-LEFT (trailing). Correct.
*/
[dir="rtl"] #btn-clear {
  flex-direction: row-reverse;
}

/* Mirror the paper-plane icon so it points LEFT in RTL (toward the reading-end direction) */
[dir="rtl"] #btn-review .fa-paper-plane {
  transform: scaleX(-1);
}

.btn-clear {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-6);
  background: transparent;
  color: var(--color-gray-500);
  border: 1px solid var(--color-gray-300);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
}

.btn-clear:hover {
  border-color: var(--color-danger);
  color: var(--color-danger);
  background: var(--color-danger-light);
}

/* ─── Progress Bar ───────────────────────────────────────────────────────────── */
.form-progress {
  position: sticky;
  top: 76px;
  z-index: var(--z-raised);
  background: var(--color-white);
  border-bottom: 1px solid var(--color-gray-100);
  padding: var(--space-2) 0;
}

.form-progress__bar {
  height: 4px;
  background: var(--color-gray-100);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.form-progress__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary-subtle), var(--color-primary-light), var(--mfa-heading-text));
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
}

.form-progress__steps {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-2);
  padding: 0 var(--space-2);
}

.form-progress__step {
  font-size: var(--text-xs);
  color: var(--color-gray-400);
  font-weight: var(--font-medium);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s;
}

.form-progress__step:hover {
  color: var(--color-primary-light);
}

.form-progress__step.is-active {
  color: var(--color-primary);
  font-weight: var(--font-semi);
}

/* Section fully scrolled past — show green completion tick */
.form-progress__step.is-done {
  color: var(--color-success, #16a34a);
}

.form-progress__step.is-done::after {
  content: ' ✓';
  font-weight: 700;
}

/* ─── Pre-Submit Review Modal ────────────────────────────────────────────────── */
/* Replaces all style.cssText assignments in the Form/Index.cshtml review modal JS. */

/* Full-viewport backdrop */
.review-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  overflow-y: auto;
  padding: 24px 16px;
  box-sizing: border-box;
}

/* Centered dialog panel */
.review-modal-panel {
  max-width: 640px;
  margin: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

/* Header bar with brand gradient */
.review-modal-header {
  background: linear-gradient(270deg, var(--mfa-heading-text), var(--mfa-teal));
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Icon inside header */
.review-modal-header-icon {
  color: #fff;
  font-size: 1.4rem;
}

/* Title inside header */
.review-modal-title {
  color: #fff;
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

/* Scrollable body */
.review-modal-body {
  padding: 24px;
  max-height: 60vh;
  overflow-y: auto;
}

/* Footer with action buttons */
.review-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Confirm button inline-flex centering — replaces confirmBtn.style.cssText */
.review-modal-confirm {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* Section divider row inside modal body */
.review-section-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--mfa-orange);
  margin: 14px 0 4px;
}

/* Data row inside modal body */
.review-row {
  display: flex;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 13px;
}

/* Label column */
.review-row-label {
  min-width: 170px;
  font-weight: 600;
  color: #374151;
  flex-shrink: 0;
}

/* Value column */
.review-row-value {
  color: #1f2937;
  word-break: break-word;
}

/* Muted placeholder — empty or unselected value */
.review-empty {
  color: #9ca3af;
  font-style: italic;
}

/* Error highlight — validation failure state in review (e.g. no files) */
.review-error {
  color: #ef4444;
  font-style: italic;
}

/* RTL: mirror footer button order so primary action remains at reading-end */
[dir="rtl"] .review-modal-footer {
  justify-content: flex-start;
}

/* RTL: flip confirm button icon direction */
[dir="rtl"] .review-modal-confirm .fa-paper-plane {
  transform: scaleX(-1);
}

/* ─── Submission Loading / In-Progress Overlay ───────────────────────────────── */
/* Shown immediately when the user clicks Confirm & Submit inside the review modal.
   Blocks all interaction until the POST completes or fails. */

/* Full-viewport blocking overlay — sits above the review modal (z: 10000) */
.submit-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: var(--space-4, 16px);
  padding: 24px;
}

/* Shown state — toggled by JS */
.submit-overlay.is-visible {
  display: flex;
}

/* Centered dialog card */
.submit-overlay-card {
  background: #fff;
  border-radius: var(--radius-xl, 16px);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
  padding: 40px 36px;
  max-width: 460px;
  width: 100%;
  text-align: center;
}

/* Spinning ring icon — pure CSS, no images */
.submit-spinner {
  display: block;
  width: 52px;
  height: 52px;
  border: 4px solid rgba(26, 86, 219, 0.18);
  border-top-color: #1a56db;
  border-radius: 50%;
  animation: submit-spin 0.75s linear infinite;
  margin: 0 auto var(--space-4, 16px);
}

@keyframes submit-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Primary message — "Submitting…" */
.submit-overlay-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 var(--space-2, 8px);
}

/* Secondary message — "Do not close…" */
.submit-overlay-hint {
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.55;
  margin: 0;
}

/* Body while submitting — prevent scrolling and interactions */
body.is-submitting {
  overflow: hidden;
  pointer-events: none;
}

/* The overlay itself must still receive pointer events while active */
body.is-submitting .submit-overlay {
  pointer-events: auto;
}

/* ─── Agreement Checkbox Error Highlight ─────────────────────────────────────── */
/* Applied when user tries to open review modal without accepting the agreement */
.agreement-error-highlight {
  outline: 2px solid #ef4444;
  outline-offset: 4px;
  border-radius: var(--radius-sm, 4px);
  animation: agreement-shake 0.35s ease;
}

@keyframes agreement-shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-4px);
  }

  75% {
    transform: translateX(4px);
  }
}

/* ─── Thank You Page ─────────────────────────────────────────────────────────── */

/* Outer page wrapper — same max-width as the form */
.thankyou-page {
  max-width: 640px;
  margin: var(--space-16) auto;
  padding: 0 var(--space-4);
  text-align: center;
}

/* Main confirmation card — matches form-section visual language */
.thankyou-card {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-gray-200);
  overflow: hidden;
  margin-bottom: var(--space-6);
}

/* Branded header strip at the top of the card */
.thankyou-card__header {
  background: linear-gradient(90deg, var(--mfa-heading-text), var(--mfa-teal));
  border-bottom: 2px solid var(--mfa-orange);
  padding: var(--space-6) var(--space-8);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

[dir="rtl"] .thankyou-card__header {
  background: linear-gradient(270deg, var(--mfa-heading-text), var(--mfa-teal));
}

/* Success icon with a soft glow ring */
.thankyou-icon {
  font-size: 3.5rem;
  color: var(--color-success, #22c55e);
  margin-bottom: var(--space-3);
  display: block;
  filter: drop-shadow(0 0 12px var(--color-info-light));
}

/* Heading — gradient text same as form-page__title */
.thankyou-title {
  font-size: var(--text-2xl);
  font-weight: var(--font-black);
  background: var(--gradient-brand-smooth);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  display: inline-block;
  margin: 0;
  line-height: var(--leading-tight);
}

/* Card body: padded content area */
.thankyou-card__body {
  padding: var(--space-8);
}

/* Confirmation message text */
.thankyou-body {
  font-size: var(--text-base);
  color: var(--color-gray-600);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-5);
}

.thankyou-body:last-child {
  margin-bottom: 0;
}

/* ── Reference Number Display ─────────────────────────────────────────────────
   Highly visible chip with copy affordance.
   Rendered as a flex row: [label] [code] [copy-btn]
────────────────────────────────────────────────────────────────────────────── */
.thankyou-ref-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin: var(--space-5) 0;
  flex-wrap: wrap;
}

.thankyou-ref-label {
  font-size: var(--text-sm);
  font-weight: var(--font-semi);
  color: var(--color-gray-500);
  white-space: nowrap;
}

/* The reference code chip itself */
.thankyou-ref {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--color-primary);
  background: var(--color-primary-subtle);
  border: 1.5px solid var(--color-primary-light, rgba(18, 78, 108, 0.25));
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-md);
  letter-spacing: var(--tracking-wider);
  user-select: all;
  /* lets users triple-click to select just the code */
}

/* Copy-to-clipboard button — appears next to the ref chip */
.thankyou-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
  background: transparent;
  border: 1px solid var(--color-gray-300);
  border-radius: var(--radius-md);
  color: var(--color-gray-500);
  font-size: var(--text-sm);
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.thankyou-copy-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-subtle);
}

.thankyou-copy-btn.is-copied {
  border-color: var(--color-success, #22c55e);
  color: var(--color-success, #22c55e);
  background: rgba(34, 197, 94, 0.06);
}

/* ── Next Steps summary — three calm hints below the ref number ─────────────── */
.thankyou-steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-6);
  text-align: start;
}

.thankyou-step {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-gray-600);
  line-height: var(--leading-relaxed);
}

.thankyou-step__icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--color-primary-subtle);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  margin-top: 1px;
}

/* ── Action area — stacked CTA + link ──────────────────────────────────────── */
.thankyou-actions {
  margin-top: var(--space-8);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

/* ── Primary CTA — gradient button with shimmer ─────────────────────────────── */
.thankyou-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  width: 100%;
  max-width: 380px;
  padding: var(--space-4) var(--space-6);
  font-size: var(--text-base);
  font-weight: var(--font-bold);
  font-family: inherit;
  color: var(--color-white);
  background: linear-gradient(135deg, var(--mfa-teal), #0a5c7a, var(--mfa-heading-text));
  background-size: 200% 200%;
  border: none;
  border-radius: var(--radius-lg);
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(18, 78, 108, 0.35);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.3px;
}

.thankyou-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transition: left 0.6s ease;
}

.thankyou-cta:hover {
  background-position: 100% 0;
  box-shadow: 0 6px 20px rgba(18, 78, 108, 0.45);
  transform: translateY(-1px);
  color: var(--color-white);
  text-decoration: none;
}

.thankyou-cta:hover::before {
  left: 100%;
}

.thankyou-cta__arrow {
  font-size: 0.85em;
  transition: transform 0.3s ease;
}

.thankyou-cta:hover .thankyou-cta__arrow {
  transform: translateX(4px);
}

/* ── Secondary link — subtle text style ─────────────────────────────────────── */
.thankyou-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-gray-500);
  text-decoration: none;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.thankyou-link:hover {
  color: var(--mfa-teal);
  background: var(--color-primary-subtle);
  text-decoration: none;
}

.thankyou-link i {
  font-size: 0.75em;
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .thankyou-card__body {
    padding: var(--space-6) var(--space-5);
  }

  .thankyou-ref {
    font-size: var(--text-lg);
  }

  .thankyou-title {
    font-size: var(--text-xl);
  }

  .thankyou-cta {
    max-width: 100%;
    font-size: var(--text-sm);
    padding: var(--space-3) var(--space-4);
  }
}

/* ─── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .form-section {
    padding: var(--space-5);
  }

  .form-section__header {
    margin: calc(var(--space-5) * -1) calc(var(--space-5) * -1) var(--space-5) calc(var(--space-5) * -1);
    padding: var(--space-4) var(--space-5);
  }

  .form-page__title {
    font-size: var(--text-2xl);
  }

  .form-actions {
    flex-direction: column;
    padding: var(--space-4);
  }

  .btn-submit {
    width: 100%;
    justify-content: center;
  }

  .btn-clear {
    width: 100%;
    justify-content: center;
  }

  .radio-pills {
    gap: var(--space-2);
  }

  .form-progress__steps {
    display: none;
  }
}

@media (max-width: 480px) {
  .form-header__lang {
    gap: var(--space-1);
  }

  .lang-btn__label {
    display: none;
  }

  .scale-btn {
    width: 44px;
    height: 44px;
    font-size: var(--text-sm);
  }

  .star-rating__label {
    font-size: 1.7rem;
  }
}

/* ─── Extra-small: ≤375px (iPhone SE / Android entry) ───────────────────────── */
@media (max-width: 375px) {
  .form-section {
    padding: var(--space-4);
    border-radius: var(--radius-lg);
  }

  .form-page {
    padding: 0 var(--space-2);
  }

  .form-progress__steps {
    flex-wrap: wrap;
    gap: var(--space-1);
    justify-content: center;
  }

  .form-progress__step {
    font-size: 0.65rem;
  }

  .form-actions {
    padding: var(--space-3);
  }

  .phone-group {
    grid-template-columns: 1fr 1fr;
  }

  .form-page__title {
    font-size: var(--text-2xl);
  }
}

/* ─── Tiny: ≤320px (older Android / accessibility zoom) ─────────────────────── */
@media (max-width: 320px) {
  .lang-btn__label {
    display: none;
  }

  .lang-btn__flag {
    font-size: 1.2rem;
  }

  .form-page__title {
    font-size: var(--text-xl);
  }

  .form-section__title {
    font-size: var(--text-base);
  }
}

/* ─── Touch targets: WCAG 2.5.5 minimum 44×44px ─────────────────────────────── */
.lang-btn {
  min-height: 44px;
}

.scale-btn {
  touch-action: manipulation;
}

.star-rating__label {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  touch-action: manipulation;
}

.form-check-input {
  touch-action: manipulation;
}

/* ── Form section intro text ──────────────────────────────────────────── */
.form-section__intro {
  font-size: var(--text-sm);
  color: var(--color-gray-600);
  margin: calc(var(--space-2) * -1) 0 var(--space-5);
  line-height: var(--leading-relaxed);
}

/* ── Agreement checkbox — distinct consent styling ─────────────────────── */
.form-check--agreement {
  border-color: var(--color-primary);
  border-width: 2px;
  /* Logical property: left border in LTR, right border in RTL */
  border-inline-start-width: 4px;
  background: rgba(18, 78, 108, 0.04);
}

.form-check--agreement:hover {
  border-color: var(--color-primary-dark, #0c3785);
}

/* ── External link collapsible disclosure (<details>) ────────────────── */
.external-link-disclosure {
  margin-bottom: var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid #fcd34d;
  background: #fffbeb;
  overflow: hidden;
}

.external-link-summary {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: #92400e;
  cursor: pointer;
  list-style: none;
  user-select: none;
  font-weight: var(--font-medium);
}

/* Remove default browser disclosure arrow */
.external-link-summary::-webkit-details-marker {
  display: none;
}

.external-link-summary::marker {
  content: '';
}

/* Custom expand/collapse arrow — shown at end of summary text */
.external-link-summary::after {
  content: '\f078';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 12px;
  margin-left: auto;
  flex-shrink: 0;
  transition: transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(146, 64, 14, 0.1);
  color: #92400e;
}

.external-link-disclosure[open] .external-link-summary::after {
  transform: rotate(180deg);
}

/* RTL: auto-margin flips naturally with flex, just mirror margin */
[dir="rtl"] .external-link-summary::after {
  margin-left: 0;
  margin-right: auto;
}

.external-link-body {
  padding: 0 14px 14px;
}

.external-link-body .form-help-text {
  margin-top: var(--space-2);
}

/* ─── Error Page ──────────────────────────────────────────────────────────────── */

/* Outer wrapper — same layout rhythm as .thankyou-page */
.error-page {
  max-width: 600px;
  margin: var(--space-16) auto;
  padding: 0 var(--space-4);
  text-align: center;
}

/* White card — mirrors .thankyou-card visual language */
.error-card {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-gray-200);
  overflow: hidden;
  margin-bottom: var(--space-6);
}

/* Branded header strip — same gradient + orange border as form-section__header */
.error-card__header {
  background: linear-gradient(90deg, var(--mfa-heading-text), var(--mfa-teal));
  border-bottom: 2px solid var(--mfa-orange);
  padding: var(--space-8) var(--space-8) var(--space-6);
}

[dir="rtl"] .error-card__header {
  background: linear-gradient(270deg, var(--mfa-heading-text), var(--mfa-teal));
}

/* Large illustrative icon in the card header */
.error-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: var(--space-4);
  /* Default: brand primary blue */
  color: var(--color-white);
  opacity: 0.85;
}

/* 5xx errors get an amber/warning tone */
.error-icon--server {
  color: #fcd34d;
  opacity: 1;
}

/* ── Status-code badge — replaces the 7-line inline style block ── */
.error-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-full);
  letter-spacing: var(--tracking-wide);
  margin-bottom: var(--space-2);
}

/* Card body: padded content */
.error-card__body {
  padding: var(--space-8);
}

/* ── Error title — gradient text same as form-page__title / thankyou-title ── */
.error-title {
  font-size: var(--text-2xl);
  font-weight: var(--font-black);
  background: var(--gradient-brand-smooth);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  display: inline-block;
  margin: 0 0 var(--space-4);
  line-height: var(--leading-tight);
}

/* ── Supporting message — matches thankyou-body ── */
.error-body {
  font-size: var(--text-base);
  color: var(--color-gray-600);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-6);
}

/* ── Action buttons row ── */
.error-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

/* The primary "Go to Form" link reuses btn-submit */
.error-actions .btn-submit {
  text-decoration: none;
}

/* "Go Back" secondary action reuses btn-clear */
.error-actions .btn-clear {
  text-decoration: none;
}

/* ── Mobile: stack actions and tighten card body ── */
@media (max-width: 480px) {
  .error-card__body {
    padding: var(--space-6) var(--space-5);
  }

  .error-title {
    font-size: var(--text-xl);
  }

  .error-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .error-actions .btn-submit,
  .error-actions .btn-clear {
    justify-content: center;
    width: 100%;
  }
}

/* ── Language switcher dropdown ──────────────────────────────────────────────── */
/* Replaces style="min-width: 140px" on the Bootstrap dropdown <ul> in _Layout */
.lang-dropdown-menu {
  min-width: 140px;
}