/* New Admission public form — Uniform Booking letterhead / print parity */

body.na-portal {
  --na-accent: #0f766e;
}

/*
 * WP embed (page_id=3248 iframe): background is transparent / light page chrome.
 * Glass topbar (white text on rgba white) was designed for the dark school_bg portal —
 * badge text vanished (only the gold cap showed), inactive EN looked like an empty white
 * pill, and bus-portal orange active styles fought the navy active button.
 */
body.na-portal.na-portal--embed .ja-topbar {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  min-height: 2.75rem;
}
body.na-portal.na-portal--embed .ja-tools,
body.na-portal.na-portal--embed .profile-tools.ja-tools {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem;
  margin-inline-start: auto;
  margin-bottom: 0;
}
body.na-portal.na-portal--embed .ja-lang-switch,
body.na-portal.na-portal--embed .language-switch.ja-lang-switch {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.4rem;
}
body.na-portal.na-portal--embed .lang-chip {
  margin-bottom: 0 !important;
  height: 2.5rem;
  box-sizing: border-box;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  max-width: min(100%, 22rem);
}
body.na-portal.na-portal--embed .lang-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.na-portal.na-portal--embed .lang-chip i {
  color: var(--na-accent, #0f766e);
  flex-shrink: 0;
}
body.na-portal.na-portal--embed .ja-lang-btn.na-lang-btn,
body.na-portal.na-portal--embed button.ja-lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  height: 2.5rem;
  box-sizing: border-box;
  padding: 0 1rem;
  line-height: 1.2;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  white-space: nowrap;
}
body.na-portal.na-portal--embed .ja-lang-btn.na-lang-btn:hover,
body.na-portal.na-portal--embed button.ja-lang-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
  transform: none;
}
body.na-portal.na-portal--embed .ja-lang-btn.na-lang-btn.is-active,
body.na-portal.na-portal--embed button.ja-lang-btn.is-active,
body.na-portal.na-portal--embed.bs-portal .ja-lang-btn.na-lang-btn.is-active,
body.na-portal.na-portal--embed.bs-portal button.ja-lang-btn.is-active {
  background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
  border-color: #0f766e;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(15, 118, 110, 0.28);
}
body.na-portal.na-portal--embed .tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  height: 2.5rem;
  box-sizing: border-box;
  padding: 0 0.9rem;
  line-height: 1.2;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  white-space: nowrap;
}
body.na-portal.na-portal--embed .tool-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}
@media (max-width: 560px) {
  body.na-portal.na-portal--embed .ja-topbar {
    flex-wrap: wrap;
    align-items: stretch;
  }
  body.na-portal.na-portal--embed .lang-chip {
    max-width: 100%;
    width: 100%;
    order: -1;
  }
  body.na-portal.na-portal--embed .ja-tools {
    width: 100%;
    margin-inline-start: 0;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

.na-hero {
  text-align: center;
  margin: 0.75rem 0 1.25rem;
}
.na-hero-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.12);
  color: var(--na-accent);
  font-size: 1.35rem;
  margin-bottom: 0.65rem;
}
.na-hero h1 {
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  font-weight: 900;
  color: #0f172a;
  margin: 0 0 0.45rem;
}
.na-hero p {
  margin: 0 auto;
  max-width: 42rem;
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.55;
}

.na-form-card .na-card-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.na-card-title { font-weight: 900; }

.na-meta-row {
  margin: 0 0 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  color: #115e59;
  font-weight: 700;
  font-size: 0.9rem;
}

/* —— 3-step admission wizard —— */
.na-wizard-steps {
  margin: 0 0 1.25rem;
}
.na-wizard-track {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  counter-reset: none;
}
.na-wizard-step {
  position: relative;
  min-width: 0;
}
.na-wizard-step:not(:last-child)::after {
  content: '';
  position: absolute;
  inset-block-start: 1.15rem;
  inset-inline-start: calc(50% + 1.4rem);
  width: calc(100% - 1.1rem);
  height: 2px;
  background: #e2e8f0;
  z-index: 0;
  pointer-events: none;
}
.na-wizard-step.is-done:not(:last-child)::after,
.na-wizard-step.is-active:not(:last-child)::after {
  background: linear-gradient(90deg, #0d9488, #5eead4);
}
html[dir="rtl"] .na-wizard-step:not(:last-child)::after {
  background: #e2e8f0;
}
html[dir="rtl"] .na-wizard-step.is-done:not(:last-child)::after,
html[dir="rtl"] .na-wizard-step.is-active:not(:last-child)::after {
  background: linear-gradient(270deg, #0d9488, #5eead4);
}
.na-wizard-step-btn {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.35rem 0.25rem 0.5rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: #64748b;
  transition: color 0.15s ease;
}
.na-wizard-step-btn:hover,
.na-wizard-step-btn:focus-visible {
  color: #0f766e;
  outline: none;
}
.na-wizard-step-btn:focus-visible .na-wizard-num {
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.35);
}
.na-wizard-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  border: 2px solid #cbd5e1;
  background: #fff;
  font-weight: 900;
  font-size: 0.95rem;
  color: #64748b;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.na-wizard-label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-align: center;
  line-height: 1.25;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.na-wizard-step.is-active .na-wizard-num {
  border-color: #0d9488;
  background: #0d9488;
  color: #fff;
  box-shadow: 0 8px 18px -10px rgba(13, 148, 136, 0.85);
}
.na-wizard-step.is-active .na-wizard-label {
  color: #0f766e;
}
.na-wizard-step.is-done .na-wizard-num {
  border-color: #14b8a6;
  background: #ccfbf1;
  color: #0f766e;
}
.na-wizard-step.is-done .na-wizard-label {
  color: #0f766e;
}
.na-wizard-status {
  margin: 0.65rem 0 0;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #64748b;
}
.na-wizard-panel {
  display: none;
  animation: naWizardIn 0.28s ease;
}
.na-wizard-panel.is-active {
  display: block;
}
.na-wizard-panel[hidden] {
  display: none !important;
}
@keyframes naWizardIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .na-wizard-panel { animation: none; }
}
.na-wizard-panel-head {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #f0fdfa 0%, #ecfeff 55%, #f8fafc 100%);
  border: 1px solid #99f6e4;
}
.na-wizard-panel-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  font-weight: 900;
  color: #0f172a;
}
.na-wizard-panel-title i {
  color: #0d9488;
}
.na-wizard-panel-hint {
  margin: 0;
  font-size: 0.85rem;
  color: #475569;
  line-height: 1.45;
}
.na-section--flat {
  border: 0;
  padding: 0;
  background: transparent;
  margin-bottom: 0.75rem;
}
.na-wizard-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid #e2e8f0;
}
.na-wizard-nav-spacer {
  flex: 1 1 auto;
  min-width: 0;
}
.na-wizard-nav .ja-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
html[dir="rtl"] .na-wiz-ico-fwd,
html[dir="rtl"] .na-wiz-ico-back {
  transform: scaleX(-1);
}
@media (max-width: 520px) {
  .na-wizard-track { gap: 0.25rem; }
  .na-wizard-label { font-size: 0.7rem; }
  .na-wizard-num {
    width: 2.1rem;
    height: 2.1rem;
    font-size: 0.85rem;
  }
  .na-wizard-step:not(:last-child)::after {
    inset-block-start: 1.05rem;
    inset-inline-start: calc(50% + 1.2rem);
    width: calc(100% - 0.85rem);
  }
}

.na-section {
  margin: 0 0 1.35rem;
  padding: 1rem 1rem 0.25rem;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
}
.na-section-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.85rem;
  font-size: 1rem;
  font-weight: 900;
  color: #0f172a;
}
.na-child-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}
.na-child-head .na-section-title { margin-bottom: 0; }
.na-child-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: #ccfbf1;
  color: #0f766e;
  font-size: 0.8rem;
  font-weight: 900;
}

.na-hint {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.4;
}
.na-radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 0.25rem;
}
.na-radio {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
}

/* ja-btn uses display:inline-flex — beat HTML [hidden] so sole-child Delete stays gone */
.na-remove-child[hidden],
button.na-remove-child[hidden] {
  display: none !important;
}

.na-child-actions {
  margin: 0 0 1.15rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
}
.na-add-child-hint {
  margin: 0;
  flex: 1 1 12rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  font-weight: 600;
  color: #475569;
  max-width: 28rem;
}

/* Compact legal-docs block inside admission child cards */
.na-child-card .legal-docs-container {
  margin-top: 0.25rem;
}
.na-child-card .legal-docs-container.hidden {
  display: none !important;
}
.na-child-card .na-expat-title {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  font-weight: 800;
  color: #334155;
}
.na-child-card .na-expat-title i {
  margin-inline-end: 0.35rem;
  color: #94a3b8;
}
.na-submit-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: flex-end;
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e2e8f0;
}

.na-form .ja-field input[readonly] {
  background: #f8fafc;
  color: #0f172a;
  font-weight: 700;
}

/* Address = bus subscription combobox chrome (not ERP portal-home sls-* fields) */
.na-address-section .bs-map-intro {
  margin: 0 0 1rem;
}
.na-address-section .bs-combobox {
  width: 100%;
}
.na-address-section .bs-combobox-input,
.na-address-section .ja-input,
.na-address-section .ja-textarea,
.na-address-section .ja-select {
  width: 100%;
}

.na-success-box { text-align: center; }

@media print {
  .ambient,
  .ja-topbar,
  .na-hero,
  .na-no-print,
  .na-wizard-steps,
  .na-wizard-nav,
  .na-child-actions,
  .na-submit-row .ja-btn-primary,
  #naSubmitBtn,
  #naAddChildBtn,
  .na-remove-child {
    display: none !important;
  }
  .na-wizard-panel,
  .na-wizard-panel.is-active,
  .na-wizard-panel[hidden] {
    display: block !important;
  }
  body.na-portal,
  body.ub-portal {
    background: #fff !important;
    padding: 0 !important;
  }
  .ja-glass-card,
  .na-form-card {
    box-shadow: none !important;
    border: 1px solid #cbd5e1 !important;
  }
  .na-section {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
  .school-letterhead {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
