.toast-container {
  position: fixed;
  z-index: 9999;
  right: 20px;
  bottom: 20px;
  max-width: 350px;
}

.toast-list {
  display: flex;
  flex-direction: column-reverse;
  padding: 0;
  margin: 0;
  gap: 0.75rem;
}

.toast-item {
  display: flex;
}

.toast {
  z-index: calc(var(--toast-count) - var(--toast-index));
  display: flex;
  overflow: hidden;
  width: 18rem;
  height: 5rem;
  box-sizing: border-box;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border: 1px solid var(--primary-color-7);
  border-radius: 0.5rem;
  margin-top: -4rem;
  box-shadow: 0 4px 12px rgb(0 0 0 / 15%);
  filter: brightness(calc(0.5 + 0.5 * (1 - ((var(--toast-index) + 1) / 4))));
  opacity: calc(1 - var(--toast-hidden));
  transform: scale(
    calc(100% - var(--toast-index) * 5%),
    calc(100% - var(--toast-index) * 2%)
  );
  transition: transform 0.2s ease, margin-top 0.2s ease, opacity 0.2s ease;

  --toast-hidden: calc(min(max(0, var(--toast-index) - 2), 1));
}

.toast-container:not(:hover, :focus-within)
  .toast[data-toast-even]:not([data-top]) {
  animation: slide-up-even 0.2s ease-out;
}

.toast-container:not(:hover, :focus-within)
  .toast[data-toast-odd]:not([data-top]) {
  animation: slide-up-odd 0.2s ease-out;
}

@keyframes slide-up-even {
  from {
    transform: translateY(0.5rem)
      scale(
        calc(100% - var(--toast-index) * 5%),
        calc(100% - var(--toast-index) * 2%)
      );
  }

  to {
    transform: translateY(0)
      scale(
        calc(100% - var(--toast-index) * 5%),
        calc(100% - var(--toast-index) * 2%)
      );
  }
}

@keyframes slide-up-odd {
  from {
    transform: translateY(0.5rem)
      scale(
        calc(100% - var(--toast-index) * 5%),
        calc(100% - var(--toast-index) * 2%)
      );
  }

  to {
    transform: translateY(0)
      scale(
        calc(100% - var(--toast-index) * 5%),
        calc(100% - var(--toast-index) * 2%)
      );
  }
}

.toast[data-top] {
  animation: slide-in 0.2s ease-out;
}

.toast-container:hover .toast[data-top],
.toast-container:focus-within .toast[data-top] {
  animation: slide-in 0 ease-out;
}

@keyframes slide-in {
  from {
    opacity: 0;
    transform: translateY(100%)
      scale(
        calc(110% - var(--toast-index) * 5%),
        calc(110% - var(--toast-index) * 2%)
      );
  }

  to {
    opacity: 1;
    transform: translateY(0)
      scale(
        calc(100% - var(--toast-index) * 5%),
        calc(100% - var(--toast-index) * 2%)
      );
  }
}

.toast-container:hover .toast,
.toast-container:focus-within .toast {
  margin-top: var(--toast-padding);
  filter: brightness(1);
  opacity: 1;
  transform: scale(calc(100%));
}

.toast[data-type="success"] {
  background-color: var(--primary-success-color);
  color: var(--secondary-success-color);
}

.toast[data-type="error"] {
  background-color: var(--primary-error-color);
  color: var(--contrast-error-color);
}

.toast[data-type="warning"] {
  background-color: var(--primary-warning-color);
  color: var(--secondary-warning-color);
}

.toast[data-type="info"] {
  background-color: var(--primary-info-color);
  color: var(--secondary-info-color);
}

.toast-content {
  flex: 1;
  margin-right: 8px;
  transition: filter 0.2s ease;
}

.toast-title {
  margin-bottom: 4px;
  color: var(--secondary-color-4);
  font-weight: 600;
}

.toast-description {
  color: var(--secondary-color-3);
  font-size: 0.875rem;
}

.toast-close {
  align-self: flex-start;
  padding: 0;
  border: none;
  margin: 0;
  background: none;
  color: var(--secondary-color-3);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.toast-close:hover {
  color: var(--secondary-color-1);
}

.skeleton {
  border-radius: 0.375rem;
  animation: skeleton-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  background-color: var(--primary-color-7);
}

@keyframes skeleton-pulse {
  0%,
  100% {
    opacity: 1;
  }

  61.8% {
    opacity: 0.5;
  }
}

.select {
  position: relative;
}

.select-trigger {
  position: relative;
  display: flex;
  box-sizing: border-box;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 0.25rem;
  padding: 8px 12px;
  border: none;
  border-radius: 0.5rem;
  border-radius: calc(0.5rem);
  background: none;
  background: var(--primary-color-3);
  box-shadow: inset 0 0 0 1px var(--primary-color-7);
  color: var(--secondary-color-4);
  cursor: pointer;
  gap: 0.25rem;
  transition: background-color 100ms ease-out;
}

.select-trigger span[data-placeholder="true"] {
  color: var(--secondary-color-5);
}

.select[data-state="open"] .select-trigger {
  pointer-events: none;
}

.select-expand-icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--secondary-color-5);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.select-check-icon {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: var(--secondary-color-5);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.select[data-disabled="true"] .select-trigger {
  color: var(--secondary-color-5);
  cursor: not-allowed;
}

.select-trigger:hover:not([data-disabled="true"]),
.select-trigger:focus-visible {
  background: var(--light, var(--primary-color-4))
    var(--dark, var(--primary-color-5));
  color: var(--secondary-color-1);
  outline: none;
}

.select-list {
  position: absolute;
  z-index: 1000;
  top: 100%;
  left: 0;
  min-width: 100%;
  box-sizing: border-box;
  padding: 0.25rem;
  border-radius: 0.5rem;
  margin-top: 0.25rem;
  background: var(--primary-color-5);
  box-shadow: inset 0 0 0 1px var(--primary-color-7);
  opacity: 0;
  pointer-events: none;
  transform-origin: top;
  will-change: transform, opacity;
}

.select-list[data-state="closed"] {
  animation: select-list-animate-out 150ms ease-in forwards;
  pointer-events: none;
}

@keyframes select-list-animate-out {
  0% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }

  100% {
    opacity: 0;
    transform: scale(0.95) translateY(-2px);
  }
}

.select-list[data-state="open"] {
  animation: select-list-animate-in 150ms ease-out forwards;
  pointer-events: auto;
}

@keyframes select-list-animate-in {
  0% {
    opacity: 0;
    transform: scale(0.95) translateY(-2px);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: calc(0.5rem - 0.25rem);
  cursor: pointer;
  font-size: 14px;
}

.select-option[data-disabled="true"] {
  color: var(--secondary-color-5);
  cursor: not-allowed;
}

.select-option:hover:not([data-disabled="true"]),
.select-option:focus-visible {
  background: var(--primary-color-7);
  color: var(--secondary-color-1);
  outline: none;
}

.select-group-label {
  padding: 4px 12px;
  color: var(--secondary-color-5);
  font-size: 0.75rem;
}

[data-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.5;
}

