/* Shared Toastr styling; existing toastr calls need no changes. */
#toast-container {
  box-sizing: border-box;
  font-family: var(--bs-body-font-family, "Cerebri Sans", sans-serif);
  max-width: 100%;
  padding: 14px;
  width: min(440px, 100%);
  z-index: 1400;
}

#toast-container.toast-top-right,
#toast-container.toast-bottom-right { right: 0; }

#toast-container.toast-top-left,
#toast-container.toast-bottom-left { left: 0; }

#toast-container > .toast {
  --toast-accent: #416bbb;
  --toast-wash: #f3f7ff;
  background: linear-gradient(100deg, var(--toast-wash), #fff 62%) !important;
  border: 1px solid #dadee3;
  border-radius: 14px;
  box-shadow: 0 2px 5px rgba(18, 38, 63, .06);
  box-sizing: border-box;
  color: #202631;
  cursor: default;
  font-family: inherit;
  line-height: 1.45;
  margin: 0 0 12px;
  min-height: 76px;
  opacity: 1;
  padding: 21px 47px 21px 62px;
  position: relative;
  width: 100%;
}

#toast-container > .toast:hover { box-shadow: 0 5px 13px rgba(18, 38, 63, .1); }

#toast-container > .toast::before {
  align-items: center;
  background: var(--toast-accent);
  border-radius: 50%;
  color: #fff;
  display: flex;
  font-size: 14px;
  font-weight: 700;
  height: 21px;
  justify-content: center;
  left: 24px;
  line-height: 1;
  position: absolute;
  top: 24px;
  width: 21px;
}

#toast-container > .toast-success {
  --toast-accent: #3b8d77;
  --toast-wash: #f0faf6;
}

#toast-container > .toast-success::before { content: "✓"; }
#toast-container > .toast-info::before { content: "i"; font-weight: 800; }

#toast-container > .toast-warning {
  --toast-accent: #ad7b27;
  --toast-wash: #fffaf0;
}

#toast-container > .toast-warning::before { content: "!"; }

#toast-container > .toast-error {
  --toast-accent: #bd5359;
  --toast-wash: #fff4f5;
}

#toast-container > .toast-error::before { content: "×"; font-size: 19px; font-weight: 400; }

#toast-container .toast-title {
  color: #202631;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

#toast-container .toast-message {
  color: #202631;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

#toast-container .toast-title + .toast-message {
  color: #444b55;
  font-weight: 400;
  margin-top: 11px;
}

#toast-container .toast-message a { color: #2d5fa8; font-weight: 700; text-decoration: none; }
#toast-container .toast-message a:hover { text-decoration: underline; }

#toast-container .toast-close-button {
  background: transparent;
  border: 0;
  color: #7f8790;
  float: none;
  font-family: inherit;
  font-size: 21px;
  font-weight: 400;
  height: 26px;
  line-height: 1;
  opacity: 1;
  padding: 0;
  position: absolute;
  right: 20px;
  text-shadow: none;
  top: 20px;
  width: 26px;
}

#toast-container .toast-close-button:hover,
#toast-container .toast-close-button:focus-visible { color: #202631; opacity: 1; }
#toast-container .toast-close-button:focus-visible { outline: 2px solid #2d3660; outline-offset: 2px; }
#toast-container .toast-progress { background: var(--toast-accent); height: 3px; opacity: .85; }

@property --brdg-upload-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

#toast-container > .brdg-upload-processing-toast::after {
  animation: brdg-upload-progress 2.8s linear infinite;
  background: conic-gradient(from var(--brdg-upload-angle), transparent 0deg 310deg, var(--toast-accent) 310deg 360deg);
  border-radius: inherit;
  content: "";
  inset: -1px;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  padding: 2px;
  pointer-events: none;
  position: absolute;
}

@keyframes brdg-upload-progress {
  to { --brdg-upload-angle: 360deg; }
}

@media (prefers-reduced-motion: reduce) {
  #toast-container > .brdg-upload-processing-toast::after { animation: none; background: var(--toast-accent); }
}

@media (max-width: 480px) {
  #toast-container {
    left: 0 !important;
    padding: 10px;
    right: 0 !important;
    width: 100%;
  }

  #toast-container > .toast { margin-bottom: 10px; }
}
