/* notifications.css - Notifications System Styles */

/* ============================================
   NOTIFICATION CONTAINER
   ============================================ */

.notification-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
  width: 100%;
  pointer-events: none;
}

/* ✅ FIX: Ensure navigation is not blocked by notifications */
nav {
  pointer-events: auto !important;
  z-index: 10001 !important;
}

/* ============================================
   NOTIFICATION BASE
   ============================================ */

.notification {
  background: white;
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-left: 5px solid #283655;
  overflow: hidden;
  pointer-events: auto;
  transform: translateX(120%);
  opacity: 0;
  animation: slideInRight 0.4s ease-out forwards;
  position: relative;
  min-height: 70px;
}

.notification.removing {
  animation: slideOutRight 0.3s ease-in forwards;
}

/* ============================================
   NOTIFICATION CONTENT
   ============================================ */

.notification-content {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  position: relative;
}

.notification-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}

.notification-message {
  flex: 1;
  color: #283655;
  font-size: 0.95rem;
  line-height: 1.4;
  font-weight: 500;
}

.notification-close {
  background: transparent;
  border: none;
  color: #666;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 5px;
  border-radius: 50%;
  transition: all 0.3s ease;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notification-close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #283655;
}

/* ============================================
   NOTIFICATION TYPES
   ============================================ */

/* Success Notification */
.notification.success {
  border-left-color: #28a745;
  background: linear-gradient(135deg, #f0f8f0 0%, #e8f5e8 100%);
}

.notification.success .notification-icon {
  color: #28a745;
}

.notification.success .notification-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #28a745, #218838);
}

/* Error Notification */
.notification.error {
  border-left-color: #f44336;
  background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
}

.notification.error .notification-icon {
  color: #f44336;
  animation: shake 0.5s ease-in-out;
}

.notification.error .notification-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #f44336, #d32f2f);
}

/* Warning Notification */
.notification.warning {
  border-left-color: #ff9800;
  background: linear-gradient(135deg, #fff3e0 0%, #ffcc02 100%);
}

.notification.warning .notification-icon {
  color: #ff9800;
  animation: pulse 1s ease-in-out infinite;
}

.notification.warning .notification-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #ff9800, #f57c00);
}

/* Info Notification */
.notification.info {
  border-left-color: #DFA774;
  background: linear-gradient(135deg, #fdf5ed 0%, #f5e6d4 100%);
}

.notification.info .notification-icon {
  color: #DFA774;
}

.notification.info .notification-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #DFA774, #d4955f);
}

/* ============================================
   NOTIFICATION PROGRESS BAR
   ============================================ */

.notification-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.notification-progress-bar {
  height: 100%;
  width: 100%;
  transform-origin: left;
  transition: transform linear;
}

.notification.success .notification-progress-bar {
  background: linear-gradient(90deg, #28a745, #218838);
}

.notification.error .notification-progress-bar {
  background: linear-gradient(90deg, #f44336, #d32f2f);
}

.notification.warning .notification-progress-bar {
  background: linear-gradient(90deg, #ff9800, #f57c00);
}

.notification.info .notification-progress-bar {
  background: linear-gradient(90deg, #DFA774, #d4955f);
}

/* Progress animation */
.notification-progress-bar.animate {
  animation: progressShrink var(--duration, 5s) linear forwards;
}

/* ============================================
   NOTIFICATION WITH ACTIONS
   ============================================ */

.notification-with-actions {
  padding-bottom: 60px;
}

.notification-actions {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.notification-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s ease;
  min-width: 70px;
}

.notification-btn-primary {
  background: #283655;
  color: white;
}

.notification-btn-primary:hover {
  background: #1e2a43;
  transform: translateY(-1px);
}

.notification-btn-secondary {
  background: #f8f9fa;
  color: #666;
  border: 1px solid #e9ecef;
}

.notification-btn-secondary:hover {
  background: #e9ecef;
  color: #283655;
}

/* ============================================
   NOTIFICATION QUEUE SYSTEM
   ============================================ */

.notification-queue {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notification:nth-child(1) {
  animation-delay: 0s;
}
.notification:nth-child(2) {
  animation-delay: 0.1s;
}
.notification:nth-child(3) {
  animation-delay: 0.2s;
}
.notification:nth-child(4) {
  animation-delay: 0.3s;
}
.notification:nth-child(5) {
  animation-delay: 0.4s;
}

/* Stack older notifications */
.notification-container .notification:nth-child(n + 4) {
  transform: scale(0.95) translateX(120%);
  opacity: 0.7;
}

.notification-container .notification:nth-child(n + 6) {
  display: none;
}

/* ============================================
   TOAST NOTIFICATIONS (Alternative Style)
   ============================================ */

.toast-notification {
  background: rgba(0, 0, 0, 0.9);
  color: white;
  border-radius: 25px;
  padding: 12px 20px;
  font-size: 0.9rem;
  font-weight: 500;
  border: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  min-height: auto;
}

.toast-notification .notification-content {
  padding: 0;
  gap: 10px;
}

.toast-notification .notification-icon {
  font-size: 1.2rem;
}

.toast-notification .notification-message {
  color: white;
  font-weight: 400;
}

.toast-notification .notification-close {
  color: rgba(255, 255, 255, 0.7);
  width: 24px;
  height: 24px;
  font-size: 1rem;
}

.toast-notification .notification-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

/* ============================================
   BANNER NOTIFICATIONS
   ============================================ */

.banner-notification {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: 15px 20px;
  text-align: center;
  font-weight: 500;
  color: white;
  transform: translateY(-100%);
  animation: slideDownBanner 0.5s ease-out forwards;
}

.banner-notification.removing {
  animation: slideUpBanner 0.3s ease-in forwards;
}

.banner-notification.success {
  background: linear-gradient(135deg, #28a745, #218838);
}

.banner-notification.error {
  background: linear-gradient(135deg, #f44336, #d32f2f);
}

.banner-notification.warning {
  background: linear-gradient(135deg, #ff9800, #f57c00);
}

.banner-notification.info {
  background: linear-gradient(135deg, #DFA774, #d4955f);
}

.banner-close {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  transition: background 0.3s ease;
}

.banner-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ============================================
   NOTIFICATION ICONS
   ============================================ */

.notification.success .notification-icon::before {
  content: '\f00c'; /* Font Awesome check */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
}

.notification.error .notification-icon::before {
  content: '\f057'; /* Font Awesome times-circle */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
}

.notification.warning .notification-icon::before {
  content: '\f071'; /* Font Awesome exclamation-triangle */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
}

.notification.info .notification-icon::before {
  content: '\f05a'; /* Font Awesome info-circle */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
  .notification-container {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }

  .notification-content {
    padding: 15px;
    gap: 12px;
  }

  .notification-message {
    font-size: 0.9rem;
  }

  .notification-actions {
    padding: 12px 15px;
    flex-direction: column;
  }

  .notification-btn {
    width: 100%;
  }

  .banner-notification {
    padding: 12px 15px;
    font-size: 0.9rem;
  }

  .banner-close {
    right: 15px;
  }
}

@media (max-width: 480px) {
  .notification-container {
    top: 5px;
    right: 5px;
    left: 5px;
  }

  .notification {
    border-radius: 8px;
    min-height: 60px;
  }

  .notification-content {
    padding: 12px;
    gap: 10px;
  }

  .notification-icon {
    font-size: 1.3rem;
  }

  .notification-message {
    font-size: 0.85rem;
  }

  .notification-close {
    width: 26px;
    height: 26px;
    font-size: 1rem;
  }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes slideInRight {
  from {
    transform: translateX(120%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(120%);
    opacity: 0;
  }
}

@keyframes slideDownBanner {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes slideUpBanner {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-100%);
  }
}

@keyframes progressShrink {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* ============================================
   NOTIFICATION GROUPS
   ============================================ */

.notification-group {
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  border-left: 5px solid #DFA774;
}

.notification-group-header {
  background: #f8f9fa;
  padding: 15px 20px;
  border-bottom: 1px solid #e9ecef;
  font-weight: 600;
  color: #283655;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notification-group-count {
  background: #DFA774;
  color: white;
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 0.8rem;
  font-weight: 500;
}

.notification-group-items {
  max-height: 200px;
  overflow-y: auto;
}

.notification-group-item {
  padding: 12px 20px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.9rem;
  color: #666;
}

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

/* ============================================
   DARK MODE SUPPORT
   ============================================ */

@media (prefers-color-scheme: dark) {
  .notification {
    background: #283655;
    color: #ecf0f1;
  }

  .notification-message {
    color: #ecf0f1;
  }

  .notification-close {
    color: #bdc3c7;
  }

  .notification-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ecf0f1;
  }

  .notification-actions {
    background: rgba(44, 62, 80, 0.9);
    border-top-color: rgba(255, 255, 255, 0.1);
  }

  .notification-btn-secondary {
    background: #34495e;
    color: #ecf0f1;
    border-color: #4a5f7a;
  }

  .notification-btn-secondary:hover {
    background: #4a5f7a;
    color: #ecf0f1;
  }
}
