/* ═══════════════════════════════════════════
   Jam3ah – Design System
   Brand Booklet: Navy #2E3192 + Red #EF4136
   Clean white/light background — professional
   ═══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=DM+Sans:wght@400;500;600&family=Noto+Kufi+Arabic:wght@300;400;500;600;700&display=swap');

:root {
  /* Brand Colors – directly from booklet */
  --navy: #2E3192;
  --navy-light: #4A4DC8;
  --navy-dark: #1F2270;
  --red: #EF4136;
  --red-light: #F4645B;
  --red-dark: #C92E24;

  /* Surface Colors */
  --bg-page: #F5F6FA;
  --bg-card: #FFFFFF;
  --bg-card-hover: #FAFBFF;
  --bg-input: #FFFFFF;
  --bg-input-focus: #FAFAFF;

  /* Text Colors */
  --text-primary: #1A1D3B;
  --text-secondary: #4A4E6A;
  --text-muted: #8B90A8;
  --text-on-navy: #FFFFFF;
  --text-accent: #2E3192;

  /* Borders */
  --border-default: #DFE1EC;
  --border-hover: #C5C8DA;
  --border-focus: #2E3192;
  --border-error: #EF4136;

  /* Functional */
  --error-color: #EF4136;
  --error-bg: #FFF0EF;
  --success-color: #22C55E;
  --success-bg: #EDFCF2;

  /* Typography */
  --font-display: 'Outfit', 'Noto Kufi Arabic', sans-serif;
  --font-body: 'DM Sans', 'Noto Kufi Arabic', sans-serif;
  --font-arabic: 'Noto Kufi Arabic', sans-serif;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(46, 49, 146, 0.06);
  --shadow-md: 0 4px 12px rgba(46, 49, 146, 0.08);
  --shadow-lg: 0 8px 30px rgba(46, 49, 146, 0.1);
  --shadow-focus: 0 0 0 3px rgba(46, 49, 146, 0.12);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;
}

/* ── Reset & Base ── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-page);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ── Background Decoration ── */
.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse at top left, rgba(46, 49, 146, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse at bottom right, rgba(239, 65, 54, 0.03) 0%, transparent 60%);
}

.bg-glow {
  display: none;
}

/* ── Container ── */
.container {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-md) var(--space-3xl);
}

/* ── Header ── */
.form-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
  animation: fadeInDown 0.6s var(--ease-out);
}

.logo-mark {
  display: inline-flex;
  margin-bottom: var(--space-sm);
}

.logo-mark img {
  width: 160px;
  height: auto;
  object-fit: contain;
}

.form-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
  line-height: 1.3;
}

.form-subtitle {
  display: none;
}

.form-description {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: var(--space-sm);
  line-height: 1.6;
}

/* ── Bilingual text (EN + AR shown together) ──
   Short labels sit inline: "Full Name / الاسم الكامل".
   Long sentences stack as two lines via .bi-line spans. */
.bi-line {
  display: block;
}

.bi-line[lang="ar"] {
  direction: rtl;
  font-family: var(--font-arabic);
}

/* ── Progress Bar ── */
.progress-container {
  width: 100%;
  height: 4px;
  background: var(--border-default);
  border-radius: 4px;
  margin-bottom: var(--space-2xl);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--navy), var(--red));
  border-radius: 4px;
  transition: width var(--duration-slow) var(--ease-out);
}

/* ── Form Card ── */
.session-form {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: var(--space-xl) var(--space-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-default);
}

/* ── Form Groups ── */
.form-group {
  margin-bottom: var(--space-lg);
  animation: fadeInUp 0.5s var(--ease-out) both;
}

.form-group[data-field="1"] { animation-delay: 0.03s; }
.form-group[data-field="2"] { animation-delay: 0.06s; }
.form-group[data-field="3"] { animation-delay: 0.09s; }
.form-group[data-field="4"] { animation-delay: 0.12s; }
.form-group[data-field="5"] { animation-delay: 0.15s; }
.form-group[data-field="6"] { animation-delay: 0.18s; }
.form-group[data-field="7"] { animation-delay: 0.21s; }
.form-group[data-field="8"] { animation-delay: 0.24s; }
.form-group[data-field="9"] { animation-delay: 0.27s; }
.form-group[data-field="10"] { animation-delay: 0.30s; }
.form-group[data-field="11"] { animation-delay: 0.33s; }
.form-group[data-field="12"] { animation-delay: 0.36s; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Labels ── */
.form-label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.field-number {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-on-navy);
  background: var(--navy);
  padding: 2px 8px;
  border-radius: 6px;
  letter-spacing: 0.05em;
}

.label-hint {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
}

.field-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

/* ── Inputs ── */
.form-input {
  width: 100%;
  padding: 13px 16px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-md);
  outline: none;
  transition: all var(--duration-normal) var(--ease-out);
  appearance: none;
  -webkit-appearance: none;
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input:hover {
  border-color: var(--border-hover);
}

.form-input:focus {
  border-color: var(--border-focus);
  box-shadow: var(--shadow-focus);
  background: var(--bg-input-focus);
}

.form-input.error {
  border-color: var(--border-error);
  background: var(--error-bg);
}

/* ── Textarea ── */
.form-textarea {
  width: 100%;
  padding: 13px 16px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-md);
  outline: none;
  resize: vertical;
  min-height: 100px;
  max-height: 200px;
  transition: all var(--duration-normal) var(--ease-out);
}

.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-textarea:hover {
  border-color: var(--border-hover);
}

.form-textarea:focus {
  border-color: var(--border-focus);
  box-shadow: var(--shadow-focus);
  background: var(--bg-input-focus);
}

/* ── Select ── */
.select-wrapper {
  position: relative;
}

.select-arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.form-select {
  cursor: pointer;
  padding-right: 44px;
}

.form-select option {
  background: #fff;
  color: var(--text-primary);
}

/* ── Phone Input Group + Country Code Selector ── */
.phone-input-group {
  display: flex;
  gap: 0;
  position: relative;
}

.country-code-selector {
  position: relative;
  flex-shrink: 0;
}

.country-code-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 13px 12px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
  background: rgba(46, 49, 146, 0.06);
  border: 1.5px solid var(--border-default);
  border-right: none;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  user-select: none;
}

.country-code-trigger:hover {
  background: rgba(46, 49, 146, 0.1);
  border-color: var(--border-hover);
}

.country-code-trigger .flag-emoji {
  font-size: 1.15rem;
  line-height: 1;
}

.country-dial-code {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.country-chevron {
  margin-left: 2px;
  opacity: 0.5;
  transition: transform var(--duration-fast) var(--ease-out);
}

.country-code-selector.open .country-chevron {
  transform: rotate(180deg);
}

/* ── Dropdown Panel ── */
.country-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 50;
  min-width: 280px;
  max-height: 320px;
  background: #FFFFFF;
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: dropdownSlide 0.2s var(--ease-out);
}

.country-code-selector.open .country-dropdown {
  display: flex;
}

/* Every .form-group is its own stacking context (the fadeInUp animation uses
   fill-mode: both, so its transform stays applied forever), which traps the
   dropdown's z-index inside its own field. On a single-step form the NEXT field
   therefore paints over the open dropdown — on /hr the CV upload zone hid the
   country list and its invisible full-size file input swallowed every click.
   Lift the whole field above its siblings while the dropdown is open. */
.form-group.dropdown-open {
  position: relative;
  z-index: 60;
}

@keyframes dropdownSlide {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Search Input ── */
.country-search-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-default);
  background: var(--bg-page);
  position: sticky;
  top: 0;
}

.country-search-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}

.country-search {
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-primary);
  width: 100%;
}

.country-search::placeholder {
  color: var(--text-muted);
}

/* ── Country List ── */
.country-list {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  overflow-y: auto;
  max-height: 260px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-default) transparent;
}

.country-list::-webkit-scrollbar {
  width: 6px;
}

.country-list::-webkit-scrollbar-track {
  background: transparent;
}

.country-list::-webkit-scrollbar-thumb {
  background: var(--border-default);
  border-radius: 3px;
}

.country-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  cursor: pointer;
  transition: background var(--duration-fast);
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.country-list-item:hover {
  background: rgba(46, 49, 146, 0.05);
}

.country-list-item.selected {
  background: rgba(46, 49, 146, 0.08);
  color: var(--navy);
  font-weight: 600;
}

.country-list-item .flag-emoji {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.country-list-item .country-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.country-list-item .country-code {
  font-weight: 600;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.country-list-empty {
  padding: 16px 12px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.phone-input-group .form-input {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  flex: 1;
}

/* ── Radio Cards ── */
.radio-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

.radio-group-2 {
  grid-template-columns: 1fr 1fr;
}

.radio-card {
  cursor: pointer;
}

.radio-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.radio-visual {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 13px 16px;
  background: #FFFFFF;
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-md);
  transition: all var(--duration-normal) var(--ease-out);
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.radio-visual svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  opacity: 0.4;
  transition: all var(--duration-normal) var(--ease-out);
}

.radio-card:hover .radio-visual {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.radio-card input:checked+.radio-visual {
  background: rgba(46, 49, 146, 0.05);
  border-color: var(--navy);
  color: var(--navy);
  box-shadow: 0 0 0 1px var(--navy);
}

.radio-card input:checked+.radio-visual svg {
  opacity: 1;
  color: var(--navy);
}

.radio-card input:focus-visible+.radio-visual {
  box-shadow: var(--shadow-focus);
}

/* ── Checkbox Cards (Referral Source) ── */
.checkbox-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

.checkbox-card {
  cursor: pointer;
}

.checkbox-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.checkbox-visual {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 13px 16px;
  background: #FFFFFF;
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-md);
  transition: all var(--duration-normal) var(--ease-out);
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.checkbox-visual svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  opacity: 0.4;
  transition: all var(--duration-normal) var(--ease-out);
}

.checkbox-card:hover .checkbox-visual {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.checkbox-card input:checked+.checkbox-visual {
  background: rgba(46, 49, 146, 0.05);
  border-color: var(--navy);
  color: var(--navy);
  box-shadow: 0 0 0 1px var(--navy);
}

.checkbox-card input:checked+.checkbox-visual svg {
  opacity: 1;
  color: var(--navy);
}

.checkbox-card input:focus-visible+.checkbox-visual {
  box-shadow: var(--shadow-focus);
}

.referral-other-input {
  margin-top: var(--space-sm);
  animation: fadeInUp 0.3s var(--ease-out);
}

/* ── File Upload ── */
.upload-zone {
  position: relative;
  border: 2px dashed var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl) var(--space-lg);
  text-align: center;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  background: #FAFBFF;
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--navy);
  background: rgba(46, 49, 146, 0.03);
}

.upload-zone.drag-over {
  transform: scale(1.01);
  box-shadow: var(--shadow-lg);
}

.file-input-hidden {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-content {
  pointer-events: none;
}

.upload-content svg {
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.upload-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.upload-link {
  color: var(--navy);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.upload-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

/* File list */
.file-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #FAFBFF;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-secondary);
  animation: fadeInUp 0.2s var(--ease-out);
}

.file-item-info {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  overflow: hidden;
}

.file-item-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-item-size {
  color: var(--text-muted);
  font-size: 0.75rem;
  flex-shrink: 0;
}

.file-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color var(--duration-fast);
  flex-shrink: 0;
}

.file-remove:hover {
  color: var(--error-color);
}

/* ── Form Steps (Wizard) ── */
@keyframes fadeInStep {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.form-step {
  display: none;
  opacity: 0;
}

.form-step.active {
  display: block;
  opacity: 1;
  animation: fadeInStep var(--duration-normal) var(--ease-out) forwards;
}

.step-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border-default);
}

.step-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-md);
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-default);
}

.step-actions.split {
  justify-content: space-between;
}

.step-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--navy);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
}

.step-btn:hover {
  background: var(--navy-dark);
  transform: translateY(-1px);
}

.btn-prev {
  background: #FFFFFF;
  color: var(--text-primary);
  border: 1px solid var(--border-default);
}

.btn-prev:hover {
  background: var(--bg-card-hover);
  color: var(--navy);
  border-color: var(--border-hover);
}

/* ── Date/Time Conditional ── */
.datetime-group {
  overflow: hidden;
  animation: slideDown var(--duration-slow) var(--ease-out) !important;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
    margin-bottom: 0;
  }

  to {
    opacity: 1;
    max-height: 200px;
    margin-bottom: var(--space-lg);
  }
}

/* ── Error Messages ── */
.field-error {
  display: block;
  font-size: 0.8rem;
  color: var(--error-color);
  margin-top: var(--space-xs);
  min-height: 0;
  transition: all var(--duration-fast);
}

.field-error:not(:empty) {
  min-height: 1.2em;
}

/* ── Submit Button ── */
.submit-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 15px 32px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: #FFFFFF;
  background: var(--navy);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
  margin-top: var(--space-lg);
}

.submit-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.1) 100%);
  opacity: 0;
  transition: opacity var(--duration-normal);
}

.submit-btn:hover::before {
  opacity: 1;
}

.submit-btn:hover {
  background: var(--navy-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(46, 49, 146, 0.25);
}

.submit-btn:active {
  transform: translateY(0);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-arrow {
  transition: transform var(--duration-normal) var(--ease-out);
}

.submit-btn:hover .btn-arrow {
  transform: translateX(4px);
}

.btn-loader {
  display: none;
  animation: spin 1s linear infinite;
}

.submit-btn.loading .btn-text,
.submit-btn.loading .btn-arrow {
  display: none;
}

.submit-btn.loading .btn-loader {
  display: block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── Privacy Note ── */
.form-privacy {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: var(--space-md);
}

/* ── Success Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 29, 59, 0.5);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: all var(--duration-normal) var(--ease-out);
  padding: var(--space-md);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: #FFFFFF;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  text-align: center;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  transform: scale(0.9) translateY(20px);
  transition: transform var(--duration-slow) var(--ease-out);
}

.modal-overlay.active .modal-content {
  transform: scale(1) translateY(0);
}

.modal-icon {
  margin-bottom: var(--space-lg);
}

.check-path {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
}

.modal-overlay.active .check-path {
  animation: drawCheck 0.5s 0.3s var(--ease-out) forwards;
}

@keyframes drawCheck {
  to {
    stroke-dashoffset: 0;
  }
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.modal-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.modal-text strong {
  color: var(--navy);
}

.modal-footer {
  margin-top: var(--space-lg);
}

.modal-btn {
  padding: 12px 28px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  color: #FFFFFF;
  background: var(--navy);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
}

.modal-btn:hover {
  background: var(--navy-dark);
  box-shadow: 0 4px 12px rgba(46, 49, 146, 0.2);
}

/* ═══════════════════════════════════════════
   RTL Support (Arabic)
   ═══════════════════════════════════════════ */

[dir="rtl"] body,
[dir="rtl"] .form-input,
[dir="rtl"] .form-textarea,
[dir="rtl"] .form-select {
  font-family: var(--font-arabic), var(--font-body);
}

[dir="rtl"] .form-title,
[dir="rtl"] .form-label,
[dir="rtl"] .submit-btn,
[dir="rtl"] .modal-title,
[dir="rtl"] .modal-btn,
[dir="rtl"] .lang-toggle {
  font-family: var(--font-arabic), var(--font-display);
}

[dir="rtl"] .header-top-row {
  justify-content: flex-start;
}

[dir="rtl"] .form-label {
  flex-direction: row;
}

/* Phone prefix: flip border radii */
[dir="rtl"] .country-code-trigger {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  border-right: 1.5px solid var(--border-default);
  border-left: none;
}

[dir="rtl"] .phone-input-group .form-input {
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

[dir="rtl"] .country-dropdown {
  left: auto;
  right: 0;
}

[dir="rtl"] .country-chevron {
  margin-left: 0;
  margin-right: 2px;
}

/* Select arrow: flip to left */
[dir="rtl"] .select-arrow {
  right: auto;
  left: 14px;
}

[dir="rtl"] .form-select {
  padding-right: 16px;
  padding-left: 44px;
}

/* Progress bar gradient: flip */
[dir="rtl"] .progress-bar {
  background: linear-gradient(270deg, var(--navy), var(--red));
}

/* Submit button arrow: flip */
[dir="rtl"] .submit-btn:hover .btn-arrow {
  transform: translateX(-4px);
}

[dir="rtl"] .btn-arrow {
  transform: scaleX(-1);
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .container {
    padding: var(--space-lg) var(--space-sm) var(--space-2xl);
  }

  .session-form {
    padding: var(--space-lg) var(--space-md);
    border-radius: var(--radius-lg);
  }

  .form-title {
    font-size: 1.1rem;
  }

  .logo-mark img {
    width: 130px;
  }

  .radio-group {
    grid-template-columns: 1fr;
  }

  .radio-group-2 {
    grid-template-columns: 1fr 1fr;
  }

  .checkbox-group {
    grid-template-columns: 1fr;
  }

  .form-input,
  .form-textarea {
    font-size: 16px;
    /* Prevents iOS zoom */
  }
}

@media (max-width: 380px) {
  .radio-group-2 {
    grid-template-columns: 1fr;
  }
}

/* ── Focus Visible ── */
*:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ═══════════════════════════════════════════
   Sessions v2 additions (ADDITIVE ONLY below this line)
   ═══════════════════════════════════════════ */

/* The session feedback page toggles blocks via the hidden attribute; make sure it
   always wins, even over display rules like .inline-success { display: flex }. */
[hidden] {
  display: none !important;
}

/* ── Extra students (student form, step 2) ──
   Rows use a PLAIN native <select> for the country (no popover), so nothing here
   needs to escape the .form-group stacking context — no z-index games required. */
.extra-students-box {
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-md);
  background: #FAFBFF;
  padding: var(--space-md);
}

.extra-students-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-sm);
}

.extra-students-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.extra-student-fields {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* Country <select>: native control, arrow restored (the shared .form-input base
   strips appearance). Long option text is ellipsized. */
.extra-country {
  appearance: auto;
  -webkit-appearance: auto;
  flex: 0 1 45%;
  min-width: 0;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 13px 10px;
  font-size: 0.85rem;
}

.extra-phone {
  flex: 1 1 55%;
  min-width: 0;
}

.extra-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: color var(--duration-fast);
}

.extra-remove:hover {
  color: var(--error-color);
}

.extra-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--space-sm);
  padding: 10px 16px;
  background: #FFFFFF;
  color: var(--navy);
  border: 1.5px dashed var(--border-hover);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
}

.extra-add-btn:hover {
  border-color: var(--navy);
  background: rgba(46, 49, 146, 0.04);
}

.extra-students-list:empty + .extra-add-btn {
  margin-top: 0;
}

/* ── Session feedback page (/s/:token) ── */
.session-state {
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
}

.state-icon {
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.state-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.state-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.session-summary {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  background: #FAFBFF;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
}

.session-summary:empty {
  display: none;
}

.session-state .session-summary {
  margin-top: var(--space-md);
  text-align: center;
}

.summary-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.summary-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.summary-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.5;
}

.update-note {
  font-size: 0.85rem;
  color: var(--navy);
  background: rgba(46, 49, 146, 0.05);
  border: 1px solid rgba(46, 49, 146, 0.15);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  line-height: 1.6;
  margin-bottom: var(--space-lg);
}

/* Star rating rows */
.star-row {
  display: flex;
  gap: 4px;
}

.star-btn {
  background: none;
  border: none;
  padding: 2px 4px;
  font-size: 2rem;
  line-height: 1;
  color: var(--border-default);
  cursor: pointer;
  transition: color var(--duration-fast) var(--ease-out), transform var(--duration-fast) var(--ease-out);
}

.star-btn:hover {
  transform: scale(1.1);
}

.star-btn.filled {
  color: #F5B301;
}

/* Inline success confirmation (no redirect) */
.inline-success {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  background: var(--success-bg);
  color: var(--success-color);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 0.875rem;
  line-height: 1.6;
  margin-top: var(--space-md);
}

.inline-success svg {
  flex-shrink: 0;
  margin-top: 3px;
}

/* Small screens: keep an extra-student row on one line */
@media (max-width: 640px) {
  .extra-country {
    flex-basis: 42%;
    padding: 13px 8px;
    font-size: 16px; /* prevents iOS zoom */
  }

  .extra-phone {
    font-size: 16px;
  }

  .star-btn {
    font-size: 1.8rem;
  }
}

/* ── Payment link page (/pay/:token) ──
   Additive block only. Deliberately NO transforms/animations on containers
   (static states — nothing to transition). */
.pay-amount {
  text-align: center;
  padding: var(--space-lg) 0 var(--space-sm);
}

.pay-amount-en {
  display: block;
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
}

.pay-amount-ar {
  display: block;
  direction: rtl;
  font-family: var(--font-arabic);
  font-size: 1rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.pay-error {
  text-align: center;
  margin-top: var(--space-sm);
}

.pay-secure {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: var(--space-md);
  line-height: 1.6;
}

/* Amber "not completed" variant of the update-note pill */
.pay-warning {
  color: #8A6A0F;
  background: #FFF8E6;
  border-color: #F0D48A;
}

.state-icon-success {
  color: var(--success-color);
}

/* "Confirming your payment…" — the only moving part of this page (the global
   prefers-reduced-motion rule above already tames it). */
.state-icon-spinner {
  color: var(--navy);
}

.state-icon-spinner svg {
  animation: spin 1s linear infinite;
}

/* Payment-method chooser — only rendered when the owner enabled two or more
   methods (env PAYZAH_METHODS). With one method the page keeps the single
   "Pay now" .submit-btn and none of this block applies. */
.pay-methods {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.pay-methods-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.6;
  margin-bottom: var(--space-xs);
}

/* .submit-btn brings its own margin-top + row layout; a method button stacks
   its label over the sub-line instead and is spaced by the container's gap. */
.pay-method {
  margin-top: 0;
  padding: 14px 20px;
}

.pay-method .btn-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.pay-method-label {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
}

.pay-method-sub {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  opacity: 0.85;
}

/* Secondary look for the non-KNET methods: same size and reach, less pull. */
.pay-method-alt {
  background: var(--bg-card);
  color: var(--navy);
  border: 1.5px solid var(--border-default);
}

.pay-method-alt:hover {
  background: var(--bg-card-hover);
  border-color: var(--navy);
  box-shadow: var(--shadow-md);
}

.pay-method-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
}

/* `hidden` must beat the display values above — an author `display:` rule wins
   over the UA sheet's [hidden] { display: none }, which would otherwise leave a
   disabled method (or the unused "Pay now" button) visible on the page. */
.pay-methods[hidden],
.pay-method[hidden],
.pay-method-hint[hidden],
.submit-btn[hidden] {
  display: none;
}

@media (max-width: 640px) {
  .pay-amount-en {
    font-size: 1.9rem;
  }

  /* Phones: keep every method button fully above the fold (measured at
     390×844 — the second button was clipped by the viewport edge without
     this). Only the chooser's own spacing is touched, never the shared
     pay-card layout the single-button page uses. */
  .pay-methods {
    margin-top: var(--space-md);
  }

  .pay-methods-title {
    margin-bottom: 0;
  }

  .pay-method {
    padding: 12px 16px;
  }
}
/* ── Class recording section (/s/:token, completed phase) ──
   Additive block only. No transforms/animations on the container. */
.session-recording {
  margin-top: var(--space-lg);
}

.recording-hint {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.recording-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.recording-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: var(--navy);
  color: var(--text-on-navy);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  transition: background 150ms ease;
}

.recording-btn:hover {
  background: var(--navy-light);
}

.recording-btn span[lang="ar"] {
  font-family: var(--font-arabic);
}

/* ═══════════════════════════════════════════
   Public sign-up pages (/signup/:slug) — Run 7
   ADDITIVE ONLY. Every selector below is prefixed `.su-` and nothing above this
   line was modified: this file is shared by the student form, /hr, /s/:token and
   /pay/:token, and a previous release broke the /hr country dropdown by editing
   it. The sign-up page otherwise reuses the shipped classes as they are.
   ═══════════════════════════════════════════ */

/* Honeypot: hidden from humans, still present for a bot to fill. Deliberately NOT
   display:none — some bots skip those — and off the tab order in the markup.
   ⚠ Hidden by CLIPPING, never by an off-screen offset. The obvious
   `left: -9999px` was tried first and rendered a real bug: on an RTL (Arabic)
   page, overflow to the left DOES extend the document, so body.scrollWidth
   became ~10,400px, Chrome expanded the mobile layout viewport to ~1560px and
   the whole Arabic page rendered zoomed out with a horizontal scroll. Clipping
   at the element's own position costs the layout nothing in either direction. */
.su-hp {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}

/* Required marker on a field label. */
.su-req {
  color: var(--red);
  font-weight: 700;
  line-height: 1;
}

/* Form-level error (rate limited, network, anything with no single field). */
.su-form-error {
  margin-top: var(--space-md);
  padding: 12px 14px;
  border: 1px solid var(--error-color);
  border-radius: var(--radius-md);
  background: var(--error-bg);
  color: var(--error-color);
  font-size: 0.875rem;
  line-height: 1.6;
  text-align: center;
}

.su-form-error .bi-line[lang="ar"] {
  font-family: var(--font-arabic);
}

/* "Taking you to the next page…" under the thank-you message. */
.su-redirect-note {
  margin-top: var(--space-md);
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}
