/* Add Font Awesome CDN if not already included */

.ui-toast-icon {
  aspect-ratio: 1;
  flex-shrink: 0;
  text-align: center;
  line-height: 1.5rem;
  font-size: 1.25rem; 
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Success Toast Icon */
.ui-toast--success .ui-toast-icon::before {
  content: ""; 
  display: block; 
  background-image: url(../images/icons/success.png) !important;
  background-size: contain; 
  background-repeat: no-repeat;
  width: 30px; 
  height: 30px; 
  margin-right: 8px; 
}

.ui-toast--success {
     background: #b8ffc8 !important;
}

.ui-toast--danger {
    background: #ffdada !important;
}

.ui-toast--warning{
    background: #ffdada !important;
}

/* Danger Toast Icon */
.ui-toast--danger .ui-toast-icon::before {
  content: ""; 
  display: block; 
  background-image: url(../images/icons/failed.png) !important;
  background-size: contain; 
  background-repeat: no-repeat;
  width: 30px; 
  height: 30px; 
  margin-right: 8px;  
}

/* Warning Toast Icon */
.ui-toast--warning .ui-toast-icon::before {
  content: ""; 
  display: block; 
  background-image: url(../images/icons/warning.png) !important; 
  background-size: contain; 
  background-repeat: no-repeat;
  width: 30px; 
  height: 30px; 
  margin-right: 8px; 
}

/* Info Toast Icon */
.ui-toast--info .ui-toast-icon::before {
  content: "\f05a"; /* Font Awesome info-circle icon */
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  color: #17a2b8; 
}

/* Positioning of Toast */
.ui-toasts {
  z-index: 999;
  position: fixed;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  top: 0;
  right: 0; 
  border-radius:10px;
  border: 0;
}

/* Positioning for different corners and sides */
.ui-toasts--top-start {
  top: 0;
  left: 0;
  right: auto;
  margin: 0;
      padding: 0;
}

.ui-toasts--top-end {
  top: 0;
  right: 0;
  left: auto;
  margin: 0;
      padding: 0;
}

.ui-toasts--bottom-start {
  bottom: 0;
  left: 0;
  right: auto;
  margin: 0;
      padding: 0;
}

.ui-toasts--bottom-end {
  bottom: 0;
  right: 0;
  left: auto;
  margin: 0;
}

.ui-toasts--top {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}

.ui-toasts--bottom {
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

/* Toast Styles */
.ui-toast {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: fit-content;
  flex-shrink: 0;
  overflow: hidden;
  gap: 0.375rem;
  padding: 15px 30px;
  font-size: 16px;
  font-weight: 600;
  color: #000000;
  pointer-events: auto;
  animation-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1);
  backdrop-filter: blur(0.375rem);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.ui-toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  opacity: 0.15;
}

.ui-toast-progress::before {
  content: "";
  display: block;
  height: 100%;
  width: calc(100% * 0); /* Adjust for progress */
  background: currentColor;
}

.ui-toasts--bottom .ui-toast {
  animation: slide-in-up 0.3s ease-in, fade-in 0.3s ease-in;
}

.ui-toasts--top .ui-toast {
  animation: slide-in-down 0.3s ease-in, fade-in 0.3s ease-in;
}

.ui-toasts--bottom .ui-toast-leave {
  animation: slide-out-down 0.3s ease-out, fade-out 0.3s ease-out;
}

.ui-toasts--top .ui-toast-leave {
  animation: slide-out-up 0.3s ease-out, fade-out 0.3s ease-out;
}

/* Keyframes for animations */
@keyframes slide-in-up {
  0% {
    transform: translateY(100%);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes slide-in-down {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes slide-out-down {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(100%);
  }
}

@keyframes slide-out-up {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-100%);
  }
}

@keyframes fade-in {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes fade-out {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
