/* Navron dashboard: Discord-style toasts + unsaved-changes shake. Loaded from includes/head.ejs */

/* old per-page toast boxes are replaced by the shared toast (manager pages only) */
html.nv-manage .notification-box,
html.nv-manage .toast#toast { display: none !important; }
html.nv-manage .ui-toast { display: none !important; }

#nvToastStack {
  position: fixed; top: 18px; right: 18px; z-index: 2147483000;
  display: flex; flex-direction: column; gap: 10px;
  width: min(360px, calc(100vw - 24px)); pointer-events: none;
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
.nvt {
  --c: #5865f2;
  position: relative; overflow: hidden; pointer-events: auto;
  display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 38px 17px 13px;
  background: #111214; border: 1px solid rgba(255,255,255,.07); border-radius: 10px;
  box-shadow: 0 16px 44px rgba(0,0,0,.5), 0 0 0 1px rgba(0,0,0,.25);
  color: #dbdee1;
  animation: nvtIn .34s cubic-bezier(.2,.9,.25,1.15) both;
}
.nvt::before { /* left accent strip */
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c);
}
.nvt-success { --c: #23a559; }
.nvt-error   { --c: #ed4245; }
.nvt-warning { --c: #f0b232; }
.nvt-info    { --c: #5865f2; }

.nvt-icon {
  flex: 0 0 30px; height: 30px; margin-left: 4px; display: grid; place-items: center;
  border-radius: 50%; color: #fff; background: var(--c);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 18%, transparent);
}
.nvt-icon svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.nvt-warning .nvt-icon { color: #1e1f22; }
.nvt-body { min-width: 0; flex: 1; }
.nvt-title { color: #f2f3f5; font-size: 13px; font-weight: 750; line-height: 18px; }
.nvt-msg { margin-top: 1px; color: #b5bac1; font-size: 12px; font-weight: 500; line-height: 17px; word-break: break-word; }
.nvt-x {
  position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; display: grid; place-items: center;
  border: 0; border-radius: 6px; background: transparent; color: #949ba4; font-size: 17px; line-height: 1; cursor: pointer;
  transition: background .15s, color .15s;
}
.nvt-x:hover { background: rgba(255,255,255,.07); color: #f2f3f5; }

/* the running duration stick */
.nvt-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.06); }
.nvt-bar i {
  display: block; height: 100%; width: 100%; background: var(--c); border-radius: 0 4px 4px 0;
  transform-origin: left center; animation: nvtBar linear forwards;
}
.nvt:hover .nvt-bar i { animation-play-state: paused; }

.nvt.nvt-out { animation: nvtOut .24s ease forwards; }
@keyframes nvtIn  { from { opacity: 0; transform: translateX(40px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes nvtOut { to { opacity: 0; transform: translateX(40px) scale(.96); } }
@keyframes nvtBar { from { transform: scaleX(1); } to { transform: scaleX(0); } }

@media (max-width: 520px) { #nvToastStack { top: 10px; right: 12px; left: 12px; width: auto; } }
@media (prefers-reduced-motion: reduce) {
  .nvt, .nvt.nvt-out { animation-duration: .01s; }
}

/* unsaved changes: shake the Apply / Dismiss bar (uses the individual `translate` property so the bar's own transform is kept) */
.nv-shake { animation: nvShake .55s cubic-bezier(.36,.07,.19,.97) both !important; }
.nv-shake { border-color: rgba(237,66,69,.75) !important; box-shadow: 0 0 0 3px rgba(237,66,69,.22), 0 18px 50px rgba(0,0,0,.45) !important; }
@keyframes nvShake {
  10%, 90% { translate: -2px 0; } 20%, 80% { translate: 4px 0; }
  30%, 50%, 70% { translate: -9px 0; } 40%, 60% { translate: 9px 0; }
}
