/* In-app notifications bell — follows ElectroReports theme tokens */

.dd-notifications {
  position: relative;
}

.dd-notifications-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border-radius: 0.55rem;
  border: 1px solid var(--er-toggle-border);
  background: var(--er-toggle-bg);
  color: var(--er-toggle-fg);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.dd-notifications-toggle:hover,
.dd-notifications-toggle:focus-visible {
  background: var(--er-accent-soft);
  color: var(--er-accent);
  border-color: var(--er-accent);
  outline: none;
}

.dd-notifications-icon {
  display: block;
}

.dd-notifications-badge {
  position: absolute;
  top: -0.2rem;
  right: -0.2rem;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: var(--er-danger);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 600;
  line-height: 1.1rem;
  text-align: center;
  pointer-events: none;
}

.dd-notifications-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  width: min(22rem, calc(100vw - 1.5rem));
  border-radius: 0.75rem;
  border: 1px solid var(--er-nav-border);
  background: var(--er-surface);
  box-shadow: var(--er-shadow);
  color: var(--er-text);
  display: none;
  z-index: 70;
  overflow: hidden;
}

.dd-notifications-panel.open {
  display: block;
}

.dd-notifications-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--er-nav-border);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--er-text);
}

.dd-notifications-mark-all {
  border: 0;
  background: transparent;
  color: var(--er-accent);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0;
}

.dd-notifications-mark-all:hover:not(:disabled) {
  color: var(--er-accent-hover);
  text-decoration: underline;
}

.dd-notifications-mark-all:disabled {
  opacity: 0.4;
  cursor: default;
}

.dd-notifications-empty {
  margin: 0;
  padding: 0.85rem;
  color: var(--er-text-muted);
  font-size: 0.875rem;
}

.dd-notifications-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 20rem;
  overflow-y: auto;
}

.dd-notifications-item {
  border-bottom: 1px solid var(--er-nav-border);
}

.dd-notifications-item:last-child {
  border-bottom: 0;
}

.dd-notifications-item-btn {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: inherit;
}

.dd-notifications-item-btn:hover {
  background: var(--er-accent-soft);
}

.dd-notifications-item--unread .dd-notifications-item-btn {
  background: var(--er-accent-soft);
}

.dd-notifications-item-msg {
  font-size: 0.875rem;
  line-height: 1.35;
  color: var(--er-text);
}

.dd-notifications-item-meta {
  font-size: 0.75rem;
  color: var(--er-text-muted);
}

.dd-notifications-footer {
  border-top: 1px solid var(--er-nav-border);
  padding: 0.55rem 0.85rem;
  text-align: center;
}

.dd-notifications-see-all {
  color: var(--er-accent);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
}

.dd-notifications-see-all:hover {
  color: var(--er-accent-hover);
  text-decoration: underline;
}

/* Full notifications page */
.dd-notifications-page-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dd-notifications-page-item {
  border-bottom: 1px solid var(--er-nav-border);
}

.dd-notifications-page-item:last-child {
  border-bottom: 0;
}

.dd-notifications-page-item-btn {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
  padding: 1rem 1.1rem;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: inherit;
}

.dd-notifications-page-item-btn:hover {
  background: var(--er-accent-soft);
}

.dd-notifications-page-item--unread .dd-notifications-page-item-btn {
  background: var(--er-accent-soft);
  box-shadow: inset 3px 0 0 var(--er-accent);
}

.dd-notifications-page-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--er-text-muted);
}

.dd-notifications-page-item-status {
  color: var(--er-accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dd-notifications-page-item-msg {
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--er-text);
}

.dd-notifications-page-item-meta {
  font-size: 0.8rem;
  color: var(--er-text-muted);
}
