/**
 * Toast Notification System CSS
 * Stilvorlagen für das wiederverwendbare Toast-System
 */

/* Toast Container */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10002;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

/* Toast Base Styles */
.toast {
  background: rgba(19, 30, 47, 0.05); /* Sehr hohe Transparenz */
  backdrop-filter: blur(40px); /* Noch stärkerer Blur */
  -webkit-backdrop-filter: blur(40px);
  border-radius: 16px; /* Rundere Ecken */
  padding: 20px 24px; /* Mehr Padding für größere Icons */
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 2px 0 rgba(255, 255, 255, 0.12);
  border-left: 5px solid #28a745; /* Dickerer Standard-Akzent */
  color: rgba(255, 255, 255, 0.95); /* Hellere Textfarbe */
  font-size: 15px; /* Etwas größerer Text */
  font-weight: 500;
  min-width: 350px; /* Breitere Toasts */
  max-width: 500px;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); /* Langsamere Animation */
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 18px; /* Mehr Abstand für größere Icons */
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  position: relative;
}

/* Animation */
.toast.show {
  opacity: 1;
  transform: translateX(0);
}

/* Toast Types mit einheitlicher Transparenz und kräftigen Farbakzenten */
.toast.success {
  border-left-color: rgba(40, 167, 69, 1);
  background: rgba(19, 30, 47, 0.05); /* Einheitlich sehr transparent */
  box-shadow: 
    0 8px 32px rgba(40, 167, 69, 0.25), /* Stärkerer farbiger Schein */
    0 4px 16px rgba(40, 167, 69, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border-left-width: 5px; /* Dickerer Akzent-Border */
}

.toast.error {
  border-left-color: rgba(220, 53, 69, 1);
  background: rgba(19, 30, 47, 0.05); /* Einheitlich sehr transparent */
  box-shadow: 
    0 8px 32px rgba(220, 53, 69, 0.25),
    0 4px 16px rgba(220, 53, 69, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border-left-width: 5px;
}

.toast.warning {
  border-left-color: rgba(255, 193, 7, 1);
  background: rgba(19, 30, 47, 0.05); /* Einheitlich sehr transparent */
  box-shadow: 
    0 8px 32px rgba(255, 193, 7, 0.25),
    0 4px 16px rgba(255, 193, 7, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border-left-width: 5px;
}

.toast.info {
  border-left-color: rgba(23, 162, 184, 1);
  background: rgba(19, 30, 47, 0.05); /* Einheitlich sehr transparent */
  box-shadow: 
    0 8px 32px rgba(23, 162, 184, 0.25),
    0 4px 16px rgba(23, 162, 184, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border-left-width: 5px;
}

/* Toast Icon */
.toast-icon {
  width: 32px; /* Noch größere Icons */
  height: 32px;
  flex-shrink: 0;
}

.toast.success .toast-icon {
  filter: brightness(0) saturate(100%) invert(42%) sepia(93%) saturate(1352%) hue-rotate(87deg) brightness(160%) contrast(160%); /* Sehr kräftige Farben */
}

.toast.error .toast-icon {
  filter: brightness(0) saturate(100%) invert(48%) sepia(79%) saturate(2476%) hue-rotate(336deg) brightness(130%) contrast(130%);
}

.toast.warning .toast-icon {
  filter: brightness(0) saturate(100%) invert(84%) sepia(32%) saturate(1515%) hue-rotate(316deg) brightness(140%) contrast(140%);
}

.toast.info .toast-icon {
  filter: brightness(0) saturate(100%) invert(58%) sepia(96%) saturate(1045%) hue-rotate(165deg) brightness(130%) contrast(130%);
}

/* Toast Content mit besserer Glasmorphism-Integration */
.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 600;
  margin-bottom: 2px;
  line-height: 1.2;
  color: rgba(233, 238, 245, 0.95);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.toast-message {
  opacity: 0.85;
  font-size: 13px;
  line-height: 1.4;
  margin: 0;
  color: rgba(233, 238, 245, 0.8);
}

/* Wenn nur Nachricht ohne Titel */
.toast-content .toast-title:empty {
  display: none;
}

.toast-content .toast-title:empty + .toast-message {
  font-size: 14px;
  font-weight: 500;
  opacity: 1;
}

/* Close Button mit Glasmorphism */
.toast-close {
  width: 24px;
  height: 24px;
  background: rgba(233, 238, 245, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(233, 238, 245, 0.1);
  border-radius: 6px;
  color: rgba(233, 238, 245, 0.6);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}

.toast-close:hover {
  background: rgba(233, 238, 245, 0.1);
  border-color: rgba(233, 238, 245, 0.2);
  color: rgba(233, 238, 245, 0.9);
  transform: scale(1.05);
}

.toast-close:focus {
  outline: 2px solid rgba(74, 144, 226, 0.3);
  outline-offset: 1px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
  }
  
  .toast {
    min-width: auto;
    max-width: none;
    width: 100%;
  }
}

/* Dark Mode Support (falls Theme-System vorhanden) */
@media (prefers-color-scheme: dark) {
  .toast {
    background: rgba(19, 30, 47, 0.98);
    color: #e9eef5;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  .toast {
    transition: opacity 0.2s ease;
    transform: none;
  }
  
  .toast.show {
    transform: none;
  }
}