/* New starter and leaver forms, and a ticket's checklist. Uses the variables and components of portal.css. */

/* The new-ticket page with four or five kinds to choose from: two rows on a wide page. */
.kinds.n4 .choices-grid { grid-template-columns: repeat(2, 1fr); }
.kinds.n5 .choices-grid { grid-template-columns: repeat(6, 1fr); }
.kinds.n5 .choice { grid-column: span 2; }
.kinds.n5 .choice:nth-child(n+4) { grid-column: span 3; min-height: 0; }
.kinds.n4 .choice, .kinds.n5 .choice { min-height: 132px; }

.pc-forms:empty { display: none; }
.pc .eq-step-title + .muted { max-width: 62ch; }

/* A switch: the checkbox itself is kept (invisible) so the keyboard and screen readers work as usual. */
.pc-switch { position: relative; }
.pc-switch input { position: absolute; left: 0; top: 2px; width: 44px; height: 26px; margin: 0; opacity: 0; cursor: pointer; }
.pc-switch label { display: flex; align-items: flex-start; gap: 14px; padding: 14px 16px; border: 1.5px solid var(--line-strong); border-radius: 14px; background: var(--surface); cursor: pointer; }
.pc-switch label:hover { border-color: var(--muted); }
.pc-track { position: relative; flex: none; width: 44px; height: 26px; margin-top: 1px; border-radius: 999px; background: var(--neutral); transition: background .15s; }
.pc-track::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); transition: transform .15s; }
.pc-switch input:checked + label { border-color: var(--brand); background: var(--blue-bg); }
.pc-switch input:checked + label .pc-track { background: var(--brand-solid); }
.pc-switch input:checked + label .pc-track::after { transform: translateX(18px); }
.pc-switch input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: 2px; }
.pc-switch-text { display: grid; gap: 2px; min-width: 0; }
.pc-switch-label { font-weight: 650; }
.pc-switch-hint { color: var(--muted); font-size: .88rem; line-height: 1.4; }
.pc-switch input:checked + label .pc-switch-hint { color: var(--blue-ink); }

/* The exact time access must stop: set apart, since it is the one answer that must not be wrong. */
.pc-exact { display: grid; gap: 10px; padding: 16px; border-radius: 14px; background: var(--amber-bg); color: var(--amber-ink); }
.pc-exact .field > label { color: var(--amber-ink); }
.pc-exact .field-hint { color: var(--amber-ink); }
.pc-exact[hidden] { display: none; }

/* A leaver's devices: each with what should happen to it. */
.pc-devicebox { gap: 12px; }
.pc-devices { display: grid; gap: 10px; }
.pc-device { display: grid; gap: 10px; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); }
.pc-device-name { display: flex; align-items: center; gap: 8px; font-weight: 650; min-width: 0; overflow-wrap: anywhere; }
.pc-device-name .icon { width: 20px; height: 20px; flex: none; color: var(--muted); }
.pc-device-name .btn { margin-left: auto; }
.pc-adddevice[hidden] { display: none; }

.pc-summary { padding: 16px; border-radius: var(--radius-s); background: var(--surface-2); }
.card > .pc-summary { padding: 0; background: none; }
.pc-next { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--blue-ink); font-weight: 600; font-size: .93rem; }
.pc-next .icon { width: 18px; height: 18px; flex: none; }
.pc-quiet { margin-top: 14px; }
.eq-summary + .banner { margin-top: 0; }

/* On the ticket: how far ClayGen has got. */
.pc-progress { display: grid; gap: 12px; }
.pc-progress .card-title { margin-bottom: 0; }
.pc-count { font-weight: 650; }
.pc-alldone { display: inline-flex; align-items: center; gap: 8px; color: var(--green-ink); }
.pc-alldone .icon { width: 20px; height: 20px; }
.pc-bar { height: 8px; border-radius: 999px; background: var(--neutral-bg); overflow: hidden; }
.pc-bar-fill { display: block; height: 100%; border-radius: 999px; background: var(--green); transition: width .3s; }
.pc-steps { display: grid; gap: 10px; list-style: none; margin: 4px 0 0; padding: 0; }
.pc-step { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; }
.pc-step-mark { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; border: 2px solid var(--line-strong); color: var(--muted); }
.pc-step-mark .icon { width: 13px; height: 13px; stroke-width: 3; }
.pc-step.done .pc-step-mark { background: var(--green); border-color: var(--green); color: #fff; }
.pc-step.skipped .pc-step-mark { background: var(--neutral-bg); border-color: var(--neutral-bg); }
.pc-step-text { display: grid; gap: 1px; min-width: 0; }
.pc-step-title { font-weight: 550; overflow-wrap: anywhere; }
.pc-step.skipped .pc-step-title { color: var(--muted); }
.pc-step-when { color: var(--muted); font-size: .86rem; }
.pc-step.done .pc-step-when { color: var(--green-ink); }

@media (max-width: 720px) {
  .kinds.n4 .choices-grid, .kinds.n5 .choices-grid { grid-template-columns: 1fr; }
  .kinds.n5 .choice, .kinds.n5 .choice:nth-child(n+4) { grid-column: auto; }
  .kinds.n4 .choice, .kinds.n5 .choice { min-height: 0; }
  .pc-switch label { padding: 12px 14px; gap: 12px; }
  .pc-device-name .btn { margin-left: auto; }
}

@media (forced-colors: active) {
  .pc-track { border: 1px solid CanvasText; }
  .pc-switch input:checked + label .pc-track { background: Highlight; }
  .pc-step.done .pc-step-mark { background: Highlight; }
}
