/* Toast Base Styles */
.toast {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  padding: 10px 14px;
  padding-bottom: 12px;
  border-radius: 10px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 12px;
  color: #2c3e50;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
  width: 270px;
  max-width: 290px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  opacity: .8;

}

/* Toast Icon Wrapper: Solid circle */
.toast-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  margin-right: 10px;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.toast-icon-wrapper svg {
  width: 12px;
  height: 12px;
}

/* Content Area */
.toast-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-right: 6px;
}

.toast-title {
  font-weight: 700;
  font-size: 12.5px;
  color: #1a202c;
  line-height: 1.2;
}

.toast-message {
  font-weight: 450;
  font-size: 11.5px;
  color: #4a5568;
  line-height: 1.35;
}

/* Close Button on the Right */
.toast-close-btn {
  background: none;
  border: none;
  padding: 3px;
  margin: -3px;
  border-radius: 5px;
  color: #a0aec0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.toast-close-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #4a5568;
}

.toast-close-btn svg {
  width: 11px;
  height: 11px;
}

/* Progress bar inside toasts */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 100%;
  transform-origin: left;
  animation: toast-progress 3.2s linear forwards;
}

/* Success State */
.toast.success {
  background: rgba(240, 249, 244, 0.88);
  border: 1.5px solid #22c55e;
}

.toast.success .toast-icon-wrapper {
  background: #22c55e;
}

.toast.success .toast-progress {
  background: #22c55e;
}

/* Info State */
.toast.info {
  background: rgba(239, 246, 255, 0.88);
  border: 1.5px solid #3b82f6;
}

.toast.info .toast-icon-wrapper {
  background: #3b82f6;
}

.toast.info .toast-progress {
  background: #3b82f6;
}

/* Warning State */
.toast.warning {
  background: rgba(254, 252, 232, 0.88);
  border: 1.5px solid #eab308;
}

.toast.warning .toast-icon-wrapper {
  background: #eab308;
}

.toast.warning .toast-progress {
  background: #eab308;
}

/* Error/Danger State */
.toast.error,
.toast.danger {
  background: rgba(254, 242, 242, 0.88);
  border: 1.5px solid #ef4444;
}

.toast.error .toast-icon-wrapper,
.toast.danger .toast-icon-wrapper {
  background: #ef4444;
}

.toast.error .toast-progress,
.toast.danger .toast-progress {
  background: #ef4444;
}

/* Animations */
@keyframes toast-in-left {
  from {
    opacity: 0;
    transform: translateX(-16px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(16px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

/* Exit Animations */
.toast.toast-out {
  animation: toast-out-left 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toast-out-left {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
  }

  to {
    opacity: 0;
    transform: translateX(-16px) scale(0.97);
  }
}

.toast.toast-out-right {
  animation: toast-out-right 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toast-out-right {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
  }

  to {
    opacity: 0;
    transform: translateX(16px) scale(0.97);
  }
}

@keyframes toast-progress {
  from {
    transform: scaleX(1);
  }

  to {
    transform: scaleX(0);
  }
}