
/* =============================
   NOTIFICATIONS.CSS
   Unified notification styles
============================= */

.notification {
  position: fixed;
  z-index: 2000;
  padding: 1rem 1.5rem;
  border-radius: 0.8rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 300px;
  max-width: 500px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification.show {
  opacity: 1;
  transform: translateX(0);
}

.notification.notification-exit {
  opacity: 0;
  transform: translateX(100%);
}

/* Position classes */
.notification.top-right {
  top: 20px;
  right: 20px;
}

.notification.top-left {
  top: 20px;
  left: 20px;
  transform: translateX(-100%);
}

.notification.top-left.show {
  transform: translateX(0);
}

.notification.top-left.notification-exit {
  transform: translateX(-100%);
}

.notification.bottom-right {
  bottom: 20px;
  right: 20px;
}

.notification.bottom-left {
  bottom: 20px;
  left: 20px;
  transform: translateX(-100%);
}

.notification.bottom-left.show {
  transform: translateX(0);
}

.notification.bottom-left.notification-exit {
  transform: translateX(-100%);
}

/* Type-specific styles */
.success-notification {
  background: linear-gradient(135deg, #4CAF50, #45a049);
  color: white;
}

.error-notification {
  background: linear-gradient(135deg, #dc3545, #c82333);
  color: white;
}

.warning-notification {
  background: linear-gradient(135deg, #ffc107, #e0a800);
  color: #212529;
}

.info-notification {
  background: linear-gradient(135deg, #17a2b8, #138496);
  color: white;
}

/* Notification content */
.notification-content {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
}

.notification-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.notification-text {
  flex: 1;
}

.notification-title {
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.notification-message {
  font-size: 0.95rem;
  opacity: 0.95;
}

.notification-close {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 1.2rem;
  opacity: 0.7;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.notification-close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .notification {
    min-width: auto;
    max-width: calc(100vw - 20px);
    left: 10px !important;
    right: 10px !important;
    transform: translateY(-100%) !important;
  }

  .notification.show {
    transform: translateY(0) !important;
  }

  .notification.notification-exit {
    transform: translateY(-100%) !important;
  }

  .notification.top-right,
  .notification.top-left {
    top: 10px;
  }

  .notification.bottom-right,
  .notification.bottom-left {
    bottom: 10px;
    transform: translateY(100%) !important;
  }

  .notification.bottom-right.notification-exit,
  .notification.bottom-left.notification-exit {
    transform: translateY(100%) !important;
  }
}

/* Legacy notification support */
.success-notification:not(.notification),
.error-notification:not(.notification),
.info-notification:not(.notification) {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 1rem 1.5rem;
  border-radius: 0.8rem;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  z-index: 2000;
  font-weight: 500;
  animation: slideInRight 0.4s ease-out;
  max-width: 400px;
  word-wrap: break-word;
}

/* Legacy animations */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
