/*
 * V9 PROVENANCE (WRITER-V9, merge of version 9; documentation only, no logic changed)
 * Patches: V8C4 D4 (progress circles: white fill, green border for a step not saved), D4b, D4c and D4g (centring of every
 *   input and select without !important; the centring was replaced by V9B item 1: Hebrew fields right, dir="ltr" fields left),
 *   Serves: owner answer 16 of 2026-12-01 12:16, decision 13:36:14 and order 14:04. Output: look only.
 */
/*
 * errors.css - progress circles, step titles and the error summary box of the 2513 form (C21).
 * What it does: draws seven numbered circles (1 to 7, no percent, no check mark) from right to left with a
 *   connecting line and the step title, and the message area div.f2513-errsum that errors.js (C09) fills; the
 *   circle state class (is-done, is-current, is-todo, is-error) is set by nav.js (C08) on each li of ul.form-progress.
 * Input: the markup of the strip drawn once for the page by the shortcode (SP01): ul.form-progress, li,
 *   span.step-progress and span.step-title.
 * Output: layout and colours in the user's browser. Business purpose: the user sees at which of the seven steps
 *   he is (owner order 19:20, SINGLEPAGE 7.1): a future step white with a green border, the current step
 *   green with a white number, a completed step dark green with a white number.
 * Layout: desktop (1024 pixels and wider) one row of seven with the step titles; tablet (601 to 1023) one row of
 *   seven without titles; phone (600 and narrower) circles 1 to 4 in the first row and 5 to 7 centred below.
 * Every rule starts with .f2513-form (the progress rules also .f2513-strip, so they win over the base.css rules of the same list whatever the load order), so the registration form is not changed; no switch.
 * The site rules it overrides: style-main.css lines 7311 to 7333 (.forms .form-progress, li .step-progress,
 *   li:before, .forms .form-title); the selector ul.form-progress is more specific than the site rules.
 * Contrast (SINGLEPAGE 7.1 item 6): white on #2E9E2E is 3.47 to 1 (large bold text, 19 pixels), white on #006B00
 *   is 6.77 to 1, #008A00 on white is 4.53 to 1.
 */

/* The variables of this file; every one has a comment with what it is, type, source, use and purpose. */
:root {
  /* What: diameter of a progress circle; type: length; source: site css line 7311; used by: the circles. */
  --f2513-step-size: 40px;
  /* What: green of the frame and the number of a future circle (white fill, V8B item 4); type: colour;
     source: SINGLEPAGE 7.1 item 3; used by: is-todo; purpose: contrast 4.53 to 1 with white. */
  --f2513-step-green: #008A00;
  /* What: fill of the current circle; type: colour; source: V7-T22A (owner order 2026-11-30 23:21, KB PM-0407: the
     active circle is dark green with a white number); used by: is-current; purpose: "you are here" is the dark
     green circle. The value is the dark green that the base code already uses for circles (--f2513-step-done,
     #006B00), not #305f1e (that colour exists in states.css only for the check mark, line 301), as the owner
     order says to keep a dark green that the base already sets. This is the only active definition of the
     variable (this file loads after base.css, assets.php line 160); a different dark green is a change of this line. */
  --f2513-step-current: #006B00;
  /* What: fill of a completed circle; type: colour; source: SINGLEPAGE 7.1 item 5; used by: is-done;
     purpose: dark green with a white number (6.77 to 1). */
  --f2513-step-done: #006B00;
  /* What: text colour of the step title; type: colour; source: site css; used by: step-title. */
  --f2513-step-text: #1e5f30;
  /* What: dark grey of the title text of a step; type: colour; source: site css
     (#4B5254, .forms .form-title); used by: form-title. */
  --f2513-text-gray: #4B5254;
  /* What: white of circle backgrounds, the number on a filled circle and the summary box; type: colour;
     source: site css; used by: step-progress, is-todo, is-error, errsum. */
  --f2513-white: #fff;
  /* What: error colour of the circle; type: colour; source: site css (#f25165);
     used by: is-error. */
  --f2513-error: #f25165;
  /* What: colour of the visible focus frame; type: colour; source: architect (gov.uk pattern);
     used by: form-title focus; purpose: keyboard users see where the focus is. */
  --f2513-focus: #0b57d0;
}

/* The strip: seven equal parts, the first circle on the right (the form is dir="rtl"). */
.f2513-strip.f2513-form ul.form-progress {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
}

.f2513-strip.f2513-form ul.form-progress li {
  position: relative;
  flex: 0 0 auto;
  width: calc(100% / 7);
  max-width: 110px;
  text-align: center;
}

/* UI1 item 12: base.css also draws each li as a 36px circle (its ul.form-progress rules, kept there). That made two
   circles, one inside the other. This file loads after base.css, so these rules take the circle look off the li and
   leave only span.step-progress as the circle. Input: the li of ul.form-progress. Output: a plain box for the circle.
   Business purpose: one clean circle per step, numbered 1 to 7. */
.f2513-strip.f2513-form ul.form-progress {
  gap: 0;
}

.f2513-strip.f2513-form ul.form-progress li,
.f2513-strip.f2513-form ul.form-progress li.is-current,
.f2513-strip.f2513-form ul.form-progress li.is-done {
  display: block;
  height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

/* The circle: the number only; the state classes below set the colours. */
.f2513-strip.f2513-form ul.form-progress .step-progress {
  position: relative;
  z-index: 1;
  display: block;
  box-sizing: border-box;
  margin: 0 auto;
  width: var(--f2513-step-size);
  height: var(--f2513-step-size);
  border: 1px solid var(--f2513-step-green);
  border-radius: 50%;
  background: var(--f2513-white);
  color: var(--f2513-step-green);
  font: 700 19px/38px Arial, sans-serif;
}

/* A circle still to do or not saved (owner answer 16 of 2026-12-01 12:16, V8B item 4: the new rule replaces V7
   topic 14): white fill, green border, green number. */
.f2513-strip.f2513-form ul.form-progress li.is-todo .step-progress {
  background: var(--f2513-white);
  border-color: var(--f2513-step-green);
  color: var(--f2513-step-green);
}

/* The current circle (V7-T22A, owner order 23:21): dark green fill of --f2513-step-current and a white number; the
   border and the line height are those of the base circle (1px, 38px), so the number stays in the middle. */
.f2513-strip.f2513-form ul.form-progress li.is-current .step-progress {
  background: var(--f2513-step-current);
  border-color: var(--f2513-step-current);
  color: var(--f2513-white);
}

/* A completed circle: dark green, white number, no check mark. */
.f2513-strip.f2513-form ul.form-progress li.is-done .step-progress {
  background: var(--f2513-step-done);
  border-color: var(--f2513-step-done);
  color: var(--f2513-white);
}

/* A circle with an error (V10B_05, owner request V10B: the circle never turns into an X): the number stays; the border
   and the number are red on white. #f25165 on white is about 3.4 to 1, above 3 to 1 for bold text of 19px. */
.f2513-strip.f2513-form ul.form-progress li.is-error .step-progress {
  border-color: var(--f2513-error);
  background: var(--f2513-white);
  color: var(--f2513-error);
}

/* The step title under the circle: 14 pixels, shown only on a desktop. */
.f2513-strip.f2513-form ul.form-progress .step-title {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  color: var(--f2513-step-text);
}

/* Tablet and phone: no step titles, so seven circles fit in one row without a horizontal scroll. */
@media (max-width: 1023px) {
  .f2513-strip.f2513-form ul.form-progress .step-title {
    display: none;
  }
}

/* Phone (V7-T22A: the threshold is 590 pixels, the same as the pairs threshold, currengeformsSecond.css lines 1139 to
   1141, owner order 23:21): circles 1 to 4 in the first row and 5 to 7 centred in the second row; no line between 4
   and 5. From 591 pixels all seven circles are in one row. */
@media (max-width: 590px) {
  .f2513-strip.f2513-form ul.form-progress {
    flex-wrap: wrap;
    max-width: none;
    margin-inline: 0;
  }

  .f2513-strip.f2513-form ul.form-progress li {
    flex: 0 0 25%;
    width: 25%;
    max-width: 25%;
    margin-bottom: 10px;
  }

}

/* Text for screen readers only: clipped, but still read aloud. */
.f2513-form .f2513-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* The step title of a screen: the look of .forms .form-title; the frame shows only for keyboard focus. */
.f2513-form .form-title {
  font-size: 24px;
  color: var(--f2513-text-gray);
  text-align: center;
}

.f2513-form .form-title:focus {
  outline: none;
}

.f2513-form .form-title:focus-visible {
  outline: 3px solid var(--f2513-focus);
  outline-offset: 2px;
}

/* V9B items 11 and 12 (owner orders 16:59, 17:40, 18:20): the only message area of a step, above the step buttons and
   below all the fields. Always in the page, at least 60px high, the text centred in that height, red and bold, the font
   and size of the form, no frame, no background, no focus frame, so a message never moves the layout of the page. */
.f2513-form .f2513-errsum {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 60px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  direction: rtl;
  text-align: right;
  color: var(--f2513-invalid-text);
  font-weight: 700;
}

.f2513-form .f2513-errsum p {
  margin: 0;
  font-weight: 700;
}

.f2513-form .f2513-errsum:focus {
  outline: none;
}

/* V9B item 1 (owner order 2026-12-01 16:59, answer 17:37 option B): centring is for the PDF only; the form fields are
   not centred. Hebrew fields: right. Fields marked dir="ltr" (Latin text and numbers: e-mail, phone, id, deduction
   file, account, branch number, amount, receiver details and address): left. Replaces the centring block of D4c and D4g
   (owner decision 13:36). No !important; the specificity is computed by test_v9b_align.js. */
.f2513-form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]):not([type="range"]):not([type="color"]),
.f2513-form.f2513-form select,
.f2513-form.f2513-form select[dir] {
  text-align: right;
  text-align-last: right;
}

.f2513-form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]):not([type="range"]):not([type="color"])::placeholder {
  text-align: right;
}

.f2513-form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]):not([type="range"]):not([type="color"])[dir="ltr"],
.f2513-form.f2513-form.f2513-form select[dir="ltr"] {
  text-align: left;
  text-align-last: left;
}

.f2513-form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]):not([type="range"]):not([type="color"])[dir="ltr"]::placeholder {
  text-align: left;
}

.f2513-form.f2513-form select option {
  text-align: start;
  text-align-last: auto;
}

/* V14 (owner order 2026-12-03, REPORT_V13_DIAG item 11): the message area keeps its place above the step buttons on every
   screen, also when a script has set the attribute hidden on it while it is empty; it is then invisible but not removed
   from the layout. When a script removes the attribute (a message to show) it is shown as before. */
.f2513-form .f2513-errsum[hidden] {
  display: flex !important;
  visibility: hidden;
}
