/* Notification Bell Component */

/* Bell button */
.nbell-btn {
  position: relative;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: background var(--transition-fast);
  flex-shrink: 0;
}

.nbell-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.nbell-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  line-height: 1;
}

.nbell-badge.hidden {
  display: none;
}

/* Dropdown container */
.nbell-wrapper {
  position: relative;
}

.nbell-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 360px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  z-index: var(--z-modal);
  overflow: hidden;
  border: 1px solid #e5e7eb;
  animation: nbell-drop 0.18s ease;
}

.nbell-dropdown.hidden {
  display: none;
}

@keyframes nbell-drop {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Header */
.nbell-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid #f0f0f0;
}

.nbell-title {
  font-size: 16px;
  font-weight: 700;
  color: #111;
  margin: 0;
}

.nbell-mark-all {
  background: none;
  border: none;
  color: #4a5fc1;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
}

.nbell-mark-all:hover {
  text-decoration: underline;
}

/* Notification list */
.nbell-list {
  max-height: 380px;
  overflow-y: auto;
}

/* Individual notification item */
.nbell-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid #f5f5f5;
  cursor: pointer;
  transition: background var(--transition-fast);
  position: relative;
}

.nbell-item:hover {
  background: #f9faff;
}

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

/* Icon column */
.nbell-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
  background: #f3f4f6;
  overflow: hidden;
}

.nbell-icon.approve {
  background: #d1fae5;
  color: #16a34a;
}

.nbell-icon.reject {
  background: #fee2e2;
  color: #dc2626;
}

.nbell-icon.delete {
  background: #fee2e2;
  color: #dc2626;
}

.nbell-icon.publish {
  background: #dbeafe;
  color: #2563eb;
}

.nbell-icon.rename {
  background: #ede9fe;
  color: #7c3aed;
}

.nbell-icon.track {
  background: #e0e7ff;
  color: #4338ca;
}

.nbell-icon.edit {
  background: #fef3c7;
  color: #d97706;
}

/* Content column */
.nbell-content {
  flex: 1;
  min-width: 0;
}

.nbell-text {
  font-size: 13px;
  color: #111;
  line-height: 1.45;
  margin: 0 0 3px;
}

.nbell-text strong {
  font-weight: 700;
}

.nbell-subtext {
  font-size: 12px;
  color: #666;
  line-height: 1.4;
  margin: 0;
}

/* Inline vote buttons for pending group requests */
.nbell-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  width: 100%;
  flex-basis: 100%;
}

.nbell-vote-btn {
  flex: 1;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 5px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.nbell-vote-btn.approve {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.nbell-vote-btn.approve:hover:not(:disabled) {
  background: #d1fae5;
  border-color: #6ee7b7;
}

.nbell-vote-btn.reject {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.nbell-vote-btn.reject:hover:not(:disabled) {
  background: #fee2e2;
  border-color: #fca5a5;
}

.nbell-vote-btn:disabled {
  opacity: 0.5;
  cursor: wait;
}

/* Allow nbell-actions to wrap onto a new line under the content */
.nbell-item {
  flex-wrap: wrap;
}

/* Time + unread dot */
.nbell-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.nbell-time {
  font-size: 11px;
  color: #999;
  white-space: nowrap;
}

.nbell-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4a5fc1;
  flex-shrink: 0;
}

.nbell-dot.muted {
  background: #ccc;
}

/* Footer */
.nbell-footer {
  padding: 12px 20px;
  text-align: center;
  border-top: 1px solid #f0f0f0;
}

.nbell-view-all {
  background: none;
  border: none;
  color: #4a5fc1;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
}

.nbell-view-all:hover {
  text-decoration: underline;
}

.nbell-empty {
  padding: 40px 20px;
  text-align: center;
  color: #999;
  font-size: 13px;
}

/* ── Mobile Responsive ── */
@media (max-width: 768px) {
  .nbell-dropdown {
    position: fixed;
    right: 4px;
    left: 4px;
    top: calc(var(--header-height, 60px) + 4px);
    width: auto;
  }
}
