/* ==========================================
   NOTIFICATION STYLES
   Bell, Panel, Items, Preferences
   ========================================== */

.notification-bell {
  position: relative;
  display: none;
}

.notification-bell.active {
  display: flex;
}

.notification-bell-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bp-surface-elevated);
  border: 1px solid var(--bp-border);
  border-radius: 8px;
  color: var(--bp-text-muted);
  cursor: pointer;
  font-size: 18px;
  transition: all 0.2s ease;
}

.notification-bell-btn:hover {
  border-color: var(--bp-primary);
  color: var(--bp-primary);
}

.notification-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  background: var(--bp-danger);
  color: white;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

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

/* Notification Panel */
.notification-panel {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  width: 360px;
  max-height: 480px;
  background: var(--bp-surface);
  border: 1px solid var(--bp-border);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  z-index: 1000;
  overflow: hidden;
}

.notification-panel.active {
  display: flex;
  flex-direction: column;
}

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

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

.notification-panel-actions {
  display: flex;
  gap: 8px;
}

.notification-panel-action {
  padding: 4px 8px;
  background: none;
  border: 1px solid var(--bp-border);
  border-radius: 6px;
  color: var(--bp-text-muted);
  cursor: pointer;
  font-size: 11px;
  transition: all 0.2s ease;
}

.notification-panel-action:hover {
  border-color: var(--bp-primary);
  color: var(--bp-primary);
}

/* Notification List */
.notification-list {
  flex: 1;
  overflow-y: auto;
  max-height: 380px;
}

.notification-item {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--bp-border);
  cursor: pointer;
  transition: background 0.2s ease;
  position: relative;
}

.notification-item:hover {
  background: var(--bp-surface-elevated);
}

.notification-item.unread {
  background: rgba(15, 118, 110, 0.08);
}

.notification-item.unread::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--bp-primary);
}

.notification-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bp-primary-soft);
  color: var(--bp-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

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

.notification-title {
  font-weight: 500;
  font-size: 13px;
  color: var(--bp-text);
  margin-bottom: 4px;
  line-height: 1.3;
}

.notification-body {
  font-size: 12px;
  color: var(--bp-text-muted);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.notification-time {
  font-size: 11px;
  color: var(--bp-text-muted);
  margin-top: 6px;
}

.notification-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--bp-text-muted);
}

.notification-empty-icon {
  font-size: 36px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.notification-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--bp-border);
  text-align: center;
}

.notification-footer-btn {
  background: none;
  border: none;
  color: var(--bp-primary);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
}

.notification-footer-btn:hover {
  text-decoration: underline;
}

/* Notification Preferences Modal */
.notification-prefs-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10001;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(4px);
}

.notification-prefs-modal.active {
  display: flex;
}

.notification-prefs-content {
  background: var(--bp-surface);
  border-radius: 16px;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  border: 1px solid var(--bp-border);
}

.notification-pref-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--bp-border);
}

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

.notification-pref-label {
  font-size: 14px;
  color: var(--bp-text);
}

.notification-pref-desc {
  font-size: 12px;
  color: var(--bp-text-muted);
  margin-top: 2px;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  width: 48px;
  height: 26px;
  background: var(--bp-border);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.toggle-switch.active {
  background: var(--bp-primary);
}

.toggle-switch-handle {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.toggle-switch.active .toggle-switch-handle {
  transform: translateX(22px);
}

/* Light Mode Overrides */
[data-theme="light"] .notification-panel {
  background: var(--bp-surface);
  border-color: var(--bp-border);
}

[data-theme="light"] .notification-item.unread {
  background: rgba(14, 165, 233, 0.05);
}

[data-theme="light"] .notification-item.unread::before {
  background: var(--bp-primary);
}
