/*
 * Settings hub and sections, notifications, device setup, archives,
 * and the notification-health banner (layouts/_notification_health).
 */

/* --- Notification health banner (every signed-in page) ------------------ */
#notification_health { padding: 0 1rem; }
#notification_health:empty { display: none; }
.notification-health { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 0.75rem; font-weight: 600; }
.notification-health a { white-space: nowrap; }

/* --- Shared bits ---------------------------------------------------------- */
.topbar .topbar__back { font-weight: 600; white-space: nowrap; }
.settings .section-title:first-child { margin-top: 0.5rem; }
.settings__icon { flex: none; width: 1.75rem; text-align: center; font-size: 1.15rem; line-height: 1; }
.settings__sub { display: block; }
.settings__version { margin-top: 2rem; text-align: center; }
.settings .list li { list-style: none; }
.settings .list > li + li { border-top: 1px solid var(--border); }
.settings li > form.grow { display: block; flex: 1; }
.settings .row > .grow, .push-toggle .grow { flex: 1; min-width: 0; }
.settings .card > h2 { margin: 0; font-size: 1.05rem; }
.settings .card p { margin: 0; }
.settings .card p + p { margin-top: 0.5rem; }
.settings-person-head .section-title { gap: 0.5rem; margin-bottom: 0.25rem; }
.settings-short-input { max-width: 8rem; }
.settings-color-input { width: 4rem; height: 2.75rem; padding: 0.2rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.settings-error { margin: 0.25rem 0; white-space: pre-wrap; word-break: break-word; font-size: 0.8rem; }
.form-errors.card ul { margin: 0.25rem 0 0; padding-left: 1.2rem; }

.settings-facts { display: grid; gap: 0.35rem; margin: 0.75rem 0 0; }
.settings-facts > div { display: flex; gap: 0.75rem; justify-content: space-between; align-items: baseline; }
.settings-facts dt { color: var(--muted); }
.settings-facts dd { margin: 0; text-align: right; min-width: 0; overflow-wrap: anywhere; }

/* --- Notifications -------------------------------------------------------- */
.push-toggle h2 { margin: 0; }
.push-toggle__icon { font-size: 1.6rem; }
.push-toggle__status { margin: 0.15rem 0 0; color: var(--muted); }
.push-toggle__actions { gap: 0.5rem; }
.push-device__current { display: none; }
.push-device.is-current .push-device__current { display: inline-flex; }
.push-device.is-current .push-device__remove { display: none; }
.settings-help p { margin: 0; }
.settings-help p + p { margin-top: 0.5rem; }

/* --- Device setup --------------------------------------------------------- */
.device-setup__once { margin: 0; max-width: none; }
.device-setup__steps { margin: 0; padding-left: 1.4rem; }
.device-setup__steps li + li { margin-top: 0.6rem; }
.device-setup__steps .btn { margin: 0.35rem 0; }
.device-setup__token { overflow-wrap: anywhere; user-select: all; }
.device-setup details summary { cursor: pointer; font-weight: 600; min-height: 2.75rem; display: flex; align-items: center; }
.qr-frame { display: flex; justify-content: center; padding: 0.5rem; background: #fff; border-radius: 10px; max-width: 20rem; margin-left: auto; margin-right: auto; }
.qr-frame svg { display: block; width: 100%; height: auto; }

.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li + li { margin-top: 0.5rem; }
.checklist .checklist { margin-top: 0.5rem; padding-left: 1.75rem; }
.checklist .checkbox { align-items: flex-start; }
.checklist input[type="checkbox"] { flex: none; width: 1.25rem; height: 1.25rem; margin: 0.1rem 0 0; }

/* --- Archives ------------------------------------------------------------- */
.archives-device h3 { margin: 0 0 0.5rem; font-size: 1rem; }
.archives-table { width: 100%; border-collapse: collapse; }
.archives-table th { text-align: left; font-weight: 600; color: var(--muted); padding: 0.25rem 0.4rem; border-bottom: 1px solid var(--border); }
.archives-table td { padding: 0.35rem 0.4rem; border-top: 1px solid var(--border); vertical-align: middle; }
.archives-table tr:first-child td { border-top: 0; }
.archives-table .num { text-align: right; white-space: nowrap; }
@media (max-width: 30rem) {
  .archives-table__exported { display: none; }
}
.archives .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Child's optional Frigga login (Settings → People → child). */
.settings-login { margin: 0.5rem 0 0; padding: 0.75rem; border: 1px solid var(--border); border-radius: 10px; }
.settings-login legend { padding: 0 0.35rem; }
.settings-login .hint { margin: 0; }
