/* Manage portal notifications (manage_notifications.js). No bell.
   1) Mention toasts: cards in the shared top-center stack of
      meeting_reminders.css (.global-meeting-reminder base, --mr-* tokens).
   2) My Work -> Notifications list in the right panel (--mw-* tokens from
      my_work_shell.css, which map to the Light / Dark theme tokens). */

/* ---------------------------------------------------------------- toasts */

.global-meeting-reminder.mention-toast {
  grid-template-areas:
    "signal eyebrow dismiss"
    ".      author  author"
    ".      snippet snippet"
    ".      foot    foot";
}

.mention-toast__signal { color: var(--mr-text-2); }

.mention-toast .global-meeting-reminder__eyebrow {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mention-toast__author {
  grid-area: author;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-top: 6px;
}

.mention-avatar {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--mn-avatar-bg, rgba(255, 90, 0, 0.14));
  color: var(--mn-avatar-text, #b9561e);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

html[data-theme="dark"] .global-meeting-reminders,
html[data-theme="dark"] .mp-main--mywork {
  --mn-avatar-bg: rgba(238, 122, 59, 0.2);
  --mn-avatar-text: #f29a62;
  --mn-chip-bg: rgba(238, 122, 59, 0.18);
  --mn-chip-text: #f29a62;
  --mn-unread-bg: rgba(238, 122, 59, 0.12);
}

.mention-toast__name {
  overflow: hidden;
  color: var(--mr-text);
  font-size: 14px;
  font-weight: 800;
  line-height: 20px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mention-toast__snippet {
  grid-area: snippet;
  display: -webkit-box;
  margin: 6px 0 0;
  overflow: hidden;
  color: var(--mr-text);
  font-size: 13px;
  line-height: 19px;
  overflow-wrap: anywhere;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.mention-chip {
  padding: 0 4px;
  border-radius: 6px;
  background: var(--mn-chip-bg, rgba(255, 90, 0, 0.12));
  color: var(--mn-chip-text, #b9561e);
  font-weight: 700;
}

.mention-toast__foot {
  grid-area: foot;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.mention-toast__time { color: var(--mr-text-2); font-size: 12px; }

.mention-toasts__more {
  align-self: center;
  padding: 6px 14px;
  border: 1px solid var(--mr-border);
  border-radius: 999px;
  background: var(--mr-surface);
  color: var(--mr-text-2);
  box-shadow: var(--mr-shadow);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  pointer-events: auto;
}

.mention-toasts__more span { color: var(--mr-accent); }
.mention-toasts__more:hover { background: var(--mr-hover); }
.mention-toasts__more:focus-visible { outline: 2px solid var(--mr-accent); outline-offset: 2px; }

/* ------------------------------------------------- My Work notifications */

.mw-notif__count {
  flex: none;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  box-sizing: border-box;
  border-radius: 999px;
  background: var(--mw-accent, #ff681f);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}

.mw-notif__count[hidden] { display: none; }

.mw-notif__all {
  flex: none;
  margin-left: auto;
  padding: 4px 6px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--mw-accent, #ff681f);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.mw-notif__all:hover:not(:disabled) { background: var(--mw-raised); }
.mw-notif__all:disabled { color: var(--mw-muted); cursor: default; opacity: 0.7; }
.mw-notif__all:focus-visible { outline: 2px solid var(--mw-accent); outline-offset: 1px; }

.mw-notif__list {
  display: grid;
  gap: 2px;
  margin: 0;
  /* Bottom room: the last row can scroll clear of the floating chat button. */
  padding: 6px 6px 56px;
  list-style: none;
}

.mw-notif { position: relative; }

.mw-notif__link {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 8px;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border-radius: 10px;
  color: var(--mw-text);
  text-decoration: none;
}

.mw-notif__link:hover { background: var(--mw-raised); }
.mw-notif__link:focus-visible { outline: 2px solid var(--mw-accent); outline-offset: -2px; }
.mw-notif.is-unread .mw-notif__link { background: var(--mn-unread-bg, rgba(255, 90, 0, 0.08)); }
.mw-notif.is-unread .mw-notif__link:hover { background: var(--mn-chip-bg, rgba(255, 90, 0, 0.12)); }

.mw-notif__text { display: grid; gap: 3px; min-width: 0; }

.mw-notif__title {
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
  overflow-wrap: anywhere;
}

.mw-notif__title b { font-weight: 700; }
.mw-notif.is-unread .mw-notif__title { font-weight: 700; }
.mw-notif.is-unread .mw-notif__title b { font-weight: 800; }

.mw-notif__snippet {
  display: -webkit-box;
  overflow: hidden;
  color: var(--mw-muted);
  font-size: 12px;
  line-height: 17px;
  overflow-wrap: anywhere;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.mw-notif__time { color: var(--mw-muted); font-size: 11px; opacity: 0.85; }

.mw-notif__dot {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--mw-accent, #ff681f);
}

/* Hover action: Mark as read / unread (always visible on touch). */
.mw-notif__toggle {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 3px 8px;
  border: 1px solid var(--mw-raised-line);
  border-radius: 999px;
  background: var(--mw-surface-solid);
  color: var(--mw-text);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  opacity: 0;
  transition: opacity 120ms ease;
}

.mw-notif:hover .mw-notif__toggle,
.mw-notif:focus-within .mw-notif__toggle { opacity: 1; }
.mw-notif__toggle:focus-visible { outline: 2px solid var(--mw-accent); outline-offset: 1px; }

@media (hover: none) {
  .mw-notif__toggle { position: static; display: block; margin: -6px 0 6px 50px; opacity: 1; }
}

.mw-notif__state {
  margin: 0;
  padding: 14px 12px;
  color: var(--mw-muted);
  font-size: 12px;
  text-align: center;
}

.mw-notif__state:empty { padding: 4px; }

.mw-notif__empty {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  min-height: 100%;
  padding: 20px 12px;
  box-sizing: border-box;
  color: var(--mw-muted);
  font-size: 13px;
  text-align: center;
}

.mw-notif__empty p { margin: 0; }

.mw-notif__empty-icon {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--mw-raised);
}

.mw-notif__empty-icon svg { width: 18px; height: 18px; }

/* Projects list: unread Updates on a project. */
.mp-updates-dot {
  display: inline-block;
  flex: none;
  width: 8px;
  height: 8px;
  margin-left: 6px;
  border-radius: 999px;
  background: var(--accent, #ff5a00);
  vertical-align: middle;
}
