/* Modern toast treatment layered on top of toastr defaults */
#toast-container {
  top: 18px;
  right: 18px;
  width: auto;
  max-width: min(420px, calc(100vw - 32px));
  pointer-events: none;
}

#toast-container > div {
  position: relative;
  overflow: hidden;
  pointer-events: auto;
  width: min(400px, calc(100vw - 32px));
  margin: 0 0 14px;
  padding: 16px 18px 16px 58px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow:
    0 18px 50px rgba(15, 23, 42, 0.18),
    0 4px 14px rgba(15, 23, 42, 0.12);
  color: #fff;
  opacity: 1;
  background-image:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04)),
    linear-gradient(135deg, var(--toast-solid, #2563eb), var(--toast-solid-2, #1d4ed8));
  transform: translateY(-12px) scale(0.98);
  animation: toast-pop 220ms ease-out forwards;
}

#toast-container > div:hover {
  box-shadow:
    0 24px 60px rgba(15, 23, 42, 0.2),
    0 6px 18px rgba(15, 23, 42, 0.12);
  transform: translateY(-2px) scale(1);
}

#toast-container > div::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 8px;
  border-radius: 18px 0 0 18px;
  background: var(--toast-accent, #fff);
}

#toast-container > div::after {
  content: "";
  position: absolute;
  inset: auto -35px -35px auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}

#toast-container .toast-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 4px;
}

#toast-container .toast-message {
  font-size: 13px;
  line-height: 1.5;
  opacity: 0.96;
}

#toast-container .toast-close-button {
  top: -2px;
  right: -2px;
  font-size: 18px;
  text-shadow: none;
  opacity: 0.7;
}

#toast-container .toast-close-button:hover {
  opacity: 1;
}

#toast-container .toast-progress {
  height: 4px;
  opacity: 0.9;
  background: rgba(255, 255, 255, 0.42);
}

#toast-container > .toast-success {
  --toast-solid: #16a34a;
  --toast-solid-2: #15803d;
  --toast-accent: #bbf7d0;
}

#toast-container > .toast-error {
  --toast-solid: #ef4444;
  --toast-solid-2: #dc2626;
  --toast-accent: #fecaca;
}

#toast-container > .toast-info {
  --toast-solid: #0ea5e9;
  --toast-solid-2: #0284c7;
  --toast-accent: #bae6fd;
}

#toast-container > .toast-warning {
  --toast-solid: #f59e0b;
  --toast-solid-2: #d97706;
  --toast-accent: #fde68a;
}

[data-theme-version="dark"] #toast-container > div {
  border-color: rgba(148, 163, 184, 0.18);
  box-shadow:
    0 18px 50px rgba(2, 6, 23, 0.45),
    0 4px 18px rgba(2, 6, 23, 0.3);
}

[data-theme-version="dark"] #toast-container > .toast-success {
  --toast-solid: #22c55e;
  --toast-solid-2: #16a34a;
}

[data-theme-version="dark"] #toast-container > .toast-error {
  --toast-solid: #fb7185;
  --toast-solid-2: #f43f5e;
}

[data-theme-version="dark"] #toast-container > .toast-info {
  --toast-solid: #38bdf8;
  --toast-solid-2: #0ea5e9;
}

[data-theme-version="dark"] #toast-container > .toast-warning {
  --toast-solid: #fbbf24;
  --toast-solid-2: #f59e0b;
}

@keyframes toast-pop {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 480px) {
  #toast-container {
    top: 12px;
    right: 12px;
    left: 12px;
    max-width: none;
  }

  #toast-container > div {
    width: 100%;
    padding: 15px 16px 15px 54px;
    border-radius: 16px;
  }
}
