/* ───────────────────────────────────────────────────────────────────────────
   settings-notifications.css — Settings → Notifications (app IA PR 4).
   The look of the old notifications.html, moved here under .notif-* names so
   it cannot collide with Settings' own .toggle-* / .pill rules. Markup and
   behaviour: js/settings-notifications.js. Tokens only (css/penna-tokens.css).
   ─────────────────────────────────────────────────────────────────────────── */

.notif-card { max-width: 760px; }

.notif-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.notif-desc {
  margin: 0;
  flex: 1 1 260px;
  font-size: .88rem;
  line-height: 1.5;
  color: var(--slate-500);
}
.notif-loading {
  padding: 12px 0;
  font-size: .88rem;
  color: var(--slate-400);
}

.notif-category {
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  margin-bottom: 12px;
  overflow: hidden;
}
.notif-category > summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: .93rem;
  color: var(--slate-700);
  background: var(--slate-50, var(--paper-hi));
  user-select: none;
}
.notif-category > summary::-webkit-details-marker { display: none; }
.notif-category > summary::before {
  content: '▶';
  font-size: .65rem;
  color: var(--slate-400);
  transition: transform .15s;
  flex-shrink: 0;
}
.notif-category[open] > summary::before { transform: rotate(90deg); }
.notif-category__desc {
  font-size: .78rem;
  color: var(--slate-400);
  font-weight: 400;
  margin-left: auto;
  text-align: right;
}
.notif-category__body { border-top: 1px solid var(--slate-200); }
.notif-category__none {
  padding: 14px 18px;
  font-size: .83rem;
  color: var(--slate-400);
}

.notif-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--slate-200);
}
.notif-row:last-child { border-bottom: none; }
.notif-label {
  flex: 1;
  min-width: 0;
  font-size: .88rem;
  color: var(--slate-700);
}
.notif-label--locked { color: var(--slate-400); }
.notif-lock {
  display: inline-block;
  margin-left: 4px;
  vertical-align: -2px;
  color: var(--slate-400);
}
/* reset.css makes every svg a block, which would drop the lock under the label. */
.notif-lock svg { display: inline-block; vertical-align: top; }
.notif-row__right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.notif-saved {
  font-size: .75rem;
  color: var(--success);
  font-weight: 600;
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
  min-width: 40px;
}
.notif-saved.show { opacity: 1; }

/* Master toggle */
.notif-toggle {
  position: relative;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}
.notif-toggle__input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.notif-toggle__track {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: var(--slate-300);
  cursor: pointer;
  transition: background .15s;
}
.notif-toggle__input:checked + .notif-toggle__track { background: var(--accent); }
.notif-toggle__input:disabled + .notif-toggle__track { opacity: .45; cursor: not-allowed; }
.notif-toggle__input:focus-visible + .notif-toggle__track { outline: 2px solid var(--accent); outline-offset: 2px; }
.notif-toggle__track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--paper-hi);
  transition: left .15s;
}
.notif-toggle__input:checked + .notif-toggle__track::after { left: 19px; }

/* Channel pills */
.notif-pills {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.notif-pill {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .73rem;
  font-weight: 600;
  border: 1.5px solid var(--slate-300);
  background: none;
  color: var(--slate-500);
  cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}
.notif-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper-hi);
}
/* An explicit "on" marker: with every channel on, the pills would otherwise
   read as a uniform gold row with no sense of being on/off switches. */
.notif-pill.active::before { content: "✓"; margin-right: 4px; font-weight: 700; }
.notif-pill:disabled { opacity: .45; cursor: not-allowed; }
.notif-pill.active:disabled { opacity: .55; }

.notif-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--slate-400);
  font-size: .9rem;
}
.notif-empty strong {
  display: block;
  font-size: 1rem;
  color: var(--slate-600);
  margin-bottom: 6px;
}

/* Phone: the old page had no @media, so a row ran off the screen. The label
   takes the first line next to the toggle; the pills and "Saved" wrap below. */
@media (max-width: 767px) {
  .notif-category > summary { flex-wrap: wrap; }
  .notif-category__desc { margin-left: 0; text-align: left; flex-basis: 100%; }
  .notif-row { flex-wrap: wrap; padding: 12px 14px; }
  .notif-row__right { flex-basis: 100%; flex-shrink: 1; flex-wrap: wrap; padding-left: 48px; }
  .notif-empty { padding: 32px 12px; }
}
