/* notifications.css — Design 099 Phase C Part 2: the shared notifications badge + panel.
   Token-only colours (var(--color-*)) so it flips with light/dark in BOTH the hub and the
   runtime chrome. Mobile (≤640px) → the panel becomes a bottom sheet (the 094 pattern). */

.notif-bell {
  position: relative;
  appearance: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-2, var(--color-surface));
  color: var(--color-text);
}
.notif-bell:hover { border-color: var(--color-accent); }
.notif-bell:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 35%, transparent); }
.notif-bell.has-unread { color: var(--color-accent); }

.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--color-accent);
  color: var(--color-on-accent, #fff);
  font-size: 11px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--color-bg);
}

.notif-panel {
  position: fixed;
  top: 60px;
  right: 16px;
  width: 360px;
  max-width: calc(100vw - 32px);
  max-height: 70vh;
  display: none;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  box-shadow: 0 16px 48px color-mix(in srgb, var(--color-text) 18%, transparent);
  z-index: 1000;
  overflow: hidden;
}
.notif-panel.is-open { display: flex; }

.notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-border);
}
.notif-title { font-weight: 700; color: var(--color-text); }
.notif-readall {
  appearance: none;
  cursor: pointer;
  border: none;
  background: none;
  color: var(--color-accent);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 0;
}
.notif-readall:hover { text-decoration: underline; }

.notif-status { padding: 16px 14px; color: var(--color-text-muted); font-size: 14px; }
.notif-list { overflow-y: auto; }

.notif-item {
  display: block;
  width: 100%;
  text-align: left;
  appearance: none;
  cursor: pointer;
  border: none;
  border-bottom: 1px solid var(--color-border);
  background: none;
  color: var(--color-text);
  font: inherit;
  padding: 12px 14px;
}
.notif-item:hover { background: var(--color-surface-2, color-mix(in srgb, var(--color-accent) 6%, transparent)); }
.notif-item.is-unread { background: color-mix(in srgb, var(--color-accent) 8%, transparent); }
.notif-item.is-unread .notif-item-text { font-weight: 600; }
.notif-item-text { font-size: 14px; line-height: 1.35; }
.notif-item-time { font-size: 12px; color: var(--color-text-muted); margin-top: 3px; }

/* Mobile — bottom sheet (Design 094 PWA pattern). */
@media (max-width: 640px) {
  .notif-panel {
    top: auto;
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    max-height: 80vh;
    border-radius: 16px 16px 0 0;
  }
}
