/* ==========================================================================
   Notification Bell (navbar island)
   Mounted via React island in Navbar.astro inside an `.auth-user` wrapper,
   so it's hidden until auth-logged-in is set on <html>.
   ========================================================================== */

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

.notification-bell-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text-primary);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.notification-bell-btn:hover,
.notification-bell-btn:focus-visible {
  background: var(--bg-hover);
  border-color: var(--border-primary);
  outline: none;
}

.notification-bell-icon {
  width: 20px;
  height: 20px;
}

.notification-bell-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--color-error);
  color: var(--text-inverse);
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  pointer-events: none;
}

.notification-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 360px;
  max-width: calc(100vw - 24px);
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  z-index: 1000;
  overflow: hidden;
}

.notification-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-primary);
  background: var(--bg-secondary);
}

.notification-panel-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}

.notification-mark-all {
  background: transparent;
  border: none;
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
}

.notification-mark-all:hover:not(:disabled) {
  background: var(--color-primary-light);
}

.notification-mark-all:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.notification-panel-list {
  overflow-y: auto;
  flex: 1;
}

.notification-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.notification-item {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-primary);
  transition: background-color 0.15s ease;
}

.notification-item:last-child {
  border-bottom: none;
}

.notification-item.is-clickable {
  cursor: pointer;
}

.notification-item.is-clickable:hover,
.notification-item.is-clickable:focus-visible {
  background: var(--bg-hover);
  outline: none;
}

.notification-item.is-unread {
  background: var(--color-primary-light);
}

.notification-item.is-unread.is-clickable:hover {
  background: var(--color-primary-light);
  filter: brightness(0.97);
}

.notification-item-body {
  flex: 1;
  min-width: 0;
}

.notification-item-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.notification-unread-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
  flex-shrink: 0;
}

.notification-item-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 4px;
  word-wrap: break-word;
}

.notification-item-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.notification-item-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}

.notification-action-btn {
  width: 24px;
  height: 24px;
  padding: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.notification-action-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-primary);
}

@media (max-width: 600px) {
  .notification-panel {
    width: 320px;
    right: -8px;
  }
}
