/*
 * The applicant's own page at /driver-joining: the status card and the steps.
 *
 * Page-scoped, on top of site.css and the training page's card (driver-training.css), whose shell
 * it shares: the frame, the language switch, the buttons and the notices are the `dt-` ones. Every
 * colour is a site.css token; this file declares none. Everything here is prefixed `jn-`.
 */

.jn-frame { min-height: auto; max-width: 600px; }

/* Who the page is for, beside the way out. */
.jn-who { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 26px; font-size: 14px; color: var(--muted); }
.jn-who form { margin: 0; }
.jn-link { background: none; border: none; padding: 6px 0; font: inherit; font-weight: 600; color: var(--brand-d); cursor: pointer; text-decoration: underline; }

/* The status card: a heading, one sentence, at most one button. */
.jn-card { border-radius: 20px; padding: 18px 20px; background: color-mix(in srgb, var(--brand) 7%, #fff); border: 1px solid color-mix(in srgb, var(--brand) 18%, #fff); }
.jn-card h2 { margin: 0 0 6px; }
.jn-card p { color: var(--ink); }
.jn-card--complete { background: color-mix(in srgb, var(--green-t) 8%, #fff); border-color: color-mix(in srgb, var(--green-t) 22%, #fff); }
.jn-btn { display: inline-block; margin-top: 14px; }

/* The steps, numbered by the list itself so a screen reader counts them too. */
.jn-steps { margin-top: 22px; }
.jn-list { margin: 8px 0 0; padding-left: 1.5em; }
.jn-list li::marker { color: var(--muted); font-weight: 600; }
.jn-step { padding: 12px 0; border-bottom: 1px solid var(--line); }
.jn-step:last-child { border-bottom: none; }
.jn-step-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 10px; flex-wrap: wrap; }
.jn-step h3 { margin: 0; font-size: 16px; font-weight: 600; color: var(--ink); }
.jn-step--later h3 { color: var(--muted); }
.jn-step p { margin: 4px 0 0; font-size: 14.5px; }
.jn-state { font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: var(--radius-pill); white-space: nowrap; }
.jn-state--done { background: color-mix(in srgb, var(--green-t) 12%, #fff); color: var(--green-t); }
.jn-state--your_turn { background: var(--brand-d); color: #fff; }
.jn-state--checking { background: color-mix(in srgb, var(--blue-t) 10%, #fff); color: var(--blue-t); }
.jn-state--later { background: color-mix(in srgb, var(--line) 45%, #fff); color: var(--muted); }
.jn-stores { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.jn-stores a { color: var(--brand-d); font-weight: 600; }

.jn-form { margin-top: 4px; }
.jn-error { color: var(--danger); font-size: 14px; margin-top: 6px; }
.dt-field input[aria-invalid="true"] { border-color: var(--danger); }

@media (max-width: 460px) {
  .jn-who { padding: 0 18px; }
}

/* The step pages: the way back, and the documents page's papers and their forms. */
.jn-back { margin: 0 0 4px; font-size: 14px; }
.jn-back a { color: var(--brand-d); font-weight: 600; }
.jn-paper { margin-top: 18px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.jn-paper:focus { outline: 2px solid var(--brand-d); outline-offset: 2px; }
.jn-paper h3 { margin: 0; font-size: 17px; font-weight: 600; color: var(--ink); }
.jn-paper > * + * { margin-top: 10px; }
.jn-caption { font-size: 14px; color: var(--muted); }
.jn-kind { margin: 16px 0 0; font-size: 15px; font-weight: 600; color: var(--ink); }
.jn-note { font-size: 14px; color: var(--ink-70); }
.jn-slot { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.jn-slot .dt-field { margin-top: 8px; }
.jn-side-state { margin-left: 6px; font-weight: 600; text-transform: none; letter-spacing: 0; }
.jn-slot input[type="file"], .jn-slot input[type="date"] { padding: 10px 12px; font-size: 15px; }
.jn-chip--valid { background: color-mix(in srgb, var(--green-t) 12%, #fff); color: var(--green-t); }
.jn-chip--expiring { background: color-mix(in srgb, var(--yellow) 30%, #fff); color: var(--ink); }
.jn-chip--missing, .jn-chip--expired, .jn-chip--rejected { background: color-mix(in srgb, var(--danger) 9%, #fff); color: var(--danger); }
