/* Mobile Notification Styles - Fix for transparent background issue */

.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  min-width: 300px;
  max-width: 90vw;
  padding: 16px 20px;
  border-radius: 0;
  color: var(--white);
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: var(--z-toast);
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  word-wrap: break-word;
  pointer-events: auto;
  cursor: pointer;
}

/* Show state for notifications */
.notification.show {
  opacity: 1;
  transform: translateX(0);
}

/* Success notifications - Green */
.notification.success {
  background: linear-gradient(135deg, 
    rgba(16, 185, 129, 0.95) 0%, 
    rgba(5, 150, 105, 0.95) 100%);
  border-color: rgba(52, 211, 153, 0.5);
}

.notification.success::before {
  content: '✅';
  margin-right: 8px;
  font-size: 16px;
}

/* Error notifications - Red */
.notification.error {
  background: linear-gradient(135deg, 
    rgba(239, 68, 68, 0.95) 0%, 
    rgba(220, 38, 38, 0.95) 100%);
  border-color: rgba(248, 113, 113, 0.5);
}

.notification.error::before {
  content: '❌';
  margin-right: 8px;
  font-size: 16px;
}

/* Warning notifications - Orange */
.notification.warning {
  background: linear-gradient(135deg, 
    rgba(245, 158, 11, 0.95) 0%, 
    rgba(217, 119, 6, 0.95) 100%);
  border-color: rgba(251, 191, 36, 0.5);
}

.notification.warning::before {
  content: '⚠️';
  margin-right: 8px;
  font-size: 16px;
}

/* Info notifications - Blue */
.notification.info {
  background: linear-gradient(135deg, 
    rgba(59, 130, 246, 0.95) 0%, 
    rgba(37, 99, 235, 0.95) 100%);
  border-color: rgba(96, 165, 250, 0.5);
}

.notification.info::before {
  content: 'ℹ️';
  margin-right: 8px;
  font-size: 16px;
}

/* Default notification style */
.notification:not(.success):not(.error):not(.warning):not(.info) {
  background: linear-gradient(135deg, 
    rgba(55, 65, 81, 0.95) 0%, 
    rgba(31, 41, 55, 0.95) 100%);
  border-color: rgba(156, 163, 175, 0.5);
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
  .notification {
    top: 10px;
    right: 10px;
    left: 10px;
    width: auto;
    max-width: calc(100vw - 20px);
    min-width: auto;
    padding: 14px 16px;
    font-size: 13px;
    border-radius: 0;
  }
  
  /* Adjust z-index to be above mobile navigation */
  .notification {
    z-index: var(--z-toast-mobile);
  }
  
  /* Stack notifications on mobile */
  .notification:nth-child(n+2) {
    top: 80px;
  }
  
  .notification:nth-child(n+3) {
    top: 150px;
  }
}

/* Small mobile screens */
@media (max-width: 480px) {
  .notification {
    top: 8px;
    right: 8px;
    left: 8px;
    max-width: calc(100vw - 16px);
    padding: 12px 14px;
    font-size: 12px;
    border-radius: 0;
  }
}

/* Hover effect for notifications */
.notification:hover {
  transform: translateX(-4px) scale(1.02);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
}

/* Click to dismiss effect */
.notification:active {
  transform: translateX(-2px) scale(0.98);
  transition: transform 0.1s ease;
}

/* Animation for notification removal */
.notification.removing {
  opacity: 0;
  transform: translateX(100%) scale(0.95);
  transition: all 0.3s ease;
}

/* Ensure text is always readable */
.notification * {
  color: var(--white) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Special styling for long messages */
.notification.long-message {
  max-width: 400px;
  white-space: normal;
  word-break: break-word;
}

@media (max-width: 768px) {
  .notification.long-message {
    max-width: calc(100vw - 20px);
  }
}

/* High contrast mode for accessibility */
@media (prefers-contrast: high) {
  .notification {
    border-width: 2px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  
  .notification.success {
    background: var(--success-dark);
  }
  
  .notification.error {
    background: var(--danger-dark);
  }
  
  .notification.warning {
    background: var(--warning-dark);
  }
  
  .notification.info {
    background: var(--primary-blue-dark);
  }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .notification {
    transition: opacity 0.2s ease;
    transform: none;
  }
  
  .notification.show {
    opacity: 1;
    transform: none;
  }
  
  .notification:hover {
    transform: none;
  }
}
