/* Settings > Notifications: this device's push state, the person's devices, and a Push and
   Email switch per kind. Its own file so two builders never edit the same stylesheet tail.
   Tokens only, from portal.css (both themes): --ink, --ink-2, --muted, --line, --canvas,
   --surface, --brand-ink, --radius-card, --radius-control. The switches are portal.css's own
   .switch-row / .switch-input / .switch-track. */

.ns-panel { display: grid; gap: 14px; padding: 24px 28px 26px; }
.ns-panel + .ns-panel { margin-top: 16px; }
.ns-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.ns-title { font-size: 16px; line-height: 1.4; margin: 0; }
.ns-head .badge { font-size: 12px; }
.ns-message { margin: 0; color: var(--ink-2); line-height: 1.6; max-width: 62ch; }
.ns-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.ns-panel > .inline-status { margin: 0; }
.ns-panel > .inline-status:empty { display: none; }

.ns-devices { display: grid; gap: 8px; padding-top: 6px; border-top: 1px solid var(--line); }
.ns-subtitle { font-size: 13px; font-weight: 600; color: var(--muted); margin: 8px 0 0; }
.ns-device-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ns-device {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--canvas);
}
.ns-device-name { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; min-width: 0; }
.ns-device-label { color: var(--ink); font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.ns-device-name .badge { font-size: 11px; }
.ns-device-meta { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }

.ns-note { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.ns-link { color: var(--brand-ink); text-decoration: underline; text-underline-offset: 3px; }
.ns-hint { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }

.ns-grid { display: grid; border: 1px solid var(--line); border-radius: var(--radius-card); overflow: hidden; }
.ns-grid-head, .ns-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px 88px;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
}
.ns-grid-head { background: var(--canvas); color: var(--muted); font-size: 12px; font-weight: 500; }
.ns-grid-channel { text-align: center; }
.ns-row { border-top: 1px solid var(--line); background: var(--surface); min-height: 52px; }
.ns-kind { color: var(--ink); font-size: 14px; line-height: 1.45; }
.ns-switch { justify-content: center; }
/* Wide screens name the columns once in the head row; each switch still has its own label. */
.ns-switch .ns-switch-text {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

@media (max-width: 760px) {
  .ns-panel { padding: 18px 16px 20px; }
  .ns-actions .button { flex: 1 1 100%; justify-content: center; }
  .ns-device { grid-template-columns: minmax(0, 1fr) auto; }
  .ns-device-meta { grid-column: 1; grid-row: 2; }
  .ns-device .ns-remove { grid-column: 2; grid-row: 1 / span 2; }
  /* A phone stacks each kind: its name, then Push and Email side by side, each named. */
  .ns-grid-head { display: none; }
  .ns-row { grid-template-columns: 1fr 1fr; gap: 6px 16px; padding: 12px 14px; }
  .ns-grid-head + .ns-row { border-top: 0; }
  .ns-kind { grid-column: 1 / -1; font-weight: 600; }
  .ns-switch { justify-content: flex-start; }
  .ns-switch .ns-switch-text {
    position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; white-space: normal;
  }
}
