.site-toast-region {
  position: fixed;
  top: max(78px, calc(64px + env(safe-area-inset-top)));
  right: 20px;
  z-index: 2147483000;
  display: grid;
  gap: 10px;
  width: min(378px, calc(100vw - 32px));
  pointer-events: none;
}

.site-toast {
  --site-toast-status: #45c78a;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 12px 10px 12px 15px;
  overflow: hidden;
  color: #f4f6f8;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: 0;
  background: #20242c;
  border: 0;
  border-radius: 6px;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.32);
  pointer-events: auto;
  animation: site-toast-enter 220ms cubic-bezier(0.22, 0.8, 0.24, 1) both;
}

.site-toast--error {
  --site-toast-status: #f05b62;
}

.site-toast--warning {
  --site-toast-status: #e9ad45;
}

.site-toast--info {
  --site-toast-status: #7f9db7;
}

.site-toast__icon {
  display: grid;
  width: 20px;
  height: 20px;
  color: var(--site-toast-status);
  place-items: center;
}

.site-toast__icon svg,
.site-toast__close svg {
  display: block;
  width: 100%;
  height: 100%;
}

.site-toast__message {
  min-width: 0;
  overflow-wrap: anywhere;
}

.site-toast__close {
  display: grid;
  width: 30px;
  height: 30px;
  padding: 7px;
  color: #959ca7;
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: 4px;
  transition: color 150ms ease, background-color 150ms ease, transform 100ms ease;
  place-items: center;
}

.site-toast__close:hover {
  color: #eef1f4;
  background: rgba(255, 255, 255, 0.07);
}

.site-toast__close:active {
  transform: scale(0.92);
}

.site-toast__close:focus-visible {
  outline: 2px solid rgba(69, 199, 138, 0.72);
  outline-offset: 1px;
}

.site-toast.is-leaving {
  pointer-events: none;
  animation: site-toast-leave 170ms ease both;
}

[data-theme="light"] .site-toast {
  color: #161a20;
  background: #ffffff;
  box-shadow: 0 16px 38px rgba(24, 32, 42, 0.14), 0 1px 3px rgba(24, 32, 42, 0.12);
}

[data-theme="light"] .site-toast__close {
  color: #77808c;
}

[data-theme="light"] .site-toast__close:hover {
  color: #171b21;
  background: #f0f2f4;
}

@keyframes site-toast-enter {
  from {
    opacity: 0;
    transform: translate3d(22px, 0, 0) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes site-toast-leave {
  from {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    opacity: 0;
    transform: translate3d(12px, -4px, 0) scale(0.985);
  }
}

@media (max-width: 767px) {
  .site-toast-region {
    top: auto;
    right: auto;
    bottom: calc(18px + env(safe-area-inset-bottom));
    left: 50%;
    width: min(390px, calc(100vw - 24px));
    transform: translateX(-50%);
  }

  body.site-toast-has-bottom-nav .site-toast-region {
    bottom: calc(92px + env(safe-area-inset-bottom));
  }

  .site-toast {
    width: 100%;
    min-height: 56px;
    animation-name: site-toast-enter-mobile;
  }

  .site-toast.is-leaving {
    animation-name: site-toast-leave-mobile;
  }
}

@keyframes site-toast-enter-mobile {
  from {
    opacity: 0;
    transform: translate3d(0, 14px, 0) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes site-toast-leave-mobile {
  from {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    opacity: 0;
    transform: translate3d(0, 10px, 0) scale(0.985);
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-toast,
  .site-toast.is-leaving {
    animation-duration: 1ms;
  }

  .site-toast__close {
    transition-duration: 1ms;
  }
}
