/* Password Vault notifications (toasts).
 *
 * WHY THIS FILE EXISTS
 * The previous toast presentation leaned on Bootstrap's text-bg-* utilities, which were
 * added in Bootstrap 5.2 — this site ships 5.1, so every toast rendered as the pale
 * default panel. This sheet owns the ENTIRE visual treatment; Bootstrap's Toast JS is
 * kept only for its show/hide/autohide lifecycle.
 *
 * Loaded globally from _Layout.cshtml (after bootstrap.css and site.css, so these rules
 * win on equal specificity). The Password Vault theme variables are page-local to the
 * vault screen, so every var() here carries a fallback matching that palette — the same
 * dark card, border, and accent values — and renders identically on pages that do not
 * define them (Sign In included).
 */

/* ── placement ──────────────────────────────────────────────────────────── */

.pv-toast-container {
  position: fixed;
  /* Below the navbar, never overlapping or visually merging with it. */
  top: 4.75rem;
  right: 1rem;
  z-index: 1090;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: flex-end;
  pointer-events: none; /* the toasts themselves re-enable it */
  max-width: calc(100vw - 2rem);
}

/* Mobile: a centered inset column under the navbar, not a full-bleed banner and not a
 * corner sliver. */
@media (max-width: 576px) {
  .pv-toast-container {
    top: 4.25rem;
    left: 0.75rem;
    right: 0.75rem;
    align-items: stretch;
    max-width: none;
  }
}

/* ── the toast card ─────────────────────────────────────────────────────── */

.pv-toast {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  width: auto;
  max-width: 380px;
  padding: 0.7rem 0.8rem;
  pointer-events: auto;

  background: var(--pv-card, rgb(8, 13, 24));
  color: var(--pv-text, #e5eefc);
  border: 1px solid var(--pv-border, rgba(91, 164, 224, 0.18));
  border-left-width: 3px;
  border-radius: 0.5rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55), 0 3px 10px rgba(0, 0, 0, 0.3);

  font-size: 0.85rem;
  line-height: 1.4;

  /* Entrance/exit: fade + a small settle. Bootstrap toggles .show; the transition does
   * the rest in both directions. */
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.pv-toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 576px) {
  .pv-toast {
    max-width: none;
    width: 100%;
  }
}

.pv-toast-icon {
  flex: 0 0 auto;
  font-size: 1rem;
  line-height: 1.3;
}

.pv-toast-body {
  flex: 1 1 auto;
  color: var(--pv-text, #e5eefc);
  overflow-wrap: anywhere;
}

.pv-toast-close {
  flex: 0 0 auto;
  margin-left: 0.25rem;
  margin-top: 0.1rem;
  opacity: 0.6;
}

.pv-toast-close:hover {
  opacity: 1;
}

/* ── type accents ───────────────────────────────────────────────────────── */

.pv-toast-success { border-left-color: var(--pv-success, #22c55e); }
.pv-toast-success .pv-toast-icon { color: var(--pv-success, #22c55e); }

.pv-toast-info { border-left-color: var(--pv-blue, #0ea5e9); }
.pv-toast-info .pv-toast-icon { color: var(--pv-blue, #0ea5e9); }

.pv-toast-warning { border-left-color: var(--pv-warning, #f59e0b); }
.pv-toast-warning .pv-toast-icon { color: var(--pv-warning, #f59e0b); }

.pv-toast-danger { border-left-color: var(--pv-danger, #ef4444); }
.pv-toast-danger .pv-toast-icon { color: var(--pv-danger, #ef4444); }
