/* Notifications Component Styles */

.notification-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1050;
  max-width: 400px;
  width: calc(100% - 2rem);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.notification {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  pointer-events: auto;
  opacity: 0;
  transform: translateX(100%);
  animation: notification-slide-in 0.3s ease-out forwards;
  position: relative;
  overflow: hidden;
}

.notification.notification-hiding {
  animation: notification-slide-out 0.3s ease-in forwards;
}

.notification-icon {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-top: 0.125rem;
}

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.notification-message {
  font-size: 0.875rem;
  word-wrap: break-word;
}

.notification-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.notification-actions .btn {
  font-size: 0.8rem;
  padding: 0.25rem 0.75rem;
}

.notification-with-actions {
  padding-bottom: 1rem;
}

.notification-close {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s ease;
  padding: 0;
  font-size: 1.25rem;
  line-height: 1;
}

.notification-close:hover {
  opacity: 1;
}

.notification-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: currentColor;
  opacity: 0.3;
}

/* Success Notification */
.notification-success {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  border-left: 4px solid #28a745;
  color: #155724;
}

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

.notification-success .notification-close {
  color: #155724;
}

/* Error Notification */
.notification-error {
  background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
  border-left: 4px solid #dc3545;
  color: #721c24;
}

.notification-error .notification-icon {
  color: #dc3545;
}

.notification-error .notification-close {
  color: #721c24;
}

/* Warning Notification */
.notification-warning {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeeba 100%);
  border-left: 4px solid #ffc107;
  color: #856404;
}

.notification-warning .notification-icon {
  color: #d39e00;
}

.notification-warning .notification-close {
  color: #856404;
}

/* Info Notification */
.notification-info {
  background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
  border-left: 4px solid #17a2b8;
  color: #0c5460;
}

.notification-info .notification-icon {
  color: #17a2b8;
}

.notification-info .notification-close {
  color: #0c5460;
}

/* Inline notifications (for forms, etc.) */
.notification-inline {
  position: static;
  transform: none;
  animation: notification-fade-in 0.3s ease-out forwards;
  margin-bottom: 1rem;
  max-width: 100%;
  width: 100%;
}

.notification-inline.notification-hiding {
  animation: notification-fade-out 0.3s ease-in forwards;
}

/* Animations */
@keyframes notification-slide-in {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes notification-slide-out {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

@keyframes notification-fade-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes notification-fade-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

@keyframes notification-progress {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}

/* Mobile adjustments */
@media (max-width: 576px) {
  .notification-container {
    top: 0.5rem;
    right: 0.5rem;
    left: 0.5rem;
    max-width: none;
    width: auto;
  }

  .notification {
    padding: 0.875rem 1rem;
  }

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

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

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .notification {
    animation-duration: 0.1s;
  }

  .notification.notification-hiding {
    animation-duration: 0.1s;
  }

  .notification-progress {
    display: none;
  }
}
