/* ============================================================
   Numerint toastr overrides — Slate variant.

   Loaded after vendor toastr.min.css. Overrides the stock toastr
   DOM (#toast-container > .toast, .toast-info, .toast-warning,
   .toast-close-button) so utils.js / filters.js / status.js keep
   calling toastr.info() / toastr.warning() unchanged.

   Selector specificity: vendor uses `#toast-container > div`
   (0,1,1,1) for card-level rules; we match with `#toast-container
   > div.toast` (0,1,1,1) and rely on load order to win the tie.
   ============================================================ */

/* Container: anchor below the fixed ~68px navbar with even mobile gutters. */
#toast-container.toast-top-left {
  top: 80px;
  left: 16px;
}
@media (max-width: 768px) {
  #toast-container.toast-top-left {
    top: 72px;
    left: 12px;
    right: 12px;
  }
}

/* Card */
#toast-container > div.toast {
  width: 480px;
  max-width: calc(100vw - 24px);
  padding: 13px 36px 13px 46px;
  margin: 0 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  background-color: var(--nx-bg-inset);
  background-repeat: no-repeat;
  color: rgba(255, 255, 255, 0.92);
  font-family: var(--secondary-font, "Helvetica Neue", system-ui, -apple-system, sans-serif);
  font-size: 13.5px;
  line-height: 1.5;
  letter-spacing: 0.005em;
  opacity: 1;
  filter: none;
  -ms-filter: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 12px 28px -16px rgba(0, 0, 0, 0.55),
    0 2px 6px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}
@media (max-width: 768px) {
  #toast-container > div.toast {
    width: auto;
    max-width: none;
  }
}

/* Suppress vendor's hover-shadow + cursor change. Toasts here are not
   tap-to-dismiss (utils.js sets tapToDismiss: false), so cursor:pointer
   would be misleading. */
#toast-container > div.toast:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 12px 28px -16px rgba(0, 0, 0, 0.55),
    0 2px 6px rgba(0, 0, 0, 0.18);
  opacity: 1;
  filter: none;
  -ms-filter: none;
  cursor: default;
}

/* Left edge stripe — info default, override per state. */
#toast-container > div.toast::before {
  content: "";
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: 0;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--nx-accent);
}
#toast-container > div.toast-warning::before {
  background: var(--nx-warning);
}

/* Info icon — replaces vendor base64 PNG. SVG inlined as data URI;
   stroke colour matches the left-edge stripe. The vendor uses
   `!important` on these icon backgrounds, so we match. */
#toast-container > div.toast-info {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 20 20' fill='none' stroke='%231fff6f' stroke-width='1.6' stroke-linecap='round'><circle cx='10' cy='10' r='8'/><line x1='10' y1='9.5' x2='10' y2='14'/><circle cx='10' cy='6.4' r='0.5' fill='%231fff6f' stroke='none'/></svg>") !important;
  background-position: 16px 14px;
  background-size: 18px 18px;
}

/* Warning icon */
#toast-container > div.toast-warning {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 20 20' fill='none' stroke='%23ff9800' stroke-width='1.6' stroke-linecap='round'><path d='M10 2.5L18.2 16.8a1 1 0 0 1-.87 1.5H2.67a1 1 0 0 1-.87-1.5L10 2.5z'/><line x1='10' y1='8' x2='10' y2='12.4'/><circle cx='10' cy='14.8' r='0.5' fill='%23ff9800' stroke='none'/></svg>") !important;
  background-position: 16px 14px;
  background-size: 18px 18px;
}

/* Defensive defaults for the two toastr types Numerint does not currently
   fire (toast-error / toast-success). Keeps them on-brand if anything new
   fires them later. */
#toast-container > div.toast-error::before { background: #e54d4d; }
#toast-container > div.toast-success::before { background: var(--nx-accent); }

/* Message text */
#toast-container > div.toast .toast-message {
  word-wrap: break-word;
  overflow-wrap: anywhere;
  color: inherit;
}
#toast-container > div.toast .toast-message a {
  color: var(--nx-accent);
  text-decoration: underline;
}
#toast-container > div.toast .toast-message a:hover {
  color: #fff;
}

/* Close button — replace vendor's × glyph with an SVG mark. */
#toast-container > div.toast > .toast-close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  float: none;
  width: 22px;
  height: 22px;
  padding: 0;
  margin: 0;
  font-size: 0;
  line-height: 0;
  color: transparent;
  text-shadow: none;
  -webkit-text-shadow: none;
  background-color: transparent;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round'><line x1='2.5' y1='2.5' x2='9.5' y2='9.5'/><line x1='9.5' y1='2.5' x2='2.5' y2='9.5'/></svg>");
  background-position: center center;
  background-size: 12px 12px;
  background-repeat: no-repeat;
  border: 0;
  border-radius: 50%;
  opacity: 0.55;
  filter: none;
  -ms-filter: none;
  transition: opacity 120ms ease, background-color 120ms ease;
}
#toast-container > div.toast > .toast-close-button:hover,
#toast-container > div.toast > .toast-close-button:focus {
  background-color: rgba(255, 255, 255, 0.08);
  color: transparent;
  opacity: 1;
}

/* Honour reduced-motion. Toastr's default slide-in is a 300ms transform
   animation; suppress for users who've opted out. */
@media (prefers-reduced-motion: reduce) {
  #toast-container > div.toast {
    animation: none !important;
    transition: none !important;
  }
}
