/* ============================================================================
   ATLAS REDESIGN — Notifications (Voice Inbox) screen styles  ·  Phase 2
   Branch: atlas-redesign-2026-06-29

   Prefix: .rd-notifications. Tokens only (--r-*) so Calm (almanac) + Operator
   themes both work automatically. No hardcoded hex. Theme-specific selectors
   (html[data-rtheme="operator"] …) are used only where a token can't express
   the tweak (rare).
   ========================================================================== */

.rd-notifications {
  font-family: var(--r-font-body);
  color: var(--r-body);
  padding: var(--r-gutter);
  max-width: var(--r-page-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ---- page header --------------------------------------------------------- */
.rd-nt-head {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.rd-nt-eyebrow {
  font-family: var(--r-font-mono);
  font-size: var(--r-fs-eyebrow);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--r-clay);
}
.rd-nt-h1 {
  font-family: var(--r-font-display);
  font-size: var(--r-fs-h1);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.01em;
  color: var(--r-ink);
  margin: 0;
}
.rd-nt-sub {
  margin: 2px 0 0;
  font-size: var(--r-fs-body);
  line-height: 1.5;
  color: var(--r-muted);
  max-width: 620px;
}

/* ---- main grid (activity | preferences) ---------------------------------- */
.rd-nt-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
  align-items: start;
  min-height: 0;
}
.rd-nt-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---- shared card chrome -------------------------------------------------- */
.rd-nt-activity,
.rd-nt-prefs {
  background: var(--r-surface);
  border: 1px solid var(--r-border);
  border-radius: var(--r-radius-card);
  box-shadow: var(--r-shadow-card);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* ---- activity card ------------------------------------------------------- */
.rd-nt-activity-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 4px;
}
.rd-nt-activity-title {
  margin: 0;
  flex: 1 1 auto;
  font-family: var(--r-font-display);
  font-size: var(--r-fs-h2);
  font-weight: 600;
  color: var(--r-ink);
}

/* filter chip group (All / Unread / Deals) */
.rd-nt-filter {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--r-well);
  border: 1px solid var(--r-border);
  border-radius: var(--r-radius-control);
  padding: 3px;
}
.rd-nt-fbtn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--r-faint);
  font-family: var(--r-font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-weight: 600;
  line-height: 1;
  padding: 6px 10px;
  border-radius: calc(var(--r-radius-control) - 3px);
  cursor: pointer;
  transition: color var(--r-dur) var(--r-ease),
              background var(--r-dur) var(--r-ease),
              box-shadow var(--r-dur) var(--r-ease);
}
.rd-nt-fbtn:hover { color: var(--r-body); }
.rd-nt-fbtn.is-active {
  background: var(--r-primary);
  color: var(--r-primary-ink);
  box-shadow: var(--r-shadow-card);
}
.rd-nt-fbtn:focus-visible { outline: var(--r-focus); outline-offset: 2px; }

/* scrollable list — only this region scrolls, never the outer frame */
.rd-nt-list {
  display: flex;
  flex-direction: column;
  overflow: auto;
  max-height: calc(100vh - 290px);
  margin: 4px -4px 0;
  padding: 0 2px;
}

/* one activity row */
.rd-nt-row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px 8px;
  border-top: 1px solid var(--r-hairline);
  border-radius: 10px;
  cursor: pointer;
  transition: background var(--r-dur) var(--r-ease),
              box-shadow var(--r-dur) var(--r-ease),
              transform var(--r-dur) var(--r-ease);
}
.rd-nt-row:first-child { border-top: none; }
.rd-nt-row:hover {
  background: var(--r-canvas-raised);
  box-shadow: var(--r-shadow-hover);
  transform: translateY(-2px);
}
.rd-nt-row:focus-visible { outline: var(--r-focus); outline-offset: 2px; }

/* icon chip */
.rd-nt-ico {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--r-well);
  color: var(--r-muted);
}
.rd-nt-ico i { font-size: 16px; }
.rd-nt-ico[data-tone="mint"] { background: var(--r-mint-surface); color: var(--r-mint-ink); }
.rd-nt-ico[data-tone="clay"] {
  background: color-mix(in srgb, var(--r-clay) 16%, transparent);
  color: var(--r-clay-2);
}

/* row body */
.rd-nt-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.rd-nt-text {
  font-size: var(--r-fs-body);
  line-height: 1.4;
  color: var(--r-ink);
}
.rd-nt-text strong { font-weight: 600; }
.rd-nt-time {
  font-family: var(--r-font-mono);
  font-size: var(--r-fs-eyebrow);
  letter-spacing: .04em;
  color: var(--r-faint);
}

/* unread dot */
.rd-nt-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--r-primary);
  margin-top: 6px;
}

/* activity empty state */
.rd-nt-empty {
  font-family: var(--r-font-mono);
  font-size: var(--r-fs-meta);
  letter-spacing: .04em;
  color: var(--r-faint);
  text-align: center;
  padding: 30px 12px;
  border: 1px dashed var(--r-border);
  border-radius: var(--r-radius-control);
  margin: 8px 4px 12px;
}

/* ---- preferences card ---------------------------------------------------- */
.rd-nt-prefs-title {
  margin: 0 0 6px;
  font-family: var(--r-font-display);
  font-size: var(--r-fs-h2);
  font-weight: 600;
  color: var(--r-ink);
}
.rd-nt-pref-list {
  display: flex;
  flex-direction: column;
}
.rd-nt-pref {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 0;
  border-top: 1px solid var(--r-hairline);
}
.rd-nt-pref:first-child { border-top: none; }
.rd-nt-pref-ico {
  flex: 0 0 auto;
  font-size: 16px;
  color: var(--r-muted);
}
.rd-nt-pref-id {
  flex: 1 1 auto;
  min-width: 0;
}
.rd-nt-pref-label {
  font-size: var(--r-fs-body);
  font-weight: 600;
  color: var(--r-ink);
}
.rd-nt-pref-sub {
  font-size: var(--r-fs-meta);
  color: var(--r-faint);
  margin-top: 1px;
}

/* toggle switch (local UI state) */
.rd-nt-toggle {
  appearance: none;
  border: none;
  flex: 0 0 auto;
  width: 34px;
  height: 20px;
  border-radius: 11px;
  background: var(--r-well);
  position: relative;
  cursor: pointer;
  padding: 0;
  transition: background var(--r-dur) var(--r-ease);
}
.rd-nt-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--r-surface);
  box-shadow: var(--r-shadow-card);
  transition: transform var(--r-dur) var(--r-ease);
}
.rd-nt-toggle[aria-checked="true"] { background: var(--r-primary); }
.rd-nt-toggle[aria-checked="true"] .rd-nt-knob { transform: translateX(14px); }
.rd-nt-toggle:focus-visible { outline: var(--r-focus); outline-offset: 2px; }

.rd-nt-prefs-note {
  margin: 14px 0 0;
  font-size: var(--r-fs-meta);
  line-height: 1.5;
  color: var(--r-faint);
}

/* Operator: knob reads cleaner on the dark primary fill */
html[data-rtheme="operator"] .rd-nt-toggle[aria-checked="true"] .rd-nt-knob {
  background: var(--r-primary-ink);
}

/* ---- responsive ---------------------------------------------------------- */
@media (max-width: 980px) {
  .rd-nt-grid { grid-template-columns: 1fr; }
  .rd-nt-list { max-height: 52vh; }
}
