/* it-1710 (BPDGo#611) — the notifications bell in the app bar, its panel, and the Notifications page. Linked globally
   (layouts/_shared.html): the bell is on every signed-in page. The panel takes the header's own dropdown look (the
   lead-clock popover's); the page holds the same panel in a .float-card. */

/* ---- The bell + its badge (layouts/base.html) ------------------------------------------------------------------ */
.ntf-bell { position: relative; display: inline-flex; }
.ntf-bell__count {
  position: absolute;
  top: -0.25rem;
  right: -0.375rem;
  pointer-events: none;
  min-width: 1.125rem;
  height: 1.125rem;
  padding: 0 0.3125rem;
  box-sizing: border-box;
  border-radius: var(--r-full);
  background: var(--md-sys-color-error);
  color: var(--md-sys-color-on-error);
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.125rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.ntf-bell__count[hidden] { display: none; }
.ntf-pop {
  position: absolute;
  top: calc(100% + 0.25rem);
  right: 0;
  width: 24rem;
  max-width: calc(100vw - 2rem);
  max-height: min(36rem, calc(100vh - 6rem));
  overflow-y: auto;
  z-index: 70;
  background: var(--md-sys-color-surface-container-low);
  border-radius: var(--md-sys-shape-corner-medium);
  box-shadow: var(--md-sys-elevation-level2);
  color: var(--md-sys-color-on-surface);
}

/* ---- The panel (notifications/index.html) ---------------------------------------------------------------------- */
.ntf-panel { display: flex; flex-direction: column; padding: 0.25rem 0; }
.ntf-panel__head { display: flex; align-items: center; gap: 0.5rem; padding: 0.25rem 0.5rem 0.25rem 0.75rem; min-height: 2.5rem; }
.ntf-panel__title {
  flex: 1;
  font-size: var(--md-sys-typescale-label-medium-size);
  font-weight: 600;
  color: var(--md-sys-color-on-surface-variant);
}
.ntf-panel__list { display: flex; flex-direction: column; }
.ntf-panel__empty { margin: 0; padding: 0.75rem; color: var(--md-sys-color-on-surface-variant); font-size: var(--md-sys-typescale-body-medium-size); }
.ntf-panel__more { align-self: center; margin: 0.25rem 0; }
.ntf-panel__foot {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem;
  font-size: var(--md-sys-typescale-label-large-size);
  color: var(--md-sys-color-primary);
  text-decoration: none;
}
.ntf-panel__foot .material-symbols-rounded { font-size: 1.125rem; }

/* One row: the whole line is the open button (a form — it marks the row read on the way to its subject). */
.ntf-row { display: flex; flex-direction: column; }
.ntf-row + .ntf-row { border-top: 1px solid var(--md-sys-color-outline-variant); }
.ntf-row__open { margin: 0; }
.ntf-row__btn {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 0;
  background: transparent;
  color: var(--md-sys-color-on-surface);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.ntf-row__btn:hover { background: color-mix(in srgb, var(--md-sys-color-on-surface) 8%, transparent); }
.ntf-row__btn:focus-visible { outline: 2px solid var(--md-sys-color-primary); outline-offset: -2px; }
.ntf-row__icon { flex: none; font-size: 1.25rem; color: var(--md-sys-color-on-surface-variant); margin-top: 0.0625rem; }
.ntf-row.is-unread .ntf-row__icon { color: var(--md-sys-color-primary); }
.ntf-row__text { display: flex; flex-direction: column; gap: 0.125rem; flex: 1; min-width: 0; }
.ntf-row__line { font-size: var(--md-sys-typescale-body-medium-size); line-height: 1.35; overflow-wrap: anywhere; }
.ntf-row.is-unread .ntf-row__line { font-weight: 600; }
.ntf-row__when { color: var(--md-sys-color-on-surface-variant); font-size: var(--md-sys-typescale-body-small-size); }
.ntf-row__dot {
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  margin-top: 0.375rem;
  border-radius: var(--r-full);
  background: var(--md-sys-color-primary);
}

/* An SMS Caddy alert's row: who acknowledged it, or Acknowledge with notes. */
.ntf-row__ack {
  display: flex;
  align-items: flex-start;
  gap: 0.375rem;
  margin: 0;
  padding: 0 0.75rem 0.625rem 2.75rem;
  color: var(--md-sys-color-on-surface-variant);
  font-size: var(--md-sys-typescale-body-small-size);
}
.ntf-row__ack .material-symbols-rounded { font-size: 1rem; color: var(--md-sys-color-tertiary); }
.ntf-row__acktext { display: flex; flex-direction: column; gap: 0.125rem; min-width: 0; }
.ntf-row__acknotes { color: var(--md-sys-color-on-surface); white-space: pre-line; overflow-wrap: anywhere; }
.ntf-row__ackby { font-style: italic; }
.ntf-row__ackbox { padding: 0 0.75rem 0.625rem 2.75rem; }
.ntf-row__ackbox form { display: flex; flex-direction: column; gap: 0.5rem; }
.ntf-row__ackbox md-outlined-text-field { width: 100%; }
.ntf-row__ackbtns { display: flex; justify-content: flex-end; gap: 0.25rem; }

/* A note opened from a notification (#note-…, notifications.js): pointed out for a moment. */
.note-card.is-pointed { outline: 2px solid var(--md-sys-color-primary); outline-offset: 2px; }

/* ---- The page ---------------------------------------------------------------------------------------------------- */
.ntf-page { max-width: 45rem; }
.ntf-page__sub { margin: 0.25rem 0 0; }
.ntf-page__card { margin-top: 1rem; }
.ntf-page__gone { margin-top: 1rem; }

/* A phone: the bell sits a few buttons in from the right, so a panel hung from it would run off the left edge — it
   spans the window under the app bar instead (16px gutters). */
@media (max-width: 600px) {
  .ntf-pop {
    position: fixed;
    top: calc(var(--app-bar-h) + 0.25rem);
    left: 1rem;
    right: 1rem;
    width: auto;
    max-width: none;
    max-height: calc(100vh - var(--app-bar-h) - 1.5rem);
  }
}
