/* Notification System Styles */
* {
  -webkit-tap-highlight-color: transparent !important;
  outline: none !important;
}

.notification-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  max-width: 400px;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  pointer-events: none; /* Let taps pass through the invisible parts of the container */
}

.notification {
  pointer-events: auto; /* Re-enable taps for the actual notification banners */
  position: relative;
  margin-bottom: 12px;
  padding: 16px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: notificationAppear 0.3s ease-out;
  transform-origin: top right;
  display: flex;
  flex-direction: column;
  min-width: 300px;
  max-width: 100%;
  opacity: 1;
  transition: opacity 0.3s ease-in-out;
}

/* Style for read notifications with lower opacity */
.notification.read {
  opacity: 0.6; /* Lower opacity when read */
}

.notification-dismissing {
  opacity: 0;
  transform: translateY(-20px) scale(0.95);
  transition: all 0.3s ease;
}

.notification-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.notification-title {
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  margin: 0;
  color: inherit;
}

.notification-close {
  background: none;
  border: none;
  padding: 0;
  margin-left: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

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

.notification-close svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  color: inherit;
}

.notification-message {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
  color: inherit;
}

/* Notification Types */
.notification-success {
  background-color: #d1fae5;
  border: 1px solid #6ee7b7;
  color: #065f46;
}

.notification-error {
  background-color: #fee2e2;
  border: 1px solid #f87171;
  color: #991b1b;
}

.notification-warning {
  background-color: #fef3c7;
  border: 1px solid #fbbf24;
  color: #92400e;
}

.notification-info {
  background-color: #dbeafe;
  border: 1px solid #93c5fd;
  color: #1e40af;
}

/* Animations */
@keyframes notificationAppear {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .notification-container {
    top: 10px;
    right: 10px;
    left: 10px;
  }
  
  .notification {
    min-width: auto;
    margin-right: 0;
  }
  
  .notification-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .notification-title {
    margin-bottom: 8px;
  }
  
  .notification-close {
    margin-left: 12px;
    margin-top: 4px;
  }
}

/* Accessibility */
.notification[aria-live="assertive"] {
  /* Ensures screen readers announce the notification */
}

/* Focus styles for keyboard navigation */
.notification-close:focus {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* For notification system integration */
.notification-system {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

.notification-system .notification {
  pointer-events: auto;
}

/* History Panel Items */
.notification-history-item {
  position: relative;
  transition: all 0.3s ease-in-out;
  padding: 12px;
  margin-bottom: 8px;
  border-radius: 12px;
  cursor: pointer;
  color: inherit;
  list-style: none;
  background: rgba(255, 255, 255, 0.05);
  border-left: 4px solid rgba(255, 255, 255, 0.1);
  box-shadow: none; /* Reset shadow from .notification class if applied */
  min-width: auto; /* Reset min-width from .notification class if applied */
}

.notification-history-item.unread {
  background: rgba(59, 130, 246, 0.08);
  border-left-color: #3b82f6;
}

.notification-history-item.read {
  opacity: 0.6;
}

.notification-history-item:hover {
  background: rgba(255, 255, 255, 0.1);
  opacity: 1 !important;
}

.notification-history-item.unread::after {
  content: '';
  position: absolute;
  top: 12px;
  right: 12px;
  width: 8px;
  height: 8px;
  background-color: #3b82f6;
  border-radius: 50%;
  box-shadow: 0 0 8px #3b82f6;
}

.notification-history-item:hover {
  background: rgba(255, 255, 255, 0.08) !important;
}