/* ==========================================================================
   Notification bell — patient feed + admin task panel.
   Light/dark theming comes from the existing CSS variables automatically.
   Only the badge red (#ef4444), the dismiss-hover red (#e53e3e) and the
   "all clear" green (#22c55e) are hardcoded — no suitable variables exist.
   ========================================================================== */

.notif-bell-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.notif-bell-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.notif-bell-btn:hover {
  background: var(--c-bg-elev, rgba(127, 127, 127, 0.14));
}

.notif-bell-btn .icon8 {
  width: 24px;
  height: 24px;
}

.notif-bell-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  pointer-events: none;
}

/* Explicit [hidden] rule — display:flex above outranks the UA [hidden] sheet. */
.notif-bell-badge[hidden] {
  display: none;
}

.notif-bell-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 300px;
  max-height: 420px;
  overflow-y: auto;
  background: var(--c-modal-bg);
  border: 1px solid var(--c-modal-border);
  border-radius: var(--c-radius);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
  z-index: 9000;
  display: flex;
  flex-direction: column;
}

/* Explicit [hidden] rule — display:flex above outranks the UA [hidden] sheet. */
.notif-bell-panel[hidden] {
  display: none;
}

.notif-bell-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--c-modal-border);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--c-modal-text);
}

.notif-bell-panel__history-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.75rem;
  color: var(--c-modal-muted);
}

.notif-bell-panel__history-toggle:hover {
  color: var(--c-modal-text);
}

.notif-bell-panel__body {
  flex: 1;
  padding: 8px 0;
}

.notif-bell-panel__empty {
  padding: 16px;
  text-align: center;
  color: var(--c-modal-muted);
  font-size: 0.85rem;
}

/* ---- Patient notification items ---- */

.notif-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--c-modal-border);
  cursor: default;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.notif-item__title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--c-modal-text);
}

.notif-item__message {
  font-size: 0.8rem;
  color: var(--c-modal-muted);
}

.notif-item__time {
  font-size: 0.72rem;
  color: var(--c-modal-muted);
}

.notif-item__dismiss {
  align-self: flex-end;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.72rem;
  color: var(--c-modal-muted);
  padding: 2px 4px;
}

.notif-item__dismiss:hover {
  color: #e53e3e;
}

/* ---- Admin task items ---- */

.notif-task-item {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--c-modal-border);
}

.notif-task-item__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.notif-task-item__label {
  flex: 1;
  font-size: 0.85rem;
  color: var(--c-modal-text);
}

.notif-task-item__count {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--c-modal-text);
}

.notif-task-item--zero .notif-task-item__count {
  color: #22c55e;
}

.notif-woohoo {
  padding: 16px;
  text-align: center;
  font-size: 0.85rem;
  color: #22c55e;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
