:root {
  --radius: 0.5rem;

  --success-background: hsl(142deg 100% 27.48% / 80%);
  --success-foreground: hsl(0, 0%, 100%);

  --danger-background: hsl(0deg 75.44% 55.11% / 90%);
  --danger-foreground: hsl(0, 0%, 100%);

  --warning-background: hsl(38deg 93.17% 40.84% / 90%);
  --warning-foreground: hsl(48, 96%, 95%);

  --info-background: hsla(204, 100%, 50%, 0.9);
  --info-foreground: hsl(0, 0%, 100%);

  --hover-background: hsla(0, 0%, 0%, 0.1);
}

.dark {
  --success-background: hsla(142, 70%, 25%, 0.9);
  --success-foreground: hsl(142, 76%, 96%);

  --danger-background: hsla(0, 72%, 35%, 0.9);
  --danger-foreground: hsl(0, 0%, 98%);

  --warning-background: hsla(48, 95%, 30%, 0.9);
  --warning-foreground: hsl(48, 96%, 95%);

  --info-background: hsla(217, 91%, 40%, 0.9);
  --info-foreground: hsl(210, 40%, 98%);

  --hover-background: hsla(0, 0%, 100%, 0.1);
}

.toastr-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: fixed;
  z-index: 999999;
  width: 100%;
  max-width: 22rem;
}

.position-top-right {
  top: 1.5rem;
  right: 1.5rem;
}

.position-bottom-middle {
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
}

.position-bottom-right {
  bottom: 1.5rem;
  right: 1.5rem;
}

.toastr-container .toastr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  border-radius: var(--radius);
  box-shadow:
    0 4px 6px -1px rgb(0 0 0 / 0.1),
    0 2px 4px -2px rgb(0 0 0 / 0.1);

  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.toastr-container .toastr .close {
  flex-shrink: 0;
  margin-left: 0.75rem;
  padding: 0.25rem;
  border-radius: 0.375rem;
  background-color: transparent;
  border: none;
  cursor: pointer;
  color: inherit;
  opacity: 0.8;
}

.toastr-container .toastr .close:hover {
  background-color: var(--hover-background);
  opacity: 1;
}

.toastr .toast-message-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toastr .toast-message {
  font-size: 0.875rem;
  line-height: 1.4;
  margin-left: 0;
}

.toastr .icon {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 1px;
}

.toastr-success {
  background-color: var(--success-background);
  color: var(--success-foreground);
}

.toastr-danger {
  background-color: var(--danger-background);
  color: var(--danger-foreground);
}

.toastr-warning {
  background-color: var(--warning-background);
  color: var(--warning-foreground);
}

.toastr-info {
  background-color: var(--info-background);
  color: var(--info-foreground);
}

@media (max-width: 640px) {
  .toastr-container {
    width: auto;
    max-width: 20rem;
  }

  .position-top-right {
    top: 1rem;
    right: 1rem;
  }

  .position-bottom-right {
    bottom: 1rem;
    right: 1rem;
  }

  .position-bottom-middle {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    transform: none;
  }

  .toastr-container .toastr {
    padding: 0.5rem 0.75rem;
  }

  .toastr .toast-message-container {
    gap: 0.25rem;
  }

  .toastr .toast-message {
    font-size: 0.8125rem;
  }
  .toastr .icon {
    width: 1rem;
    height: 1rem;
    margin-top: 0;
  }
}
