/* Al Bassam — careers wizard inside the focused form shell (form-shell.css):
   progress rail, step list, fields, repeaters, CV picker, consent, review, actions. */
.mf-bar, .mf-panel, .mf-foot { max-inline-size: 740px; }

/* progress rail (transform, not width: no layout animation) */
.mf-rail { block-size: 3px; background: var(--hairline); overflow: hidden; }
.mf-rail-fill { block-size: 3px; inline-size: 100%; background: var(--red); transform-origin: right; transform: scaleX(var(--p, .25)); transition: transform .5s cubic-bezier(.16,1,.3,1); }
[dir="ltr"] .mf-rail-fill { transform-origin: left; }

/* step list */
.mf-step-nav { display: flex; align-items: center; gap: .85rem; padding: .85rem 1.75rem; border-bottom: 1px solid var(--hairline); }
.mf-dots { display: flex; align-items: center; flex: 1; list-style: none; margin: 0; padding: 0; }
.mf-dot { inline-size: 28px; block-size: 28px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 700; background: var(--raised); color: var(--muted); border: 1.5px solid var(--hairline); transition: background .25s, color .25s, border-color .25s; }
.mf-dot.done { background: var(--blue); border-color: var(--blue); color: var(--on-color); }
.mf-dot.active { background: var(--red); border-color: var(--red); color: var(--on-color); }
.mf-dsep { flex: 1; max-inline-size: 32px; block-size: 1.5px; background: var(--hairline); transition: background .35s; }
.mf-dsep.done { background: var(--blue); }
.mf-step-frac { font-size: .85rem; color: var(--muted); font-weight: 600; flex: none; background: var(--raised); padding: .25rem .75rem; border-radius: 100px; }

/* step body */
.cw-alert { margin: 1rem 1.75rem 0; }
.cw-body { padding: 1.7rem 1.75rem 1.1rem; }
.step-title { margin-bottom: 1.4rem; }
.step-title h2 { font-size: 1.4rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.25rem; }
.grid2 .fg { margin-bottom: 0; }
.grid2 .span2 { grid-column: 1 / -1; }

/* repeaters: one fieldset per qualification / experience */
.rep { position: relative; min-inline-size: 0; border: 1px solid var(--hairline); border-radius: var(--r-card); padding: 1.1rem 1.25rem; margin: 0 0 .85rem; background: var(--raised); }
.rep legend { float: inline-start; inline-size: 100%; padding: 0; margin: 0 0 .9rem; font-weight: 700; color: var(--blue); font-size: .95rem; }
.rep .grid2 { clear: both; }
.rep .del { position: absolute; inset-block-start: .8rem; inset-inline-end: 1rem; min-block-size: 44px; padding: 0 .6rem; background: none; border: 1px solid transparent; border-radius: 6px; color: var(--red-text); font-weight: 600; font-size: .85rem; cursor: pointer; font-family: var(--fb); }
.rep .del:hover { border-color: var(--red); }
.add { display: inline-flex; align-items: center; gap: .45rem; min-block-size: 44px; background: transparent; border: 1.5px dashed color-mix(in srgb,var(--blue) 35%,transparent); color: var(--blue); border-radius: var(--r-field); padding: .55rem 1rem; font-weight: 600; cursor: pointer; font-family: var(--fb); font-size: .9rem; transition: background .2s; }
.add:hover { background: color-mix(in srgb,var(--blue) 6%,transparent); }

/* CV picker: the native file input covers the whole card (any click opens the picker)
   and stays keyboard-focusable; the card shows the focus ring. */
.upload { position: relative; cursor: pointer; border: 1.5px dashed var(--field-border); border-radius: var(--r-card); background: var(--raised); padding: 1.2rem 1.1rem; display: flex; align-items: center; gap: 1rem; }
.upload:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; box-shadow: 0 0 0 4px var(--paper); }
.upload.has { border-color: var(--blue); border-style: solid; background: var(--paper); }
.upload.err { border-color: var(--red); border-style: solid; }
.upload .ic { inline-size: 44px; block-size: 44px; border-radius: 10px; background: var(--paper); border: 1px solid var(--hairline); display: grid; place-items: center; color: var(--blue); flex: none; }
.upload.has .ic { color: var(--green); border-color: var(--green); }
.upload-txt { display: flex; flex-direction: column; min-inline-size: 0; }
.upload .t { font-weight: 600; font-size: .95rem; overflow-wrap: anywhere; }
.upload .h { font-size: .85rem; color: var(--muted); margin-top: .2rem; }
.upload .act { margin-inline-start: auto; flex: none; }
.upload-input { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; min-block-size: 0; opacity: 0; cursor: pointer; }

/* consent + review */
.consent { margin-top: 1.25rem; }
.review { margin-top: 1.5rem; }
.review h3 { font-size: 1.05rem; color: var(--blue); margin: 0 0 .45rem; }
.rrow { display: flex; gap: .75rem; padding: .5rem 0; border-bottom: 1px solid var(--hairline); font-size: .92rem; }
.rrow:last-child { border-bottom: none; }
.rk { color: var(--muted); min-inline-size: 130px; font-weight: 600; flex: none; }
.rv { color: var(--ink); overflow-wrap: anywhere; }

/* actions */
.cw-actions { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.75rem 1.4rem; border-top: 1px solid var(--hairline); }
.cw-actions .hint { flex: 1; }
.cw-actions .btns { display: flex; gap: .6rem; margin-inline-start: auto; }

/* step fade-in */
.step-enter { transition: opacity .22s ease-out, transform .22s ease-out; }
.step-enter-start { opacity: 0; transform: translateY(6px); }
.step-enter-end { opacity: 1; transform: translateY(0); }

@media (max-width: 600px) {
  .mf-bar, .mf-panel, .mf-foot { max-inline-size: 100%; }
  .grid2 { grid-template-columns: 1fr; }
  .mf-dots { display: none; }
  .mf-step-nav { padding: .75rem 1.2rem; }
  .cw-alert { margin: 1rem 1.2rem 0; }
  .cw-body { padding: 1.25rem 1.2rem 1rem; }
  .cw-actions { padding: .85rem 1.2rem 1.25rem; flex-wrap: wrap; }
  .cw-actions .btns { inline-size: 100%; }
  .cw-actions .btns .btn { flex: 1; }
  .upload { flex-wrap: wrap; }
}

/* Before Alpine boots the wizard is x-cloak (display:none), so the footer would sit under the header and jump
   down once step 1 renders (CLS 0.60 desktop / 0.048 mobile on a fast load). Reserve step 1's height, hidden, until then:
   ~800px on desktop, one screen on phones (the real height is taller, so the footer stays below the fold). */
[x-data="wizard()"][x-cloak]{display:block!important;visibility:hidden;block-size:100svh;overflow:hidden;}
@media (min-width:900px){
  [x-data="wizard()"][x-cloak]{block-size:800px;}
}
