/* NHS nomination form: the four-step registration form on /nominate-wilmslow-pharmacy/.
   Loaded only where the [wilmslow_nomination_form] shortcode renders.

   The colours are written as NHS blue values, NOT the site's teal tokens. The theme's
   teal-to-blue remap only rewrites inline style="" attributes, never rules inside a
   stylesheet, so teal written here would render literally teal.
     #0a5aa8 accent   #0d2b4e heading   #e4edf7 selected fill

   Every tappable thing is at least 44px tall, and the whole form is built to fit a
   375px-wide phone with nothing sideways to scroll. */

.wph-nom {
  --wph-nom-accent: #0a5aa8;
  --wph-nom-accent-dark: #084b8d;
  --wph-nom-heading: #0d2b4e;
  --wph-nom-fill: #e4edf7;
  --wph-nom-line: #cbd8e8;
  --wph-nom-edge: #d5e0ee;
  --wph-nom-body: #475569;
  --wph-nom-bad: #b3261e;
  --wph-nom-tap: 44px;

  box-sizing: border-box;
  max-width: 800px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--wph-nom-edge);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(13, 43, 78, .05), 0 14px 32px rgba(13, 43, 78, .07);
  padding: clamp(16px, 4vw, 30px);
  color: var(--wph-nom-heading);
  font-size: 15px;
  line-height: 1.55;
  text-align: left;
}

.wph-nom *,
.wph-nom *::before,
.wph-nom *::after {
  box-sizing: border-box;
}

/* ------------------------------------------------------------ progress bar */

.wph-nom-progress {
  margin: 0 0 22px;
}

.wph-nom-progress-text {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--wph-nom-accent);
}

.wph-nom-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--wph-nom-fill);
  overflow: hidden;
}

.wph-nom-bar-fill {
  display: block;
  height: 100%;
  width: 25%;
  border-radius: 999px;
  background: var(--wph-nom-accent);
  transition: width .25s ease;
}

.wph-nom-steplist {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.wph-nom-steplist-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  line-height: 1.3;
  color: #7488a3;
}

.wph-nom-steplist-num {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1.5px solid var(--wph-nom-edge);
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  color: #7488a3;
}

.wph-nom-steplist-item[aria-current="step"] {
  color: var(--wph-nom-heading);
  font-weight: 700;
}

.wph-nom-steplist-item[aria-current="step"] .wph-nom-steplist-num {
  border-color: var(--wph-nom-accent);
  background: var(--wph-nom-accent);
  color: #fff;
}

.wph-nom-steplist-item.is-done .wph-nom-steplist-num {
  border-color: var(--wph-nom-accent);
  background: var(--wph-nom-fill);
  color: var(--wph-nom-accent);
}

/* ------------------------------------------------------------- step layout */

.wph-nom-heading {
  margin: 0 0 4px;
  font-size: 21px;
  line-height: 1.25;
  color: var(--wph-nom-heading);
}

.wph-nom-subhead {
  margin: 22px 0 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--wph-nom-heading);
}

.wph-nom-step > .wph-nom-heading + .wph-nom-field,
.wph-nom-step > .wph-nom-heading + .wph-nom-row {
  margin-top: 18px;
}

.wph-nom-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0 18px;
}

.wph-nom-row > .wph-nom-field {
  flex: 1 1 220px;
  min-width: 0;
}

.wph-nom-field {
  margin: 0 0 18px;
}

/* ---------------------------------------------------------- labels, inputs */

.wph-nom-label {
  display: block;
  margin: 0 0 6px;
  font-weight: 600;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--wph-nom-heading);
}

.wph-nom-legend {
  display: block;
  padding: 0;
  margin: 0 0 8px;
  width: 100%;
}

.wph-nom-group {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.wph-nom-hint {
  margin: -2px 0 8px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--wph-nom-body);
}

.wph-nom-input {
  display: block;
  width: 100%;
  min-height: var(--wph-nom-tap);
  border: 1px solid var(--wph-nom-line);
  border-radius: 9px;
  padding: 11px 13px;
  font: inherit;
  font-size: 16px; /* 16px stops iOS zooming in when the field is tapped. */
  background: #fff;
  color: var(--wph-nom-heading);
}

.wph-nom-input:focus {
  border-color: var(--wph-nom-accent);
  outline: 2px solid rgba(10, 90, 168, .35);
  outline-offset: 1px;
}

textarea.wph-nom-input {
  min-height: 96px;
  resize: vertical;
}

select.wph-nom-input {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10'%3E%3Cpath fill='%230d2b4e' d='M1.4 0 8 6.2 14.6 0 16 1.4 8 9 0 1.4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 13px 8px;
}

.wph-nom-input[aria-invalid="true"] {
  border-color: var(--wph-nom-bad);
  border-width: 2px;
}

/* ------------------------------------------------- radios and tick boxes */

.wph-nom-choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wph-nom-choice {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  min-height: var(--wph-nom-tap);
  margin: 0;
  padding: 12px 15px;
  background: #fff;
  border: 1.5px solid var(--wph-nom-edge);
  border-radius: 10px;
  line-height: 1.45;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.wph-nom-choice:hover {
  border-color: var(--wph-nom-accent);
}

.wph-nom-choice input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--wph-nom-accent);
}

.wph-nom-choice input:focus-visible {
  outline: 2px solid var(--wph-nom-accent);
  outline-offset: 2px;
}

.wph-nom-choice.is-chosen {
  border-color: var(--wph-nom-accent);
  background: var(--wph-nom-fill);
}

.wph-nom-choice--single {
  align-items: flex-start;
}

.wph-nom-group[aria-invalid="true"] .wph-nom-choice,
.wph-nom-choice--single[aria-invalid="true"] {
  border-color: var(--wph-nom-bad);
}

.wph-nom-consent {
  background: #f6f9fd;
  border: 1px solid var(--wph-nom-edge);
  border-radius: 12px;
  padding: 16px 16px 1px;
  margin: 0 0 18px;
}

/* ---------------------------------------------------------------- messages */

.wph-nom-error {
  margin: 7px 0 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--wph-nom-bad);
}

.wph-nom-alert {
  margin: 0 0 18px;
  padding: 14px 16px;
  border-left: 4px solid var(--wph-nom-bad);
  border-radius: 8px;
  background: #fdf1f0;
  font-weight: 600;
  color: #8a1c16;
}

.wph-nom-noscript {
  margin: 18px 0 0;
  padding: 14px 16px;
  border-left: 4px solid var(--wph-nom-accent);
  border-radius: 8px;
  background: var(--wph-nom-fill);
}

/* ----------------------------------------------------------------- buttons */

.wph-nom-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 24px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--wph-nom-edge);
}

.wph-nom-btn {
  min-height: var(--wph-nom-tap);
  border: 0;
  border-radius: 10px;
  padding: 13px 30px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.wph-nom-btn:focus-visible {
  outline: 3px solid var(--wph-nom-accent);
  outline-offset: 2px;
}

.wph-nom-btn--next,
.wph-nom-btn--submit {
  margin-left: auto;
  background: var(--wph-nom-accent);
  color: #fff;
}

.wph-nom-btn--next:hover,
.wph-nom-btn--submit:hover {
  background: var(--wph-nom-accent-dark);
}

.wph-nom-btn--back {
  background: #fff;
  border: 1.5px solid var(--wph-nom-line);
  color: var(--wph-nom-heading);
  padding: 12px 24px;
}

.wph-nom-btn--back:hover {
  border-color: var(--wph-nom-accent);
  color: var(--wph-nom-accent);
}

.wph-nom-btn[disabled] {
  opacity: .6;
  cursor: default;
}

/* --------------------------------------------------------- thank-you panel */

.wph-nom-done {
  border-left: 4px solid var(--wph-nom-accent);
  border-radius: 10px;
  background: var(--wph-nom-fill);
  padding: 22px 24px;
}

.wph-nom-done h3 {
  margin: 0 0 10px;
  font-size: 21px;
  line-height: 1.25;
  color: var(--wph-nom-heading);
}

.wph-nom-done ol {
  margin: 0;
  padding-left: 22px;
  color: var(--wph-nom-body);
}

.wph-nom-done li {
  margin: 0 0 6px;
}

.wph-nom-done p {
  margin: 14px 0 0;
  color: var(--wph-nom-body);
}

/* ---------------------------------------------------------- the honey pot */

.wph-nom-hp {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------- on phones */

@media (max-width: 480px) {
  .wph-nom {
    border-radius: 12px;
  }

  .wph-nom-row {
    gap: 0;
  }

  .wph-nom-row > .wph-nom-field {
    flex: 1 1 100%;
  }

  .wph-nom-steplist-name {
    display: none;
  }

  .wph-nom-steplist-item[aria-current="step"] .wph-nom-steplist-name {
    display: inline;
  }

  .wph-nom-nav {
    gap: 10px;
  }

  .wph-nom-btn {
    flex: 1 1 100%;
    padding: 13px 20px;
  }

  .wph-nom-btn--next,
  .wph-nom-btn--submit {
    margin-left: 0;
    order: -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wph-nom-bar-fill {
    transition: none;
  }
}

/* Privacy line above "Register now" (October 2026). */
.wph-nom-privacy {
  margin: 20px 0 4px;
  padding: 14px 16px;
  border-left: 4px solid #0b4a43;
  background: #f1f7f6;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.55;
  color: #1e293b;
}
.wph-nom-privacy p { margin: 0 0 8px; }
.wph-nom-privacy p:last-child { margin-bottom: 0; }
.wph-nom-privacy a { color: #0b4a43; text-decoration: underline; }
