/* notifications-dropdown.css - Notifications dropdown styling
 * BroJack SOLIUS - October 2025
 * Domain: UI
 */

/* ===== NOTIFICATIONS DROPDOWN CONTAINER ===== */
.notifications-dropdown {
  position: fixed;
  width: 360px;
  max-height: 480px;
  background: rgba(28, 35, 56, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(83, 98, 133, 0.3);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 10000;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  font-family: 'Montserrat', sans-serif;
}

.notifications-dropdown.open {
  opacity: 1;
  transform: translateY(0);
}

/* ===== EMPTY STATE ===== */
.notifications-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  gap: 16px;
}

.empty-icon {
  width: 64px;
  height: 64px;
  background: rgba(83, 98, 133, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.empty-bell-icon {
  width: 32px;
  height: 32px;
  opacity: 0.5;
}

.empty-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 18px;
  line-height: 24px;
  color: #FFFFFF;
  margin: 0;
}

.empty-subtitle {
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  color: #536285;
  margin: 0;
}

/* ===== NOTIFICATIONS HEADER ===== */
.notifications-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(83, 98, 133, 0.2);
}

.notifications-header h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 18px;
  line-height: 24px;
  color: #FFFFFF;
  margin: 0;
}

.btn-mark-all-read {
  background: transparent;
  border: none;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  color: #555DFF;
  cursor: pointer;
  transition: color 0.2s ease;
}

.btn-mark-all-read:hover {
  color: #7178FE;
}

/* ===== NOTIFICATIONS LIST ===== */
.notifications-list {
  max-height: 360px;
  overflow-y: auto;
}

/* Custom scrollbar for notifications list */
.notifications-list::-webkit-scrollbar {
  width: 6px;
}

.notifications-list::-webkit-scrollbar-track {
  background: rgba(83, 98, 133, 0.1);
  border-radius: 3px;
}

.notifications-list::-webkit-scrollbar-thumb {
  background: rgba(83, 98, 133, 0.3);
  border-radius: 3px;
}

.notifications-list::-webkit-scrollbar-thumb:hover {
  background: rgba(83, 98, 133, 0.5);
}

/* ===== NOTIFICATION ITEM ===== */
.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(83, 98, 133, 0.1);
  cursor: pointer;
  transition: background 0.2s ease;
  position: relative;
}

.notification-item:hover {
  background: rgba(85, 93, 255, 0.05);
}

.notification-item.unread {
  background: rgba(85, 93, 255, 0.03);
}

.notification-item.unread:hover {
  background: rgba(85, 93, 255, 0.08);
}

/* Notification icon */
.notification-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}

.notification-icon.message {
  background: rgba(85, 93, 255, 0.1);
  color: #555DFF;
}

.notification-icon.system {
  background: rgba(83, 98, 133, 0.1);
  color: #536285;
}

.notification-icon.warning {
  background: rgba(255, 181, 108, 0.1);
  color: #FFB56C;
}

.notification-icon.success {
  background: rgba(123, 255, 191, 0.1);
  color: #7BFFBF;
}

/* Notification content */
.notification-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.notification-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 14px;
  line-height: 20px;
  color: #FFFFFF;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-message {
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  font-size: 13px;
  line-height: 18px;
  color: #536285;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.notification-time {
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 16px;
  color: #536285;
  opacity: 0.7;
  margin-top: 2px;
}

/* Unread dot */
.notification-unread-dot {
  width: 8px;
  height: 8px;
  background: #555DFF;
  border-radius: 50%;
  flex-shrink: 0;
  position: absolute;
  right: 24px;
  top: 24px;
}

/* ===== NOTIFICATIONS FOOTER ===== */
.notifications-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(83, 98, 133, 0.2);
  background: rgba(10, 15, 35, 0.3);
}

.btn-view-all {
  width: 100%;
  padding: 10px 16px;
  background: rgba(85, 93, 255, 0.1);
  border: 1px solid rgba(85, 93, 255, 0.3);
  border-radius: 8px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  color: #555DFF;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-view-all:hover {
  background: rgba(85, 93, 255, 0.15);
  border-color: rgba(85, 93, 255, 0.5);
  color: #7178FE;
}

/* ===== BADGE ON BELL ICON ===== */
/* Agent #1 - October 22, 2025 - Notification System Integration */
.notifications-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #FF4757;
  color: white;
  border-radius: 10px;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 600;
  font-family: 'Montserrat', sans-serif;
  min-width: 18px;
  text-align: center;
  pointer-events: none;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(255, 71, 87, 0.4);
}

/* ===== NOTIFICATION ITEM REFACTOR ===== */
/* Agent #1 - Updated structure to support dismiss buttons */
.notification-item {
  flex-direction: column;
  gap: 8px;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(83, 98, 133, 0.1);
  cursor: pointer;
  transition: background 0.2s ease;
  position: relative;
}

.notification-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.notification-item .notification-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 14px;
  line-height: 20px;
  color: #FFFFFF;
}

.notification-item .notification-time {
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 16px;
  color: #536285;
  opacity: 0.7;
  white-space: nowrap;
}

.notification-item .notification-message {
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  font-size: 13px;
  line-height: 18px;
  color: #536285;
}

/* Dismiss button */
.notification-dismiss {
  margin-top: 8px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  transition: all 0.2s;
  align-self: flex-start;
}

.notification-dismiss:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Empty state update - emoji instead of icon */
.empty-icon {
  font-size: 48px;
  margin-bottom: 8px;
}

.empty-text {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 18px;
  line-height: 24px;
  color: #FFFFFF;
  margin: 0;
}

.empty-subtext {
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  color: #536285;
  margin: 0;
}

/* ===== NOTIFICATION DETAIL MODAL ===== */
/* Agent #1 - Full screen modal for notification details */

.notification-detail-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.notification-detail-modal.active {
  opacity: 1;
}

.notification-detail-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.notification-detail-content {
  position: relative;
  width: 90%;
  max-width: 500px;
  background: linear-gradient(135deg, rgba(28, 35, 56, 0.98) 0%, rgba(20, 25, 40, 0.98) 100%);
  border: 1px solid rgba(85, 93, 255, 0.3);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 100px rgba(85, 93, 255, 0.2);
  overflow: hidden;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
}

.notification-detail-modal.active .notification-detail-content {
  transform: scale(1) translateY(0);
}

.notification-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 32px 24px 32px;
  border-bottom: 1px solid rgba(83, 98, 133, 0.2);
}

.notification-detail-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  background: rgba(85, 93, 255, 0.1);
}

.notification-detail-icon.type-info {
  background: rgba(85, 93, 255, 0.15);
}

.notification-detail-icon.type-success {
  background: rgba(0, 217, 140, 0.15);
}

.notification-detail-icon.type-warning {
  background: rgba(255, 184, 0, 0.15);
}

.notification-detail-icon.type-error {
  background: rgba(255, 71, 87, 0.15);
}

.notification-detail-close {
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notification-detail-close:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(90deg);
}

.notification-detail-body {
  padding: 32px;
}

.notification-detail-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 24px;
  line-height: 32px;
  color: #FFFFFF;
  margin: 0 0 16px 0;
}

.notification-detail-message {
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  color: #C4C9DB;
  margin: 0 0 16px 0;
}

.notification-detail-time {
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: #536285;
}

.notification-detail-footer {
  padding: 24px 32px 32px 32px;
  border-top: 1px solid rgba(83, 98, 133, 0.2);
}

.notification-detail-dismiss-btn {
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, #555DFF 0%, #7178FE 100%);
  border: none;
  border-radius: 12px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
}

.notification-detail-dismiss-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(85, 93, 255, 0.4);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  /* MOBILE NOTIFICATION DROPDOWN - AGENT #2 FIX (Oct 25, 2025) */
  .notifications-dropdown {
    /* FULL-WIDTH MOBILE DESIGN */
    position: fixed !important;
    top: 68px !important; /* Below 60px mobile header + 8px gap */
    left: 16px !important; /* 16px margin on sides */
    right: 16px !important; /* 16px margin on sides */
    width: calc(100vw - 32px) !important; /* Full width minus margins */
    max-width: none !important; /* Remove desktop max-width */
    max-height: calc(100vh - 160px) !important; /* Room for header (60px) + bottom nav (64px) + gaps */
    
    /* FORCE ABOVE EVERYTHING */
    z-index: 99999 !important; /* Above mobile header (999) and bottom nav (1000) */
    
    /* MOBILE-OPTIMIZED STYLING */
    background: rgba(14, 20, 41, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(85, 93, 255, 0.3);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    
    /* SCROLLING */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* NOTIFICATION ITEMS - Touch-friendly sizing */
  .notification-item {
    padding: 18px 20px !important; /* More padding for touch */
    min-height: 60px; /* Touch target */
  }
  
  /* EMPTY STATE - Mobile friendly */
  .notifications-empty {
    padding: 48px 20px !important;
    font-size: 16px;
  }
  
  /* HEADER - HIDDEN ON MOBILE (Agent #2 - Oct 25, 2025) */
  /* No need for "Notifications" title on mobile - saves space, obvious from context */
  .notifications-header {
    display: none !important; /* Hide completely on mobile */
  }
  
  /* NOTIFICATIONS LIST - Mobile scroll */
  .notifications-list {
    max-height: none !important; /* Let parent control max-height */
  }
  
  /* NOTIFICATION DETAIL MODAL - Mobile optimized */
  .notification-detail-content {
    width: 95%;
    max-width: none;
  }
  
  .notification-detail-header,
  .notification-detail-body,
  .notification-detail-footer {
    padding: 24px;
  }
  
  .notification-detail-title {
    font-size: 20px;
    line-height: 28px;
  }
  
  .notification-detail-message {
    font-size: 14px;
    line-height: 20px;
  }
}

