/*! push-page.css 1.0.0 | DJ2000-UK/app-workbench */
/* More → Notifications (push-page.mjs), the same in every app: each notification its
   name and a switch, when it comes on a pill under it, and what can change opening
   under the pill: the time wheels, the days as seven tiles four to a row, one choice. Panels and
   their headings are the app's own (pages.css); this lays out the rows inside them.

   Unlayered and scoped to .push-page, as pages.css is to .settings-page, so it wins
   over an app's own rules on this page and touches nothing else. Every colour is one
   of the family's tokens, so every palette and Vibrancy and Contrast work. */

.push-page { display: grid; gap: var(--push-gap, var(--stack, 16px)); }
.push-page .push-groups { display: grid; gap: var(--push-gap, var(--stack, 16px)); transition: opacity .2s ease; }
.push-page .push-groups.is-off { opacity: .45; }

.push-page .push-list { display: grid; }
.push-page .push-item { display: grid; min-width: 0; padding-bottom: 6px; }
.push-page .push-item + .push-item { padding-top: 6px; border-top: 1px solid var(--line); }
.push-page .push-row {
  display: flex;
  min-width: 0;
  min-height: 52px;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}
.push-page .push-name {
  min-width: 0;
  color: var(--ink);
  font-family: var(--font-sans, inherit);
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.3;
  text-transform: none;
}
.push-page .push-item.is-off .push-name { color: var(--muted-bright); }
.push-page .push-note {
  display: block;
  margin: -6px 0 6px;
  color: var(--muted-bright);
  font-size: .82rem;
  line-height: 1.4;
}

/* The switch: the family's (djcns.css .switch), drawn here so every app's page has it. */
.push-page .push-switch {
  position: relative;
  flex: 0 0 auto;
  width: 64px;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.push-page .push-switch::before {
  position: absolute;
  inset: 3px 0;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  content: "";
  transition: background-color .18s ease, border-color .18s ease;
}
.push-page .push-switch::after {
  position: absolute;
  top: 7px;
  left: 4px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--muted-bright);
  content: "";
  transition: transform .18s ease, background-color .18s ease;
}
.push-page .push-switch[aria-checked="true"]::before {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 35%, var(--panel, transparent));
}
.push-page .push-switch[aria-checked="true"]::after { background: var(--accent); transform: translateX(26px); }
.push-page .push-switch:focus-visible { outline: 2px solid var(--focus, var(--accent)); outline-offset: 2px; }

/* When it comes, on a pill that opens what can change. */
.push-page .push-when {
  justify-self: start;
  max-width: 100%;
  min-height: 44px;
  margin: 0 0 6px;
  padding: 0 14px;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: color-mix(in srgb, var(--ink) 9%, transparent);
  color: var(--ink);
  font-family: var(--font-sans, inherit);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: 0;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color .2s ease, background-color .2s ease, opacity .2s ease;
}
.push-page .push-when[aria-expanded="true"] {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
}
.push-page .push-item.is-off .push-when { opacity: .6; }

/* What can change: the time wheels, the days, one choice. */
.push-page .push-edit { display: grid; gap: 12px; padding: 4px 0 10px; }
.push-page .push-edit[hidden] { display: none; }
.push-page .push-field { display: grid; min-width: 0; gap: 8px; }
.push-page .push-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.push-page .push-field__label {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
/* Four to a row: seven in one would be under 44 px wide on a phone. */
.push-page .push-days { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.push-page .push-day,
.push-page .push-choice button {
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 0 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--ink) 3%, transparent);
  box-shadow: none;
  color: var(--muted-bright);
  font-family: var(--font-sans, inherit);
  font-size: .85rem;
  font-weight: 800;
  letter-spacing: .01em;
  text-transform: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.push-page .push-choice { display: flex; flex-wrap: wrap; gap: 8px; }
.push-page .push-choice button { flex: 1 1 auto; min-height: 52px; padding: 8px 12px; }
.push-page .push-day[aria-pressed="true"],
.push-page .push-choice button[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--ink);
}
.push-page .push-foot { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .push-page .push-groups,
  .push-page .push-switch::before,
  .push-page .push-switch::after,
  .push-page .push-when { transition: none; }
}
