/*TOAST*/
:root {
  --toast-success: #4caf50;
  --toast-error: #b52b22;
  --toast-warning: #ff9800;
  --toast-info: #f7941d;
  --toast-title: #222;
  --toast-text: #666;
}

.toast .message .text.text-1 {
  color: var(--toast-title);
}
.toast .message .text {
  color: var(--toast-text);
}

/* Toast container positioned at top-right */
.toast-container {
  position: fixed;
  top: 15px;
  right: 15px;
  z-index: 1200;
  pointer-events: auto;
}

/* Base toast style – offscreen by default */
.toast {
  position: relative;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6)!important; /* Slight transparency */
  padding: 8px 15px 8px 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  border-left: 6px solid var(--toast-info);
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.35);
  backdrop-filter: blur(6px); /* Frosted effect */
  min-width:15vw;
}

.toast:not(.active) {
  opacity: 0;
  transform: translateY(-100px) !important; /* Start above viewport */
}

/* Start from the right */
/* .toast:not(.active) {
  opacity: 0;
  transform: translateX(calc(100% + 30px)) !important;
} */
.toast:not(.active) .progress:before {
  right: 100%;
}

/* Active states */
.toast.active {
  opacity: 1;
  transform: translateX(0) !important;
}

.toast.hiding {
  opacity: 0;
  transform: translateX(100%) !important;
}

.toast .toast-content {
  display: flex;
  align-items: center;
}

.toast-content .check {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  width: 24px;
  background-color: var(--toast-info);
  color: #fff;
  font-size: 14px;
  border-radius: 50%;
}

.toast-content .message {
  display: flex;
  flex-direction: column;
  margin: 0 12px;
}

.message .text {
  font-size: 12px;
  font-weight: 400;
}

.message .text.text-1 {
  font-weight: 600;
  font-size: 14px;
}

.toast .close {
  position: absolute;
  top: 8px;
  right: 10px;
  padding: 3px;
  font-size: 14px;
  cursor: pointer;
  opacity: 0.7;
}

.toast .close:hover {
  opacity: 1;
}

.toast .progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: rgba(0, 0, 0, 0.05);
}

.toast .progress:before {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  height: 100%;
  width: 100%;
  background-color: var(--toast-info);
}

.toast.active .progress:before {
  animation: progress 5s linear forwards;
}

@keyframes progress {
  100% {
    right: 100%;
  }
}

/* Toast Type Overrides */
.toast.success {
  border-left-color: var(--toast-success);
}
.toast.success .check,
.toast.success .progress:before {
  background-color: var(--toast-success);
}

.toast.error {
  border-left-color: var(--toast-error);
}
.toast.error .check,
.toast.error .progress:before {
  background-color: var(--toast-error);
}

.toast.warning {
  border-left-color: var(--toast-warning);
}
.toast.warning .check,
.toast.warning .progress:before {
  background-color: var(--toast-warning);
}

.toast.info {
  border-left-color: var(--toast-info);
}
.toast.info .check,
.toast.info .progress:before {
  background-color: var(--toast-info);
}

/* Manual Bootstrap theme wins if set */
[data-bs-theme="dark"] .toast {
  background: rgba(40, 40, 40, 0.6)!important;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}
[data-bs-theme="dark"] .toast .toast-content .message .text.text-1 {
  color: #f1f1f1;
}
[data-bs-theme="dark"] .toast .toast-content .message .text {
  color: #dbdbdb;
}
[data-bs-theme="dark"] .toast .progress {
  background: rgba(255, 255, 255, 0.1);
}
[data-bs-theme="dark"] .toast .close {
  color: #eee;
}
