/* ica-ui.css - one design for every learner form on learn.isocertification.africa (registry 9683).
   Shared by every plugin page through theme_cfclearn\ica. Ten rules: one screen one job, steps not forms, choices are
   cards or pills, nothing floats, one fixed footer bar, four type sizes (13/15/20/28), ivory-ink-gold, 16px cards on an
   8px grid, one globe for language, 150-200ms motion. No outside CDN. Everything is scoped to .ica-* classes. */

.ica-stage, .ica-sheet {
  --ica-ground: #fafaf8; --ica-card: #ffffff; --ica-ink: #171717; --ica-ink2: #454545; --ica-mute: #666666;
  --ica-gold: #7a5b00; --ica-gilt: #c9a227; --ica-line: rgba(23, 23, 23, .12); --ica-field: #f2f0ea;
  --ica-err: #b3261e; --ica-ok: #1f6b3f; --ica-ring: 0 0 0 2px #fff, 0 0 0 4px #7a5b00;
  font: 400 15px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ica-ink); -webkit-font-smoothing: antialiased; text-align: start;
}
.ica-stage *, .ica-sheet * { box-sizing: border-box; }
.ica-stage, .ica-stage * { scrollbar-width: none; }
.ica-stage ::-webkit-scrollbar { display: none; width: 0; height: 0; }

/* ---- One screen: the stage fills the window between the top bar and the footer bar; the page never scrolls ---- */
html.ica-lock, html.ica-lock body { height: 100%; overflow: hidden !important; }
html.ica-lock body { padding-bottom: 0 !important; }
html.ica-lock #page, html.ica-lock #page-wrapper { overflow: hidden !important; }
.ica-stage { position: fixed; z-index: 1020; top: var(--ica-top, 64px); bottom: var(--ica-bottom, 30px); left: 0; right: 0;
  background: var(--ica-ground); display: flex; justify-content: center; padding: 24px 16px 16px; overflow: hidden; }
html:not(.ica-lock) .ica-stage { position: static; overflow: visible; }   /* no script: an ordinary page that still works */

.ica-flow { width: 100%; max-width: 680px; height: 100%; min-height: 0; display: flex; flex-direction: column; gap: 16px; margin: 0; }
.ica-flow.ica-wide { max-width: 960px; }

/* ---- Head: page title, the globe, the progress bar ---- */
.ica-head { flex: none; }
.ica-head-row { display: flex; align-items: center; gap: 16px; min-height: 44px; }
.ica-stage .ica-title { flex: 1; min-width: 0; margin: 0; font-size: 28px; line-height: 1.2; font-weight: 600; color: var(--ica-ink); letter-spacing: -.01em; }
.ica-stage .ica-lede { margin: 8px 0 0; max-width: 68ch; color: var(--ica-ink2); font-size: 15px; }
.ica-progress { margin-top: 16px; }
.ica-progress-label { font-size: 13px; line-height: 1.4; color: var(--ica-mute); }
.ica-progress-label b { font-weight: 600; color: var(--ica-ink); }
.ica-progress-bar { display: flex; gap: 4px; margin: 8px 0 0; padding: 0; list-style: none; }
.ica-progress-bar li { flex: 1; height: 4px; border-radius: 2px; background: var(--ica-line); transition: background-color .18s ease; }
.ica-progress-bar li.is-done { background: var(--ica-ink); }
.ica-progress-bar li.is-now { background: var(--ica-gilt); }

/* ---- Cards ---- */
.ica-card { background: var(--ica-card); border: 1px solid var(--ica-line); border-radius: 16px; padding: 24px;
  box-shadow: 0 1px 2px rgba(23, 23, 23, .04), 0 12px 28px -18px rgba(23, 23, 23, .22); }
.ica-steps { flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column; }
.ica-step { flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column; }
.ica-step[hidden] { display: none; }
.ica-flow:not(.ica-ready) .ica-step[hidden] { display: flex; margin-bottom: 16px; }
.ica-stage .ica-h { flex: none; margin: 0; font: 600 20px/1.3 Inter, ui-sans-serif, system-ui, sans-serif; color: var(--ica-ink); letter-spacing: -.005em; }
.ica-stage .ica-hint { flex: none; margin: 4px 0 0; font-size: 13px; line-height: 1.45; color: var(--ica-mute); max-width: 68ch; }
.ica-body { flex: 0 1 auto; min-height: 0; overflow: auto; margin-top: 16px; display: flex; flex-direction: column; gap: 16px; padding: 4px; margin-inline: -4px; }
/* More below: a soft fade at the foot of a panel that scrolls inside itself. */
.ica-body.is-more { -webkit-mask-image: linear-gradient(#000 calc(100% - 40px), transparent); mask-image: linear-gradient(#000 calc(100% - 40px), transparent); }
.ica-stage p { margin: 0; max-width: 68ch; }
.ica-note { font-size: 13px; line-height: 1.45; color: var(--ica-mute); }

@keyframes ica-in-next { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes ica-in-back { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
.ica-step.ica-in-next { animation: ica-in-next .18s ease-out both; }
.ica-step.ica-in-back { animation: ica-in-back .18s ease-out both; }
[dir="rtl"] .ica-step.ica-in-next { animation-name: ica-in-back; }
[dir="rtl"] .ica-step.ica-in-back { animation-name: ica-in-next; }
@media (prefers-reduced-motion: reduce) {
  .ica-step.ica-in-next, .ica-step.ica-in-back { animation: none; }
  .ica-stage *, .ica-sheet * { transition: none !important; }
}

/* ---- Navigation: one primary button per screen, plain text for the rest ---- */
.ica-nav { flex: none; display: flex; align-items: center; gap: 16px; min-height: 44px; }
.ica-nav .ica-grow { flex: 1; }
form.ica-flow .ica-nav .ica-next, form.ica-flow .ica-nav .ica-submit { margin-inline-start: auto; }
.ica-btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; height: 44px; padding: 0 8px 0 24px;
  border: 0; border-radius: 999px; background: var(--ica-ink); color: #fff !important; font: 600 15px/1 Inter, system-ui, sans-serif;
  text-decoration: none !important; cursor: pointer; white-space: nowrap; transition: transform .15s ease, box-shadow .15s ease;
  box-shadow: 0 10px 22px -14px rgba(23, 23, 23, .7); }
.ica-btn:hover { transform: translateY(-1px); }
.ica-btn .ica-ar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--ica-gilt); color: var(--ica-ink); flex: none; }
.ica-btn .ica-ar svg { width: 14px; height: 14px; }
[dir="rtl"] .ica-btn .ica-ar svg, [dir="rtl"] .ica-flip { transform: scaleX(-1); }
.ica-btn[disabled] { opacity: .45; cursor: default; transform: none; }
.ica-btn[hidden], .ica-text[hidden] { display: none; }
.ica-text { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 8px; margin-inline-start: -8px; border: 0; background: none;
  color: var(--ica-ink) !important; font: 600 15px/1 Inter, system-ui, sans-serif; text-decoration: none !important; cursor: pointer; border-radius: 8px; }
.ica-text:hover { color: var(--ica-gold) !important; }
.ica-text.ica-small { font-size: 13px; }
.ica-stage :focus-visible, .ica-sheet :focus-visible { outline: none; box-shadow: var(--ica-ring); }

/* ---- Choices: cards you tap ---- */
.ica-choices { display: grid; gap: 8px; }
.ica-choices.ica-two { grid-template-columns: 1fr 1fr; }
.ica-choices.ica-three { grid-template-columns: repeat(3, 1fr); }
.ica-choice { position: relative; display: flex; align-items: center; gap: 16px; min-height: 56px; margin: 0; padding: 12px 16px; border-radius: 12px;
  background: var(--ica-card); box-shadow: inset 0 0 0 1px var(--ica-line); cursor: pointer; transition: box-shadow .15s ease, background-color .15s ease; }
.ica-choice:hover { box-shadow: inset 0 0 0 1px rgba(23, 23, 23, .4); }
.ica-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ica-choice:has(input:focus-visible) { box-shadow: inset 0 0 0 1px var(--ica-ink), var(--ica-ring); }
.ica-choice:has(input:checked) { box-shadow: inset 0 0 0 2px var(--ica-ink); background: #fdfcf8; }
.ica-choice-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ica-choice-t b { font-weight: 600; font-size: 15px; line-height: 1.35; color: var(--ica-ink); }
.ica-choice-t span { font-size: 13px; line-height: 1.4; color: var(--ica-mute); }
.ica-choice-e { font-weight: 600; font-size: 15px; color: var(--ica-ink); white-space: nowrap; }
.ica-tick { flex: none; width: 24px; height: 24px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--ica-line); display: grid; place-items: center; color: transparent; }
.ica-tick svg { width: 12px; height: 12px; }
.ica-choice:has(input:checked) .ica-tick { background: var(--ica-gilt); box-shadow: none; color: var(--ica-ink); }
.ica-choice.is-off { cursor: default; opacity: .55; }
.ica-choice.is-off:hover { box-shadow: inset 0 0 0 1px var(--ica-line); }
.ica-ico { flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--ica-field); display: grid; place-items: center; color: var(--ica-ink); }
.ica-ico svg { width: 20px; height: 20px; }

/* ---- Pills: small choices, and states ---- */
.ica-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.ica-pill { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin: 0; padding: 0 16px; border-radius: 999px;
  background: var(--ica-field); color: var(--ica-ink); font-size: 15px; font-weight: 400; cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.ica-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ica-pill:hover { background: #e9e6dc; }
.ica-pill:has(input:checked) { background: var(--ica-ink); color: #fff; font-weight: 600; }
.ica-pill:has(input:focus-visible) { box-shadow: var(--ica-ring); }
.ica-pills.ica-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); }
.ica-pills.ica-grid3 .ica-pill { justify-content: center; padding: 0 8px; text-align: center; }
.ica-state { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.ica-state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.ica-state.is-ok { background: #e6f2ea; color: #1f6b3f; }
.ica-state.is-now { background: #f6efd6; color: #6b5000; }
.ica-state.is-held { background: #ececea; color: #555555; }

/* ---- Fields: a small label above, a soft filled field, no box ---- */
.ica-fields { display: grid; gap: 16px; }
.ica-fields.ica-two { grid-template-columns: 1fr 1fr; }
.ica-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; margin: 0; }
.ica-field > label, .ica-label { margin: 0; font-size: 13px; line-height: 1.4; font-weight: 600; color: var(--ica-ink2); }
.ica-field > label i, .ica-label i { font-style: normal; font-weight: 400; color: var(--ica-mute); }
.ica-input { width: 100%; height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--ica-field); color: var(--ica-ink);
  font: 400 15px/1.4 Inter, system-ui, sans-serif; outline: none; box-shadow: none; transition: background-color .15s ease, box-shadow .15s ease; appearance: none; }
textarea.ica-input { height: 72px; padding: 10px 12px; resize: none; }
.ica-input::placeholder { color: #8a8a86; }
.ica-input:hover { background: #ece9e0; }
.ica-input:focus { background: #fff; box-shadow: inset 0 0 0 1px var(--ica-ink), var(--ica-ring); }
.ica-input[aria-invalid="true"] { box-shadow: inset 0 -2px 0 var(--ica-err); }
.ica-error { font-size: 13px; line-height: 1.4; color: var(--ica-err); min-height: 0; }
.ica-error:empty { display: none; }
[data-ica-show][hidden] { display: none !important; }
input[type=date].ica-input { appearance: auto; -webkit-appearance: none; }
.ica-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- A long list (countries, courses): search, then rows that scroll inside their own panel ---- */
.ica-list { display: flex; flex-direction: column; gap: 8px; min-height: 0; flex: 0 1 auto; }
.ica-list select { display: none; }
.ica-list > .ica-input { flex: none; }
.ica-flow:not(.ica-ready) .ica-list select { display: block; }
.ica-list-rows { flex: 0 1 auto; min-height: 88px; max-height: 264px; overflow: auto; border-radius: 12px; background: var(--ica-field); padding: 4px;
  display: flex; flex-direction: column; gap: 2px; }
.ica-list-rows button { flex: none; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 4px 12px; border: 0; border-radius: 8px;
  background: none; color: var(--ica-ink); font: 400 15px/1.35 Inter, system-ui, sans-serif; text-align: start; cursor: pointer; }
.ica-list-rows button:hover { background: #e9e6dc; }
.ica-list-rows button[aria-selected="true"] { background: var(--ica-ink); color: #fff; font-weight: 600 !important; }
.ica-list-rows button[hidden] { display: none; }
.ica-list-none { padding: 12px; font-size: 13px; color: var(--ica-mute); }
/* Registry 9824: a country list carries each flag beside its name (same flag set as the payment step) */
.ica-flags .ica-list-rows .ica-flag { flex: none; width: 24px; height: 18px; border-radius: 2px; object-fit: cover;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); }
.ica-flags .ica-list-rows button[aria-selected="true"] .ica-flag { box-shadow: 0 0 0 1px rgba(255, 255, 255, .5); }
.ica-flags .ica-list-rows { scrollbar-width: none; }
.ica-flags .ica-list-rows::-webkit-scrollbar { display: none; }

/* ---- A file: one soft drop row ---- */
.ica-file { position: relative; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 12px; border-radius: 12px; background: var(--ica-field); cursor: pointer; margin: 0; }
.ica-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.ica-file:has(input:focus-visible) { box-shadow: var(--ica-ring); }
.ica-file-name { flex: 1; min-width: 0; font-size: 15px; color: var(--ica-ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ica-file-go { flex: none; font-size: 13px; font-weight: 600; color: var(--ica-ink); background: #fff; border-radius: 999px; padding: 8px 16px; }

/* ---- Facts and the review card ---- */
.ica-facts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin: 0; border-radius: 12px; background: var(--ica-field); padding: 4px 16px; }
.ica-facts > div, .ica-facts > button { display: flex; align-items: center; gap: 16px; min-height: 40px; padding: 4px 0; border: 0; border-bottom: 1px solid rgba(23, 23, 23, .07);
  background: none; width: 100%; text-align: start; font: inherit; color: inherit; }
.ica-facts > :last-child { border-bottom: 0; }
.ica-facts > button { cursor: pointer; border-radius: 0; }
.ica-facts dt, .ica-facts .k { flex: none; width: 38%; max-width: 200px; margin: 0; font-size: 13px; font-weight: 400; color: var(--ica-mute); }
.ica-facts dd, .ica-facts .v { flex: 1; min-width: 0; margin: 0; font-size: 15px; font-weight: 600; color: var(--ica-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ica-facts .e { flex: none; font-size: 13px; font-weight: 600; color: var(--ica-gold); }
.ica-facts.ica-tight > div { min-height: 32px; padding: 2px 0; }
.ica-facts > button { min-height: 36px; }
@media (pointer: coarse) { .ica-facts > button { min-height: 44px; } }
.ica-facts dd { white-space: normal; }
.ica-copy { user-select: all; font-variant-numeric: tabular-nums; }

/* ---- Done: the success card ---- */
.ica-done { align-items: flex-start; gap: 16px; }
.ica-done-mark { width: 48px; height: 48px; border-radius: 50%; background: var(--ica-gilt); color: var(--ica-ink); display: grid; place-items: center; }
.ica-done-mark svg { width: 24px; height: 24px; }
.ica-done-mark.is-wait { background: var(--ica-field); }
.ica-alert { border-radius: 12px; background: #fbeceb; color: var(--ica-err); padding: 12px 16px; font-size: 13px; line-height: 1.45; }
.ica-alert.is-info { background: #f6efd6; color: #5a4300; }

/* ---- The globe: one icon button, a short list, each language in its own script ---- */
.ica-globe { position: relative; flex: none; }
.ica-globe > button { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--ica-field); color: var(--ica-ink); display: grid; place-items: center; cursor: pointer; }
.ica-globe > button:hover { background: #e9e6dc; }
.ica-globe > button svg { width: 20px; height: 20px; }
.ica-globe-menu { position: absolute; z-index: 30; top: 52px; inset-inline-end: 0; min-width: 200px; margin: 0; padding: 8px; list-style: none; background: #fff; border: 1px solid var(--ica-line);
  border-radius: 16px; box-shadow: 0 16px 32px -16px rgba(23, 23, 23, .35); }
.ica-globe-menu[hidden] { display: none; }
.ica-globe-menu a { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; padding: 0 12px; border-radius: 8px; color: var(--ica-ink) !important; font-size: 15px; text-decoration: none !important; }
.ica-globe-menu a:hover { background: var(--ica-field); }
.ica-globe-menu a[aria-current="true"] { font-weight: 600; }
.ica-globe-menu a svg { width: 16px; height: 16px; color: var(--ica-gold); visibility: hidden; }
.ica-globe-menu a[aria-current="true"] svg { visibility: visible; }

/* ---- A single screen that is not a flow (an offer, a status) ---- */
.ica-tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; min-height: 0; }
.ica-tier { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.ica-tier .ica-h { font-size: 20px; }
.ica-tier ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 13px; line-height: 1.45; color: var(--ica-ink2); }
.ica-tier li { display: flex; gap: 8px; }
.ica-tier li::before { content: ""; flex: none; width: 6px; height: 6px; margin-top: 7px; border-radius: 50%; background: var(--ica-gilt); }
.ica-tier .ica-text { margin-top: auto; }
.ica-links { display: flex; flex-wrap: wrap; gap: 0 24px; }

/* ---- Phone ---- */
@media (max-width: 599.98px) {
  .ica-stage { padding: 16px 12px 12px; }
  .ica-flow { gap: 12px; }
  .ica-stage .ica-title { font-size: 24px; }
  .ica-progress { margin-top: 8px; }
  .ica-card { padding: 16px; }
  .ica-body { margin-top: 12px; gap: 12px; }
  .ica-fields.ica-two:not(.ica-keep), .ica-choices.ica-three, .ica-choices.ica-two { grid-template-columns: 1fr; }
  .ica-nav { flex-wrap: wrap; gap: 0 16px; }
  .ica-nav .ica-note:empty { display: none; }
  .ica-fields { gap: 12px; }
  .ica-tiers { grid-template-columns: 1fr; gap: 8px; overflow: auto; }
  .ica-tier { padding: 12px 16px; gap: 4px; }
  .ica-tier ul { display: none; }
  .ica-facts dt, .ica-facts .k { width: 42%; }
  .ica-list-rows { max-height: 220px; }
  .ica-btn { padding-inline-start: 20px; }
}
@media (max-height: 700px) {
  .ica-stage { padding-top: 12px; }
  .ica-flow { gap: 12px; }
  .ica-progress { margin-top: 8px; }
  .ica-body { margin-top: 12px; gap: 12px; }
  .ica-list-rows { max-height: 176px; }
  textarea.ica-input { height: 56px; }
}

/* ===== learner pages (scarlett, registry 9687): the shared tokens on :root, for the course, lesson, quiz, catalogue
   and signed-in home pages (local/cfcfront/assets/ica-learn.css). Same values as above; nothing above is changed. ===== */
:root {
  --ica-ground: #faf8f2; --ica-surface: #ffffff; --ica-ink: #171717; --ica-ink2: #5f5b53;
  --ica-line: rgba(23, 23, 23, .10); --ica-gold: #b88a1b; --ica-gold-ink: #7a5b00; --ica-gold-soft: #f7efd9;
  --ica-green: #1f7a4d; --ica-green-soft: #e6f3ec; --ica-grey: #6b6b6b; --ica-grey-soft: #efeeea;
  --ica-red: #b3261e; --ica-red-soft: #fbeae8;
  --ica-shadow: 0 1px 2px rgba(23, 23, 23, .04), 0 8px 24px -16px rgba(60, 45, 20, .22);
  --ica-r-card: 16px; --ica-r-btn: 12px; --ica-pad: 24px;
  --ica-t-label: 13px; --ica-t-ui: 15px; --ica-t-read: 16px; --ica-t-h2: 20px; --ica-t-h1: 28px;
  --ica-font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (max-width: 700px) { :root { --ica-t-h1: 24px; --ica-pad: 16px; } }

/* Review values wrap to two lines rather than lose their start (an English course name inside an Arabic page). */
.ica-facts .v { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
/* A value keeps its own direction (a phone number or an English course name in an Arabic page), aligned with the page. */
.ica-facts dd, .ica-facts .v { unicode-bidi: plaintext; text-align: left; }
[dir=rtl] .ica-facts dd, [dir=rtl] .ica-facts .v { text-align: right; }
