#toastContainer {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1050;
}

#grandTotalContainer {
  font-size: 1.75em;
  position: fixed;
  bottom: 0;
  left: 0;
  /* Entferne die fest definierte Hintergrundfarbe, um Dark-Mode-Variablen zu verwenden */
  /* background-color: rgba(255, 255, 255, 0.9); */
  padding: 10px 20px;
  border-top-right-radius: 8px;
  box-shadow: 0 -2px 5px rgba(0,0,0,0.2);
  z-index: 1050;  /* sollte über dem restlichen Inhalt liegen */
  font-weight: bold;
}

/* Toast Grundstil */
.toast {
  position: relative; /* Wichtig für absolute Positionierung des Fortschrittsbalkens */
  overflow: hidden; /* Verhindert, dass der Fortschrittsbalken übersteht */
  min-width: 280px;
  max-width: 350px;
  margin-bottom: 10px;
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1);
  opacity: 1;
}

/* Toast Progress Bar - vereinfachte Version mit weniger !important */
.toast .toast-progress {
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  height: 4px;
  width: 100%; /* Ausgangsbreite - ohne !important, damit Animation funktioniert */
  background-color: #007bff;
  visibility: visible;
  display: block;
  z-index: 2000;
  /* Keine transition hier - wird von JavaScript gesetzt */
}

/* Anpassungen für verschiedene Toast-Größen - ohne !important */
.toast-md .toast-progress {
  height: 5px;
}

.toast-lg .toast-progress {
  height: 6px;
}

.toast-xl .toast-progress {
  height: 7px;
}

/* Farben für verschiedene Toast-Typen */
.toast-success .toast-progress {
  background-color: #28a745;
}

.toast-danger .toast-progress {
  background-color: #dc3545;
}

.toast-info .toast-progress {
  background-color: #ffc107;
}

/* Responsive Toast-Klassen - werden per JavaScript gesetzt */
.toast-md {
  min-width: 380px !important;
  max-width: 450px !important;
  font-size: 1.1rem !important;
}

.toast-md .toast-header {
  font-size: 1.1rem !important;
  padding: 0.6rem 0.8rem !important;
}

.toast-md .toast-body {
  font-size: 1.1rem !important;
  padding: 0.8rem 1.3rem !important;
}

.toast-md .animation-container {
  width: 30px !important;
  height: 30px !important;
  margin-right: 12px !important;
}

.toast-md .checkmark, 
.toast-md .crossmark, 
.toast-md .infomark {
  width: 30px !important;
  height: 30px !important;
}

.toast-lg {
  min-width: 450px !important;
  max-width: 520px !important;
  font-size: 1.25rem !important;
}

.toast-lg .toast-header {
  font-size: 1.3rem !important;
  padding: 0.7rem 1rem !important;
}

.toast-lg .toast-body {
  font-size: 1.25rem !important;
  padding: 1rem 1.5rem !important;
}

.toast-lg .animation-container {
  width: 36px !important;
  height: 36px !important;
  margin-right: 16px !important;
}

.toast-lg .checkmark, 
.toast-lg .crossmark, 
.toast-lg .infomark {
  width: 36px !important;
  height: 36px !important;
}

.toast-xl {
  min-width: 520px !important;
  max-width: 650px !important;
  font-size: 1.4rem !important;
}

.toast-xl .toast-header {
  font-size: 1.5rem !important;
  padding: 0.9rem 1.1rem !important;
}

.toast-xl .toast-body {
  font-size: 1.4rem !important;
  padding: 1.2rem 1.8rem !important;
}

.toast-xl .animation-container {
  width: 45px !important;
  height: 45px !important;
  margin-right: 20px !important;
}

.toast-xl .checkmark, 
.toast-xl .crossmark, 
.toast-xl .infomark {
  width: 45px !important;
  height: 45px !important;
}

.toast-xl .btn {
  font-size: 1.2rem !important;
  padding: 0.4rem 0.8rem !important;
}

/* Toast Typen */
.toast-success {
  background-color: #d4edda !important; /* leicht grün, Bootstrap Success Background */
  color: #155724; /* dunkelgrüne Schrift */
  border-color: #c3e6cb !important;
}
.toast-success .toast-header {
  background-color: #c3e6cb !important;
  color: #155724 !important;
}
.toast-danger {
  background-color: #f8d7da !important;
  color: #721c24 !important;
  border-color: #f5c6cb !important;
}
.toast-danger .toast-header {
  background-color: #f5c6cb !important;
  color: #721c24 !important;
}
.toast-info {
  background-color: #fff3cd !important;
  color: #856404 !important;
  border-color: #ffeeba !important;
}
.toast-info .toast-header {
  background-color: #ffeeba !important;
  color: #856404 !important;
}
.toast-body.text-danger {
  color: #721c24 !important;
}

/* Animation Container */
.animation-container {
  float: left;
  display: flex;
  align-items: center;
  margin-right: 10px;
  width: 25px;
  height: 25px;
}
.toast-body {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.25rem;
}

/* SVG Animationen */
/* Checkmark Animation (Success) */
.checkmark {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  display: block;
  stroke-width: 2;
  stroke: #fff;
  stroke-miterlimit: 10;
  box-shadow: inset 0px 0px 0px #7ac142;
  animation: checkmarkFill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}
.checkmark-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 2;
  stroke-miterlimit: 10;
  stroke: #7ac142;
  fill: none;
  animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}
.checkmark-check {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

/* Crossmark Animation (Error) */
.crossmark {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  display: block;
  stroke-width: 2;
  stroke: #fff;
  stroke-miterlimit: 10;
  box-shadow: inset 0px 0px 0px #dc3545;
  animation: crossmarkFill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}
.crossmark-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 2;
  stroke-miterlimit: 10;
  stroke: #dc3545;
  fill: none;
  animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}
.crossmark-check {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

/* Infomark Animation (Info) */
.infomark {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  display: block;
  stroke-width: 2;
  stroke: #fff;
  stroke-miterlimit: 10;
  box-shadow: inset 0px 0px 0px #ffc107;
  animation: infomarkFill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}
.infomark-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 3;
  stroke-miterlimit: 10;
  stroke: #856404;
  fill: none;
  animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}
.infomark-symbol {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-width: 3;
  stroke-dashoffset: 48;
  stroke: #856404;
  animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

/* Animation Fill Effects */
@keyframes checkmarkFill {
  100% {
    box-shadow: inset 0px 0px 0px 30px #7ac142;
  }
}

@keyframes crossmarkFill {
  100% {
    box-shadow: inset 0px 0px 0px 30px #dc3545;
  }
}

@keyframes infomarkFill {
  100% {
    box-shadow: inset 0px 0px 0px 30px #ffc107;
  }
}

/* Gemeinsame Animation */
@keyframes stroke {
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes scale {
  0%, 100% {
    transform: none;
  }
  50% {
    transform: scale3d(1.1, 1.1, 1);
  }
}

/* Navbar wieder in ihren ursprünglichen Zustand versetzen */
.navbar {
  position: static;
  /* ggf. weitere originale Bootstrap-Eigenschaften */
}

/* Floating Progress Bar */
.floating-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background-color: #007bff;
  z-index: 2100;
  transition: transform 0.5s ease-out;
  transform-origin: left center;
}

.floating-progress-bar.toast-success {
  background-color: #28a745;
}

.floating-progress-bar.toast-danger {
  background-color: #dc3545;
}

.floating-progress-bar.toast-info {
  background-color: #ffc107;
}

/* Fliegendes Icon Styling */
.flying-icon {
  position: fixed;
  z-index: 9999;
  width: 100px;
  height: 100px;
  transition: all 1s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  opacity: 0.9;
  pointer-events: none; /* Verhindert Interaktion mit dem Icon */
}

.flying-icon-success .flying-icon-svg {
  stroke: #28a745;
  fill: none;
  stroke-width: 2;
}

.flying-icon-danger .flying-icon-svg {
  stroke: #dc3545;
  fill: none;
  stroke-width: 2;
}

.flying-icon-info .flying-icon-svg {
  stroke: #ffc107;
  fill: none;
  stroke-width: 2;
}

.flying-icon-svg {
  width: 100%;
  height: 100%;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: flyingIconAppear 0.5s ease-out forwards;
}

@keyframes flyingIconAppear {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Animation Klasse hinzufügen */
.checkmark.animate, 
.crossmark.animate, 
.infomark.animate {
  animation: checkmarkFill .4s ease-in-out forwards, scale .3s ease-in-out 0.4s both;
}

/* Separate die Animationsklassen für verschiedene Symbol-Typen */
.checkmark.animate {
  animation: checkmarkFill .4s ease-in-out forwards, scale .3s ease-in-out 0.4s both;
}

.crossmark.animate {
  animation: crossmarkFill .4s ease-in-out forwards, scale .3s ease-in-out 0.4s both;
}

.infomark.animate {
  animation: infomarkFill .4s ease-in-out forwards, scale .3s ease-in-out 0.4s both;
}

/* Dark Mode Anpassungen für das fliegende Icon */
[data-theme="dark"] .flying-icon-success .flying-icon-svg {
  stroke: #5cb85c;
}

[data-theme="dark"] .flying-icon-danger .flying-icon-svg {
  stroke: #d9534f;
}

[data-theme="dark"] .flying-icon-info .flying-icon-svg {
  stroke: #f0ad4e;
}

/* Zentrale Icon-Animation - Größer und responsiver */
.center-icon {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  /* Verwende viewport-basierte Größen statt fester Pixelwerte */
  width: 70vmin;  /* 70% der kleineren Viewport-Dimension */
  height: 70vmin; /* Quadratisches Verhältnis beibehalten */
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none; /* Verhindert Interaktion mit dem Icon */
  animation: popIn 0.5s ease-out forwards;
}

.center-icon-container {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Proportionalere Polsterung für größere Symbole */
  padding: 10%;
}

/* Responsive Anpassungen für verschiedene Bildschirmgrößen */
@media (max-width: 767.98px) {
  /* Auf kleinen Geräten noch größer */
  .center-icon {
    width: 85vmin;
    height: 85vmin;
  }

  /* Touchfreundlichere Mengenauswahl im Modal */
  #confirmQuantity .input-group-prepend button,
  #confirmQuantity .input-group-append button {
    width: 44px;
    height: 44px;
    font-size: 1.5rem;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
  }

  #confirmQuantity .input-group {
    width: 100%;
    max-width: 180px;
    margin: 0 auto;
  }

  #modalQuantityInput {
    height: 44px;
    font-size: 1.2rem;
    text-align: center;
  }
}

@media (min-width: 1200px) {
  /* Auf sehr großen Bildschirmen nicht übermäßig groß */
  .center-icon {
    width: 60vmin;
    height: 60vmin;
  }
}

/* Für Bilder auf großen Monitoren eine Maximalgröße setzen */
@media (min-width: 2000px) {
  .center-icon {
    width: 50vmin;
    height: 50vmin;
    max-width: 800px;
    max-height: 800px;
  }
}

/* Hintergrundfarben entsprechend den Toast-Typen */
.center-icon-container.toast-success {
  background-color: #d4edda; /* leicht grün, Bootstrap Success Background */
  border: 2px solid #c3e6cb;
}

.center-icon-container.toast-danger {
  background-color: #f8d7da; /* leicht rot, Bootstrap Danger Background */
  border: 2px solid #f5c6cb;
}

.center-icon-container.toast-info {
  background-color: #fff3cd; /* leicht gelb, Bootstrap Info Background */
  border: 2px solid #ffeeba;
}

.center-icon-svg {
  width: 100%;
  height: 100%;
  stroke-width: 3;
  animation: appear 0.5s ease-out forwards 0.3s;
}

/* Animation für das Erscheinen des Mittelsymbols */
.center-icon-svg .checkmark-circle,
.center-icon-svg .crossmark-circle,
.center-icon-svg .infomark-circle {
  /* Füllungen entsprechend der Kreisfüllungen im Toast */
  fill: #7ac142;  /* Grün für Success */
  stroke-width: 2;
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.center-icon-success .center-icon-svg .checkmark-circle {
  fill: #7ac142;  /* Grün für Success-Symbol */
}

.center-icon-danger .center-icon-svg .crossmark-circle {
  fill: #dc3545;  /* Rot für Error-Symbol */
}

.center-icon-info .center-icon-svg .infomark-circle {
  fill: #ffc107;  /* Gelb für Info-Symbol */
}

/* Symbolfarben für den Kontrast */
.center-icon-success .center-icon-svg .checkmark-check {
  stroke: white;  /* Weiß für besseren Kontrast auf farbigem Hintergrund */
  stroke-width: 3;
}

.center-icon-danger .center-icon-svg .crossmark-check {
  stroke: white;  /* Weiß für besseren Kontrast auf farbigem Hintergrund */
  stroke-width: 3;
}

.center-icon-info .center-icon-svg .infomark-symbol {
  stroke: white;  /* Weiß für besseren Kontrast auf farbigem Hintergrund */
  stroke-width: 3;
}

/* Dark Mode Anpassungen für die Kreis-Füllungen */
[data-theme="dark"] .center-icon-success .center-icon-svg .checkmark-circle {
  fill: #28a745;
}

[data-theme="dark"] .center-icon-danger .center-icon-svg .crossmark-circle {
  fill: #dc3545;
}

[data-theme="dark"] .center-icon-info .center-icon-svg .infomark-circle {
  fill: #ffc107;
}

/* Animation für das Erscheinen des Icons */
@keyframes popIn {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

/* Dark Mode Anpassungen */
[data-theme="dark"] .center-icon-container.toast-success {
  background-color: rgba(40, 167, 69, 0.2);
  border-color: rgba(40, 167, 69, 0.4);
}

[data-theme="dark"] .center-icon-container.toast-danger {
  background-color: rgba(220, 53, 69, 0.2);
  border-color: rgba(220, 53, 69, 0.4);
}

[data-theme="dark"] .center-icon-container.toast-info {
  background-color: rgba(255, 193, 7, 0.2);
  border-color: rgba(255, 193, 7, 0.4);
}

/* Touchfreundlichere Mengenauswahl im Modal (für alle Geräte) */
#confirmQuantity .input-group-prepend button,
#confirmQuantity .input-group-append button {
  min-width: 38px;
  min-height: 38px;
  font-size: 1.2rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

#confirmQuantity .input-group {
  margin: 0 auto;
}

#modalQuantityInput {
  min-height: 38px;
  text-align: center;
  font-weight: bold;
}
