* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --toast-primary-color: #2b66e6;
  --toast-success-color: #1bc857;
  --toast-error-color: rgb(227, 24, 24);
}

/* ⬇️ Container for stacking toasts */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 9999;
}

/* ⬇️ Toast styling */
.toast {
  min-width: 20rem;
  max-width: 28rem;
  background-color: var(--background-white);
  box-shadow: var(--shadow-medium);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color-muted);
  font-size: 0.95rem;
  color: var(--text-primary);

  opacity: 0;
  transform: translateY(20px);
  animation: toast-in 0.35s ease-out forwards;
}

/* ⬇️ Exit transition */
.toast--closing {
  animation: toast-out 0.25s ease-in forwards;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(10px);
  }
}

/* ⬇️ Toast inner layout */
.toast__wrapper {
  padding: 0.75rem 1rem 1rem 1rem;
  display: flex;
  align-items: start;
  gap: 0.5rem;
}

.toast__icon {
  display: grid;
  place-content: center;
}

.toast__icon > * {
  transform: translateY(2.5px);
  color: var(--text-primary);
}

.toast__title {
  font-weight: 600;
  margin: 0;
}

.toast__description {
  margin: 0;
}

/* ⬇️ Progress bar */
.toast__duration-indicator {
  height: 4px;
  width: 100%;
}

.toast__duration-indicator[data-color="primary"] {
  background-color: var(--toast-primary-color);
}

.toast__duration-indicator[data-color="success"] {
  background-color: var(--toast-success-color);
}

.toast__duration-indicator[data-color="error"] {
  background-color: var(--toast-error-color);
}
