/* =========================================================================
   Notifications — bell control (top-right) and overlay panel.
   Visual language matches feed/profile overlays: paper background, mono
   headings, bordered rows.
   ========================================================================= */

/* ---- Leaflet control button (top-right, below auth control). ---- */
.leaflet-bar a.notifications-btn {
  width: 36px;
  height: 30px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: var(--ink);
}

.notifications-icon {
  width: 18px;
  height: 18px;
  display: block;
}

.leaflet-bar a.notifications-btn:hover {
  background: var(--accent-soft);
}

.notifications-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 7px;
  background: var(--danger, #d64545);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
  box-sizing: border-box;
}

.notifications-btn[data-unread="0"] .notifications-badge {
  display: none;
}

/* Hidden entirely when user is not 'authed'. Set by ui.js. */
.notifications-control[hidden] {
  display: none !important;
}

/* ---- Overlay + modal shell ---- */
.notifications-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(20, 20, 20, 0.4);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  box-sizing: border-box;
}

.notifications-modal {
  background: var(--paper);
  color: var(--ink);
  width: min(480px, 100%);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  box-sizing: border-box;
}

.notifications-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 1;
}

.notifications-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin: 0;
  flex: 1;
}

.notifications-close {
  appearance: none;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1;
  padding: 6px 10px;
  cursor: pointer;
}

.notifications-close:hover {
  background: var(--accent-soft);
}

.notifications-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
}

.notifications-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  background: var(--paper);
}

.notifications-row:hover {
  background: var(--accent-soft);
}

.notifications-row[data-fresh="true"] {
  background: var(--accent-soft);
}

.notifications-row-avatar {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--line);
  color: var(--ink);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  line-height: 32px;
  text-align: center;
  text-transform: uppercase;
}

.notifications-row-body {
  flex: 1;
  min-width: 0;
}

.notifications-row-text {
  font-size: 14px;
  color: var(--ink);
}

.notifications-row-text .username {
  font-weight: 700;
}

.notifications-row-time {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft, #666);
  margin-top: 2px;
}

.notifications-row-thumb {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.notifications-empty,
.notifications-error {
  padding: 32px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-soft, #666);
}
