/* Where notices go (notify_targets.js): the channel cards on a topic's own
   section (.notify-targets) and the Notification centre's matrix
   (.notify-centre). Everything here is scoped to nt-/nc- classes.

   The tiles wear each channel's own colours -- Telegram's blue, the e-mail
   orange, the panel's leaf on white -- the same in both themes; everything
   around them follows the theme's accent. */

/* ── The cards ───────────────────────────────────────────────────────── */

.notify-targets { display: flex; flex-direction: column; gap: .65rem; margin-top: .6rem }
.nt-grid {
  display: grid;
  /* Small cards of one size everywhere: as many to a row as there is room
     for -- four on a wide dialog, three on a phone. */
  grid-template-columns: repeat(auto-fill, minmax(5.75rem, 1fr));
  gap: .5rem;
  max-width: 30rem;
}

.nt-card {
  position: relative;
  box-sizing: border-box;
  min-width: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  padding: .65rem .35rem .55rem;
  border: 1.5px solid var(--border2);
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
  font: inherit;
  letter-spacing: normal;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .12s, background .12s;
}
.nt-card:hover { border-color: var(--accent); text-decoration: none }
.nt-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px }
.nt-card[data-state="on"] { border-color: var(--accent); background: var(--accent-softer) }
/* Nobody is reached there yet: dashed and greyed. A setup link still
   lights up on hover; a channel with nothing to set up does not. */
.nt-card.is-unavailable { border-style: dashed; background: transparent }
.nt-card[data-state="na"] { cursor: default }
.nt-card[data-state="na"]:hover { border-color: var(--border2) }

/* The corner: a check on a chosen card, an empty ring on the others. */
.nt-mark {
  position: absolute;
  top: .35rem;
  inset-inline-end: .35rem;
  width: 1rem;
  height: 1rem;
  box-sizing: border-box;
  border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--muted2) 55%, transparent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nt-card[data-state="on"] .nt-mark { border-color: var(--accent-solid); background: var(--accent-solid) }
.nt-mark svg { width: .7rem; height: .7rem; fill: var(--on-accent-solid) }

/* A channel's tile. */
.nt-tile {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #7c3aed;
}
.nt-tile svg { width: 18px; height: 18px; fill: #fff }
.nt-tile img { width: 23px; height: 23px; display: block }
.nt-tile--panel { background: #fff; box-shadow: inset 0 0 0 1px rgba(17, 24, 39, .12) }
.nt-tile--telegram { background: #26a5e4 }
.nt-tile--email { background: linear-gradient(135deg, #fb7185, #e11d48) }
.nt-tile--agent { background: linear-gradient(135deg, #34d399, #059669) }
.nt-tile--other { background: linear-gradient(135deg, #8b5cf6, #6d28d9) }
.nt-tile.is-muted { filter: grayscale(1); opacity: .45 }

.nt-name {
  max-width: 100%;
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.nt-card.is-unavailable .nt-name { color: var(--muted) }
.nt-hint {
  max-width: 100%;
  margin-top: -.15rem;
  color: var(--muted2);
  font-size: .7rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.nt-hint.is-link { color: var(--accent); font-weight: 600 }

/* Nothing chosen: nothing is sent. */
.nt-none,
.nc-none {
  margin: 0;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.35;
}
.nt-none::before,
.nc-none::before {
  content: "";
  display: inline-block;
  width: .45rem;
  height: .45rem;
  margin-inline-end: .4rem;
  border-radius: 50%;
  background: var(--warn);
  vertical-align: .05rem;
}
.nt-none[hidden],
.nc-none[hidden] { display: none }

/* Under the cards: that the choice is everybody's (on a shared agent, as
   the mailbox's own note) and the section's own word. */
.nt-foot { display: none; margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.4 }
.nt-foot.has-note { display: block }
.nt-shared { display: none }
body[data-shared-agent] .nt-foot { display: block }
body[data-shared-agent] .nt-shared { display: inline }
.nt-status { margin: 0 }

/* "Saved": a moment in the topic's slot. */
.nt-saved {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  color: var(--accent);
  font-size: .76rem;
  font-weight: 600;
  white-space: nowrap;
}
.nt-saved:empty { display: none }
.nt-saved svg { width: .9rem; height: .9rem; fill: currentColor }

/* Settings -> Automatic updates: the update notices' cards in a box like
   the rows around it -- not a switch, so it neither points nor lights up. */
.au-notices-block {
  display: flex;
  flex-direction: column;
  margin-top: .5rem;
  padding: .65rem .8rem .8rem;
  border-radius: 8px;
  border: 1px solid var(--border2);
  background: var(--surface-flat);
}
.au-notices-block .notify-targets { margin-top: .7rem }

/* An extension's category: its notices under its card. */
.nt-ext {
  display: flex;
  flex-direction: column;
  margin-top: 1rem;
  padding-top: .9rem;
  border-top: 1px solid var(--border);
}
.nt-ext-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem }
.nt-ext-title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: .45rem;
  color: var(--text);
  font-size: .9rem;
  font-weight: 600;
}

/* ── The Notification centre ─────────────────────────────────────────── */

.nc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem }
.nc-head .section-intro { margin-top: 0 }
.nc-head .nt-saved { margin-top: .15rem }
.nc-foot { margin-top: .8rem }
.notify-centre { margin-top: .4rem }
.nc-table { width: 100%; border-collapse: collapse; table-layout: auto }
.nc-corner { padding: 0 }
/* The tiles in one line at the top; a name or a note that wraps grows
   downwards. */
.nc-col {
  width: 6.4rem;
  padding: 0 .2rem .65rem;
  vertical-align: top;
  font-weight: 400;
}
.nc-col-box { display: flex; flex-direction: column; align-items: center; gap: .35rem }
.nc-col-name { color: var(--text); font-size: .8rem; font-weight: 500; line-height: 1.2; text-align: center; overflow-wrap: anywhere }
.nc-col.is-unavailable .nc-col-name { color: var(--muted) }
.nc-col-note { color: var(--muted2); font-size: .7rem; line-height: 1.2; text-align: center; overflow-wrap: anywhere }
.nc-setup { color: var(--accent); font-weight: 600; text-decoration: none }
.nc-setup:hover { text-decoration: underline }

.nc-row > th,
.nc-row > td { border-top: 1px solid var(--border); padding: .7rem .2rem; vertical-align: middle }
.nc-topic { text-align: start; font-weight: 400; padding-inline-start: 0 }
.nc-topic-line { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem }
.nc-topic-link {
  display: inline-flex;
  align-items: baseline;
  gap: .45rem;
  min-width: 0;
  color: var(--text);
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.nc-emoji { flex: none; width: 1.2rem; text-align: center }
.nc-axp { font-size: .66rem }
.nc-axp .axp-badge-ico { fill: currentColor }
.nc-topic-sub,
.nc-topic .nc-none { display: block; padding-inline-start: 1.65rem }
.nc-topic-sub { color: var(--muted); font-size: .76rem; line-height: 1.35 }
.nc-topic .nc-none { margin-top: .15rem; font-size: .74rem }
.nc-topic .nc-none[hidden] { display: none }

.nc-cell { text-align: center }
.nc-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .25rem;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.nc-check:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px }
.nc-box {
  width: 1.3rem;
  height: 1.3rem;
  box-sizing: border-box;
  border-radius: 6px;
  border: 1.5px solid color-mix(in srgb, var(--muted2) 55%, transparent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color .12s, background .12s;
}
.nc-check:hover .nc-box { border-color: var(--accent) }
.nc-check[aria-checked="true"] .nc-box { border-color: var(--accent-solid); background: var(--accent-solid) }
.nc-box svg { width: .95rem; height: .95rem; fill: var(--on-accent-solid) }
.nc-dash { color: var(--muted2) }

/* A phone: one block per topic, its channels the cards of a topic's own
   section (notify_targets.js topicBlock). */
.nc-blocks { display: flex; flex-direction: column }
.nc-block { padding: .85rem 0 .95rem; border-top: 1px solid var(--border) }
.nc-block-head { display: block; margin-bottom: .65rem }
