/* ===== Modern Notification System Styles ===== */

/* Main widget container */
.notification-widget {
  position: fixed;
  top: 20px;
  right: 20px;
  display: inline-block;
  z-index: 10000;
}

/* Modern Bell Button */
.notif-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  font-size: 18px;
  cursor: pointer;
  position: relative;
  color: white;
  padding: 12px;
  border-radius: 50%;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.notif-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.notif-btn:active {
  transform: translateY(0) scale(0.98);
}

/* Unread Count Badge */
.notif-count {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #ff4757;
  color: #fff;
  border-radius: 10px;
  padding: 3px 7px;
  font-size: 11px;
  font-weight: bold;
  min-width: 18px;
  text-align: center;
  display: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  animation: pulse 2s infinite;
  border: 2px solid white;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
  }
}

/* Modern Dropdown */
.notif-dropdown {
  position: fixed;
  top: 0;
  left: 0;
  width: 380px;
  max-height: 500px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  display: none;
  z-index: 10001;
  animation: slideDown 0.25s ease-out;
  border: 1px solid #f0f0f0;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-15px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Header */
.notif-header {
  padding: 18px 20px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  position: sticky;
  top: 0;
  z-index: 2;
}

.notif-header-title {
  font-weight: 700;
  color: #2c3e50;
  font-size: 18px;
  letter-spacing: -0.2px;
}

.notif-header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.notif-inline-btn {
  background: rgba(255, 255, 255, 0.8);
  border: none;
  color: #64748b;
  font-size: 12px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  backdrop-filter: blur(5px);
}

.notif-inline-btn:hover {
  background: white;
  color: #334155;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Filter Tabs */
.notif-filters {
  display: flex;
  padding: 12px 20px;
  border-bottom: 1px solid #f0f0f0;
  gap: 8px;
  background: #f8fafc;
}

.filter-btn {
  padding: 8px 16px;
  border: none;
  background: #e2e8f0;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  background: #cbd5e1;
  color: #475569;
}

.filter-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

/* Notifications List */
.notif-list {
  max-height: 350px;
  overflow-y: auto;
  position: relative;
}

.notif-list::-webkit-scrollbar {
  width: 6px;
}

.notif-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.notif-list::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.notif-list::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Notification Item */
.notif-item {
  padding: 16px 20px;
  border-bottom: 1px solid #f8f9fa;
  cursor: pointer;
  display: flex;
  gap: 14px;
  transition: all 0.2s ease;
  position: relative;
}

.notif-item:hover {
  background: #f8fafc;
  transform: translateX(4px);
}

.notif-item.unread {
  background: linear-gradient(90deg, rgba(102, 126, 234, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
  border-left: 4px solid #667eea;
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-item-content {
  flex: 1;
  min-width: 0;
}

.notif-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
  gap: 8px;
}

.notif-title {
  font-weight: 600;
  color: #1a202c;
  font-size: 14px;
  line-height: 1.3;
  margin: 0;
}

.notif-priority {
  font-size: 9px;
  padding: 3px 8px;
  border-radius: 12px;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
  letter-spacing: 0.5px;
}

.notif-priority.high {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
  color: white;
}

.notif-priority.medium {
  background: linear-gradient(135deg, #feca57 0%, #ff9ff3 100%);
  color: #2f3542;
}

.notif-priority.low {
  background: linear-gradient(135deg, #48dbfb 0%, #0abde3 100%);
  color: white;
}

.notif-priority.urgent {
  background: linear-gradient(135deg, #ff9ff3 0%, #f368e0 100%);
  color: white;
}

.notif-message {
  font-size: 13px;
  color: #4a5568;
  line-height: 1.5;
  margin-bottom: 8px;
  word-wrap: break-word;
}

.notif-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #718096;
}

.notif-lead-info {
  font-weight: 600;
  color: #2d3748;
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 6px;
}

.notif-timestamp {
  color: #a0aec0;
  font-weight: 500;
}

.notif-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.notif-item:hover .notif-actions {
  opacity: 1;
}

.notif-action-btn {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #64748b;
  white-space: nowrap;
  font-weight: 600;
}

.notif-action-btn:hover {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: #667eea;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

/* Empty State */
.notif-empty,
.notif-loading {
  padding: 50px 20px;
  text-align: center;
  color: #a0aec0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.notif-empty i,
.notif-loading i {
  font-size: 40px;
  opacity: 0.5;
}

.notif-empty p,
.notif-loading p {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}

/* Footer */
.notif-footer {
  padding: 16px 20px;
  border-top: 1px solid #f0f0f0;
  background: #fafbfc;
}

.notif-view-all {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  color: #667eea;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 8px;
  transition: all 0.2s ease;
  background: white;
  border: 1px solid #e2e8f0;
}

.notif-view-all:hover {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-decoration: none;
  border-color: #667eea;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

/* Loading Animation */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.fa-spin {
  animation: spin 1s linear infinite;
}

/* Responsive Design */
@media (max-width: 480px) {
  .notif-dropdown {
    width: calc(100vw - 32px);
    right: 16px;
    left: 16px;
    top: 70px;
  }

  .notification-widget {
    top: 16px;
    right: 16px;
  }

  .notif-header {
    padding: 14px 16px;
  }

  .notif-item {
    padding: 14px 16px;
  }

  .notif-filters {
    padding: 10px 16px;
  }
}

/* Notification Type Icons */
.notif-type-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.notif-type-lead_created {
  background: linear-gradient(135deg, #10ac84 0%, #1dd1a1 100%);
  color: white;
}

.notif-type-lead_updated {
  background: linear-gradient(135deg, #feca57 0%, #ff9f43 100%);
  color: white;
}

.notif-type-lead_assigned {
  background: linear-gradient(135deg, #48dbfb 0%, #0abde3 100%);
  color: white;
}

.notif-type-lead_status_changed {
  background: linear-gradient(135deg, #ff9ff3 0%, #f368e0 100%);
  color: white;
}

.notif-type-attachment_added {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
  color: white;
}

.notif-type-bulk_action {
  background: linear-gradient(135deg, #a29bfe 0%, #6c5ce7 100%);
  color: white;
}

.notif-type-lead_archived {
  background: linear-gradient(135deg, #636e72 0%, #2d3436 100%);
  color: white;
}

.notif-type-activity_log {
  background: linear-gradient(135deg, #00d2d3 0%, #54a0ff 100%);
  color: white;
}

.notif-type-followup_scheduled {
  background: linear-gradient(135deg, #fdcb6e 0%, #e17055 100%);
  color: white;
}

.notif-type-system_announcement {
  background: linear-gradient(135deg, #fd79a8 0%, #e84393 100%);
  color: white;
}

/* Unread indicator dot */
.notif-item.unread::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -2px;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: #667eea;
  border-radius: 50%;
  box-shadow: 0 0 0 2px white;
}