/* ============================================================
   NOTIFICATIONS SYSTEM STYLES
   Consolidated: Bell, Badge, Slide-out Panel, Items, Actions
   ============================================================ */

/* ========== BELL BUTTON ========== */
.notif-bell-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.notif-bell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
  color: #cbd5e1;
}

.notif-bell:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.notif-bell.active {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.notif-bell svg {
  /* 22px glyph on a 40px button, 1.75 stroke: larger and cleaner on the
     dark bar than 20px at stroke 2, which fills its own counters. */
  width: 22px;
  height: 22px;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ========== NOTIFICATION BADGE ========== */
.notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

/* ========== SLIDE-OUT PANEL ========== */
.notif-panel {
  position: fixed;
  top: 0;
  right: -480px;
  width: 480px;
  height: 100vh;
  background: #ffffff;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}

.notif-panel.open {
  right: 0;
}

/* ========== PANEL HEADER ========== */
.notif-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 1px solid #e5e7eb;
}

.notif-panel-title {
  font-size: 24px;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

.notif-panel-close {
  background: none;
  border: none;
  font-size: 32px;
  color: #6b7280;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.notif-panel-close:hover {
  color: #111827;
}

/* ========== TABS ========== */
.notif-panel-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 24px 0;
  border-bottom: 1px solid #e5e7eb;
}

.notif-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s;
}

.notif-tab:hover {
  color: #111827;
}

.notif-tab.active {
  color: #111827;
  border-bottom-color: #667eea;
}

.notif-settings {
  margin-left: auto;
  background: none;
  border: none;
  padding: 8px;
  color: #6b7280;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notif-settings:hover {
  color: #111827;
}

/* ========== PANEL CONTENT ========== */
.notif-panel-content {
  flex: 1;
  overflow-y: auto;
  position: relative;
}

.notif-tab-content {
  display: none;
  height: 100%;
}

.notif-tab-content.active {
  display: block;
}

.notif-list {
  padding: 16px 24px;
}

/* ========== EMPTY STATE ========== */
.notif-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  text-align: center;
  color: #6b7280;
}

.notif-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.notif-empty-title {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 8px;
}

.notif-empty-subtitle {
  font-size: 14px;
  color: #9ca3af;
}

/* ========== NOTIFICATION ITEMS ========== */
.notif-item {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: #f9fafb;
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.2s;
  position: relative;
}

.notif-item:hover {
  background: #f3f4f6;
}

.notif-item.notif-unread {
  background: #eff6ff;
  border-left: 3px solid #667eea;
}

.notif-item.notif-unread:hover {
  background: #dbeafe;
}

/* ========== NOTIFICATION ICON ========== */
.notif-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-icon-success {
  background: #d1fae5;
  color: #10b981;
}

.notif-icon-info {
  background: #dbeafe;
  color: #3b82f6;
}

.notif-icon-warning {
  background: #fef3c7;
  color: #f59e0b;
}

.notif-icon-error {
  background: #fee2e2;
  color: #ef4444;
}

.notif-icon-campaign {
  background: #f3e8ff;
  color: #9333ea;
}

.notif-icon-message {
  background: #cffafe;
  color: #0891b2;
}

.notif-icon-client {
  background: #fce7f3;
  color: #db2777;
}

/* ========== NOTIFICATION CONTENT ========== */
.notif-content {
  flex: 1;
  min-width: 0;
}

.notif-title {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
}

.notif-message {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notif-time {
  font-size: 12px;
  color: #9ca3af;
}

/* ========== ACTION BUTTONS CONTAINER ========== */
.notif-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  position: absolute;
  top: 12px;
  right: 12px;
  opacity: 0;
  transition: opacity 0.2s;
}

.notif-item:hover .notif-actions {
  opacity: 1;
}

/* ========== RESTORE BUTTON ========== */
.notif-restore {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.15s ease;
}

.notif-restore:hover {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

/* ========== DISMISS BUTTON ========== */
.notif-dismiss {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #9ca3af;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.15s ease;
}

.notif-dismiss:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

/* ========== LOADING STATE ========== */
.notif-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px;
  color: #6b7280;
}

.notif-loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e5e7eb;
  border-top-color: #667eea;
  border-radius: 50%;
  animation: notif-spin 0.8s linear infinite;
}

@keyframes notif-spin {
  to { transform: rotate(360deg); }
}

.notif-loading span {
  font-size: 13px;
  color: #6b7280;
}

/* ========== TRASH ACTIONS ========== */
.notif-trash-actions {
  padding: 16px 24px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
  position: sticky;
  bottom: 0;
}

.btn-clear-trash {
  width: 100%;
  padding: 12px;
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-clear-trash:hover {
  background: #dc2626;
}

.btn-clear-trash:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

/* ========== OVERLAY ========== */
.notif-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.notif-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* ========== SCROLLBAR ========== */
.notif-list::-webkit-scrollbar {
  width: 6px;
}

.notif-list::-webkit-scrollbar-track {
  background: transparent;
}

.notif-list::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

.notif-list::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 520px) {
  .notif-panel {
    width: 100vw;
    right: -100vw;
  }
  
  .notif-panel.open {
    right: 0;
  }
}

/* ========== NOTIFICATION CHECKBOXES ========== */

.notif-checkbox {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin: 0;
  cursor: pointer;
  accent-color: var(--primary-500, #6366F1);
  align-self: center;
}

/* ========== BULK ACTION BAR ========== */

.notif-bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  margin-bottom: 8px;
  background: var(--slate-50, #F8FAFC);
  border-radius: 8px;
  border: 1px solid var(--slate-200, #E2E8F0);
  min-height: 36px;
}

.notif-select-all-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: var(--mm-text-secondary, #475569);
}

.notif-select-all {
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--primary-500, #6366F1);
}

.notif-bulk-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.notif-bulk-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-600, #4F46E5);
}

.notif-bulk-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid var(--slate-200, #E2E8F0);
  border-radius: 4px;
  background: var(--mm-bg-white, #fff);
  font-size: 12px;
  font-weight: 500;
  color: var(--mm-text-secondary, #475569);
  cursor: pointer;
  transition: all 0.15s;
}

.notif-bulk-btn:hover {
  background: var(--slate-100, #F1F5F9);
  border-color: var(--slate-300, #CBD5E1);
}

.notif-bulk-trash-btn:hover {
  color: var(--error-600, #DC2626);
  border-color: var(--error-200, #FECACA);
  background: var(--error-50, #FEF2F2);
}

.notif-bulk-restore-btn:hover {
  color: var(--success-600, #16A34A);
  border-color: var(--success-200, #BBF7D0);
  background: var(--success-50, #F0FDF4);
}