/* The registration page's own layout (RegisterPage.kt): the navy band, the steps beside the card on a
   laptop, the card's screens, its fields, the file tiles, the review list and the status. Tokens,
   buttons, the band and the glow are common.css's. */

/* ---------- the band: the heading and steps beside the card from a laptop, above it on a phone ---------- */
.reg { padding-block: clamp(1.75rem, 4vw, 3.5rem) var(--band); }
.layout { display: grid; gap: clamp(1.25rem, 4vw, 3.5rem); align-items: start; }
.side { display: grid; gap: 1rem; align-content: start; min-width: 0; }
.side .lede { font-size: 1rem; }
.steps { display: none; list-style: none; margin: .5rem 0 0; padding: 0; }
.steps li { display: flex; align-items: center; gap: .75rem; min-height: 3.25rem; color: var(--on-navy-2); }
.steps b { flex: none; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%;
           box-shadow: inset 0 0 0 1.5px currentColor; font-family: var(--digits); font-size: .85rem; }
.steps .done b { background: var(--navy-2); color: var(--sun); box-shadow: none; }
.steps [aria-current="step"] { color: var(--on-navy); font-weight: 600; }
.steps [aria-current="step"] b { background: var(--sun); color: var(--on-sun); box-shadow: none; }
@media (min-width: 56.25em) {
  .layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
  .side { position: sticky; top: 6.5rem; }
  .steps { display: grid; }
}

/* A step's words that differ for a chain: both drawn, the chosen kind's shown. */
.reg:not([data-choice="chain"]) [data-for="chain"],
.reg[data-choice="chain"] [data-for="standalone"] { display: none; }

/* ---------- the card ---------- */
.reg .card { display: grid; gap: 1rem; min-width: 0; padding: clamp(1.25rem, 3vw, 2.25rem); border-radius: 2rem;
             background: var(--card); color: var(--ink); }
.screen { display: grid; gap: 1rem; min-width: 0; }
.screen h2:focus { outline: none; }
.lead { color: var(--ink-2); }
.count { font-size: .82rem; font-weight: 600; color: var(--ink-2); }
.step-progress { display: grid; gap: .5rem; }
.meter, .strength { display: block; height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
/* Filled by register.js with a transform, never a width, so it moves without a layout. */
.meter i, .strength i { display: block; height: 100%; border-radius: inherit; background: var(--sun); transform: scaleX(0); transform-origin: left;
                        transition: transform .3s var(--ease); }
html[dir="rtl"] .meter i, html[dir="rtl"] .strength i { transform-origin: right; }
.strength i.long-enough { background: var(--ok); }
@media (min-width: 56.25em) { .step-progress { display: none; } }

/* The page's one word for what just happened: a welcome back, a sign-out, a failure. */
.notice { padding: .75rem 1rem; border-radius: 1rem; background: var(--primary-soft); color: var(--primary-soft-ink); }
.notice.problem { background: var(--error-soft); color: var(--error-soft-ink); }
.notice:empty { display: none; }

/* Without script: what registering needs, and that the form needs JavaScript. */
.needs { display: grid; gap: .625rem; margin: 0; padding: 0; list-style: none; }
.needs li { display: flex; gap: .625rem; align-items: flex-start; }
.needs .i { margin-top: .2em; color: var(--ok); }
.warning { padding: .875rem 1rem; border-radius: 1rem; background: var(--amber-soft); color: var(--amber-ink); font-weight: 600; }

/* ---------- fields: 16 px at least, so a phone never zooms ---------- */
.field { position: relative; display: grid; gap: .375rem; min-width: 0; }
.field label { font-size: .92rem; font-weight: 600; }
.field label small { font-weight: 400; color: var(--ink-2); }
.reg input:not([type="radio"]):not([type="file"]), .reg textarea {
  width: 100%; min-height: 3.375rem; padding: 0 .875rem; border: 1.5px solid var(--ink-2); border-radius: .75rem;
  background: var(--card); color: var(--ink); font: inherit; font-size: max(16px, 1rem); }
.reg textarea { padding-block: .75rem; resize: vertical; }
.reg [aria-invalid="true"] { border-color: var(--error); }
.hint { font-size: .9rem; color: var(--ink-2); }
.hint.with-icon { display: flex; gap: .375rem; align-items: flex-start; }
.hint .i { margin-top: .2em; }
.error { font-size: .9rem; font-weight: 600; color: var(--error); }
.error:empty { display: none; }

/* A password and its eye, which never takes the field's focus. */
.secret { position: relative; display: block; }
.secret input { padding-inline-end: 3.5rem; }
.eye { position: absolute; inset-inline-end: .25rem; top: 50%; transform: translateY(-50%); display: grid; place-items: center;
       width: 2.75rem; height: 2.75rem; border: 0; border-radius: 50%; background: none; color: var(--ink-2); cursor: pointer; }
.eye[aria-pressed="true"] { background: var(--primary-soft); color: var(--primary-soft-ink); }

/* Standalone or chain: two cards of real radios. */
.choice { display: grid; gap: .625rem; margin: 0; padding: 0; border: 0; min-width: 0; }
.choice label { position: relative; display: grid; gap: .25rem; align-content: start; padding: 1rem; border-radius: 1.25rem; box-shadow: inset 0 0 0 1.5px var(--line);
                cursor: pointer; }
.choice span { font-size: .9rem; color: var(--ink-2); }
.choice label:has(:checked) { background: var(--primary-soft); color: var(--primary-soft-ink); box-shadow: inset 0 0 0 2.5px var(--primary); }
.choice label:has(:checked) span { color: inherit; }
.choice label:has(:focus-visible) { outline: 3px solid var(--primary); outline-offset: 3px; }
@media (min-width: 35em) { .choice { grid-template-columns: 1fr 1fr; } }

/* The six boxes of a code: Latin digits, left to right in both languages. */
.digits { display: flex; gap: .5rem; }
.reg .digit { flex: 1; min-width: 0; min-height: 3.75rem; padding: 0; text-align: center; font-family: var(--digits); font-size: 1.5rem; font-weight: 600; }
.links { display: flex; flex-wrap: wrap; gap: 0 1.25rem; }
.inline-form { display: grid; gap: .75rem; justify-items: start; }
.inline-form .field { width: 100%; }

/* Buttons: the way on fills the row, Back is quiet; a link is a text button. */
.actions { display: flex; gap: .625rem; align-items: center; margin-top: .25rem; }
.actions .btn[type="submit"] { flex: 1; }
.btn.quiet { background: none; color: var(--primary); padding-inline: 1.125rem; }
.btn[aria-busy="true"] { opacity: .6; pointer-events: none; }
.link { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0; border: 0; background: none; color: var(--primary);
        font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link:disabled { color: var(--ink-2); text-decoration: none; cursor: default; }
.sign-out { justify-self: end; font-size: .9rem; }
.saved { display: flex; gap: .375rem; align-items: center; font-size: .88rem; color: var(--ok); }

/* ---------- the pin, as text: no map tiles ---------- */
.pin { display: flex; flex-wrap: wrap; gap: .25rem .625rem; align-items: center; justify-self: start; padding: .375rem .875rem;
       border-radius: 999px; background: var(--tint); color: var(--ink-2); font-size: .88rem; font-weight: 600; }
.pin.set { background: var(--ok-soft); color: var(--ok); }
.pin span:empty { display: none; }
.by-choice { display: grid; gap: 1rem; }

/* ---------- files: dropped or chosen on a laptop, the camera on a phone ---------- */
.file { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop { position: relative; display: grid; gap: .75rem; justify-items: center; padding: 1rem; border: 2px dashed var(--ink-2); border-radius: 1rem; }
.drop.over { border-color: var(--primary); background: var(--primary-soft); }
.drop-label { display: grid; justify-items: center; gap: .375rem; width: 100%; padding: .75rem; text-align: center; cursor: pointer; }
.drop-label .i { font-size: 1.6rem; }
.drop-label small { color: var(--ink-2); font-size: .85rem; }
.drop:has(.file:focus-visible), .field:has(> .file:focus-visible) label { outline: 3px solid var(--primary); outline-offset: 3px; }
.camera { display: none; }
@media (pointer: coarse) { .camera { display: inline-flex; } }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(6rem, 1fr)); gap: .625rem; margin: 0; padding: 0; list-style: none; }
.tiles:empty { display: none; }
.tile { position: relative; display: grid; gap: .25rem; font-size: .8rem; color: var(--ink-2); }
.thumb { display: grid; place-items: center; aspect-ratio: 3 / 4; overflow: hidden; border-radius: .75rem; background: var(--tint);
         font-weight: 600; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.remove { position: absolute; top: .25rem; inset-inline-end: .25rem; display: grid; place-items: center; width: 2.75rem; height: 2.75rem;
          border: 0; border-radius: 50%; background: var(--ink); color: var(--page); cursor: pointer; }
.tile.uploading .remove { display: none; }
.tile.uploading .thumb::after { content: ""; width: 1.75rem; height: 1.75rem; border: 3px solid var(--line); border-top-color: var(--primary);
                                border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }
.optional-part { padding: .25rem 1rem; border-radius: 1rem; box-shadow: inset 0 0 0 1px var(--line); }
.optional-part[open] { display: grid; gap: 1rem; padding-bottom: 1rem; }
.optional-part summary { display: flex; flex-wrap: wrap; gap: .25rem .625rem; align-items: center; min-height: 3rem; cursor: pointer; }
.optional-part summary small { color: var(--ink-2); }
.optional-part label.btn { justify-self: start; }

/* ---------- review: one row each, its Edit at the end ---------- */
.summary-list { display: grid; margin: 0; }
.summary-list > div { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr) auto; gap: .625rem; align-items: center;
                      min-height: 3.5rem; padding-block: .375rem; border-top: 1px solid var(--line); }
.summary-list dt { font-size: .9rem; color: var(--ink-2); }
.summary-list dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.summary-list dd.missing { color: var(--error); }
.gap { font-weight: 600; color: var(--error); }
.gap.ready { color: var(--ok); }
.gap:empty { display: none; }

/* ---------- status: the pill, the reviewer's words, the timeline ---------- */
.reference { font-size: .9rem; color: var(--ink-2); }
.reference b { color: var(--ink); font-family: var(--mono); user-select: all; }
.pill { display: inline-flex; padding: .45em 1.1em; border-radius: 999px; font-weight: 600; }
.pill.waiting { background: var(--tint); color: var(--ink-2); }
.pill.asked { background: var(--amber-soft); color: var(--amber-ink); }
.pill.approved { background: var(--ok-soft); color: var(--ok); }
.pill.declined { background: var(--error-soft); color: var(--error-soft-ink); }
.reviewer { display: grid; gap: .25rem; padding: .875rem 1rem; border-radius: 1rem; background: var(--amber-soft); color: var(--amber-ink); }
.next { display: grid; gap: .875rem; justify-items: start; }
.ready { display: flex; gap: .5rem; align-items: flex-start; color: var(--ok); }
.ready .i { margin-top: .2em; }
.timeline { display: grid; margin: .25rem 0 0; padding: 0; list-style: none; }
.timeline li { position: relative; display: flex; gap: .75rem; align-items: flex-start; padding-bottom: 1rem; color: var(--ink-2); }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 15px; top: 2rem; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline b { position: relative; flex: none; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%;
              background: var(--tint); font-family: var(--digits); font-size: .85rem; }
.timeline b .i { display: none; }
.timeline .done b { background: var(--ok-soft); color: var(--ok); }
.timeline .done .number { display: none; }
.timeline .done b .i { display: block; }
.timeline li > span { display: grid; padding-top: .25rem; }
.timeline small { font-size: .8rem; }
.timeline .done, .timeline .now { color: var(--ink); }
.timeline .now { font-weight: 600; }
.timeline .now b { background: var(--sun); color: var(--on-sun); }
