/* ===== NOTIFICATIONS ===== */

/* ── Bell wrapper ── */
#notif-bell-wrap {
  position: relative;
}

#notif-bell-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.15rem;
  padding: 6px 8px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  position: relative;
  transition: color var(--transition-fast), background var(--transition-fast);
  line-height: 1;
}

#notif-bell-btn:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

/* ── Badge ── */
.notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  background: #ff3b3b;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  pointer-events: none;
  line-height: 1;
}

/* ── Dropdown ── */
.notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  max-height: 420px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  overflow: hidden;

  /* Closed */
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  visibility: hidden;
  transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
}

.notif-dropdown.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
}

/* ── Dropdown header ── */
.notif-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.notif-dropdown-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.notif-mark-all-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.72rem;
  color: var(--accent-cyan);
  padding: 0;
  transition: opacity var(--transition-fast);
}

.notif-mark-all-btn:hover {
  opacity: 0.75;
}

/* ── List ── */
.notif-list {
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.notif-list::-webkit-scrollbar {
  width: 4px;
}
.notif-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

/* ── Item ── */
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.notif-item:hover {
  background: var(--bg-tertiary);
}

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

.notif-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-cyan);
  flex-shrink: 0;
  margin-top: 5px;
  transition: opacity var(--transition-fast);
}

.notif-item.read .notif-dot {
  background: transparent;
  border: 1px solid var(--border);
}

.notif-item-content {
  flex: 1;
  min-width: 0;
}

.notif-item-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-item.read .notif-item-title {
  color: var(--text-secondary);
  font-weight: 400;
}

.notif-item-body {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notif-item-time {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── Empty ── */
.notif-empty {
  padding: 24px 14px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ── Mobile ── */
@media (max-width: 480px) {
  .notif-dropdown {
    width: calc(100vw - 16px);
    right: -8px;
  }
}
