/* Christmas lights form and confirm pages. Colours come from /styles.css tokens only. */
.lights {
  --field-border: color-mix(in srgb, var(--ink-2) 75%, var(--surface));
}
.lights [hidden] { display: none !important; }
.lights .step { display: grid; gap: 18px; max-width: 560px; }
.lights .hint { font-size: 15px; color: var(--ink-2); margin: 0; }
.lights .optional { color: var(--ink-2); font-weight: 400; }
.lights .field { display: grid; gap: 6px; font-weight: 500; }
.lights .field > .hint { font-weight: 400; }
.lights input:not([type=checkbox]):not([type=file]), .lights textarea {
  font: 400 17px/1.4 "IBM Plex Sans", system-ui, sans-serif; padding: 11px 13px; min-height: 46px; width: 100%; box-sizing: border-box;
  border-radius: 10px; border: 1px solid var(--field-border); background: var(--surface); color: var(--ink);
}
.lights textarea { resize: vertical; min-height: 110px; }
.lights input::placeholder, .lights textarea::placeholder { color: var(--ink-2); }
.lights input:focus-visible, .lights textarea:focus-visible, .lights .btn:focus-visible, .lights .btn-secondary:focus-visible, .lights input[type=file]:focus-visible + .picker-btn {
  outline: 2px solid var(--accent-text); outline-offset: 2px;
}
.lights input[aria-invalid=true], .lights textarea[aria-invalid=true] { border-color: var(--gold); border-width: 2px; }
.lights input[type=checkbox] { accent-color: var(--accent); width: 20px; height: 20px; margin: 2px 0 0; flex: none; }
.lights .count { justify-self: end; font-variant-numeric: tabular-nums; }
.lights fieldset { border: 1px solid var(--field-border); border-radius: 14px; padding: 18px 20px 22px; margin: 0; display: grid; gap: 16px; min-width: 0; }
.lights legend { padding: 0 8px; margin-left: -8px; font-family: Fraunces, Georgia, serif; font-size: 20px; line-height: 1.2; }
.lights .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lights .row.address { grid-template-columns: 110px 1fr; }
.lights .choices { display: grid; gap: 12px; }
.lights .choice { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-weight: 400; }
.lights .choice > span { display: grid; gap: 2px; }
.lights .btn, .lights .btn-secondary {
  justify-self: start; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px;
  border-radius: 999px; font: 600 16px/1 "IBM Plex Sans", system-ui, sans-serif; cursor: pointer; text-decoration: none;
}
.lights .btn { border: 0; background: var(--accent); color: var(--on-accent); }
.lights .btn-secondary { border: 1px solid var(--field-border); background: transparent; color: var(--ink); }
.lights .btn:hover:not(:disabled) { opacity: .9; }
.lights .btn-secondary:hover { background: var(--muted); }
.lights .btn:disabled { opacity: .5; cursor: not-allowed; }
.lights [aria-busy=true] { cursor: progress; }
.lights .picker { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-weight: 400; }
.lights .picker-thumb { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; border: 1px solid var(--line); background: var(--muted); }
.lights .picker-name { color: var(--ink-2); font-size: 15px; overflow-wrap: anywhere; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.lights .notice { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin: 0; }
.lights .field-error, .lights .form-error { color: var(--ink); font-weight: 600; font-size: 15px; margin: 0; }
.lights .field-error::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); margin-right: 8px; vertical-align: 1px; }
.lights .field-error:empty::before { display: none; }
.lights .field-error:empty, .lights .form-error:empty { display: none; }
.lights .again { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.lights .again h2 { font-size: 24px; margin: 0; }
.lights .again form { display: grid; gap: 14px; }
@media (max-width: 520px) {
  .lights .row, .lights .row.address { grid-template-columns: 1fr; }
}

/* A heading the page moves focus to (after a step finishes) needs no ring: it is not something to type in. */
.lights h2[tabindex="-1"]:focus { outline: none; }
.lights #remove-confirm { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.lights #remove-confirm > p { flex-basis: 100%; margin: 0; }
.lights #result:focus { outline: none; }
.lights #share-link { overflow-wrap: anywhere; }
.lights #share-box h2 { font-size: 20px; margin: 0; }
