/* Unified branded confirm dialog (replaces native confirm()/alert()). */
.bc-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 3000; display: none; align-items: center; justify-content: center; }
.bc-overlay.open { display: flex; }
.bc-box { background: var(--white); border-radius: 12px; padding: 24px 26px; width: 460px; max-width: 92vw; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.bc-box h3 { font-size: 18px; font-weight: 700; color: var(--dark-navy); margin: 0 0 10px; }
.bc-box p { font-size: 14px; color: var(--dark-navy); line-height: 1.55; margin: 0 0 20px; }
.bc-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
/* Three answers need more room than two. Without this the labels wrapped inside the buttons --
   "Stay on this / page", "Discard / Change" -- which reads as four options rather than three. */
.bc-box.wide { width: 560px; }
.bc-box.wide .bc-btn { white-space: nowrap; }
.bc-btn { border-radius: 8px; padding: 8px 18px; font-weight: 600; font-family: var(--font-primary); font-size: 14px; cursor: pointer; border: none; }
.bc-cancel { background: #fff; border: 1.5px solid var(--border-light); color: var(--dark-navy); }
.bc-cancel:hover { background: #f5f5f7; }
.bc-confirm { background: var(--pink); color: #fff; }
.bc-confirm:hover { opacity: 0.9; }
.bc-confirm.danger { background: #d32f2f; }
.bc-cancel.hidden { display: none; }
.bc-input { width: 100%; box-sizing: border-box; padding: 9px 12px; margin: 4px 0 16px; border: 1.5px solid var(--border-light); border-radius: 8px; font-family: var(--font-primary); font-size: 14px; color: var(--dark-navy); }
.bc-input:focus { outline: none; border-color: var(--pink); }

/* Transient notification ("snackbar"). Same navy pill the target catalog's undo bar uses, made
   shared so every page reports a completed action the same way. Slides up from the bottom edge;
   `position:fixed` + translateX keeps it centred regardless of scroll or sidebar width. */
.bc-toast {
  position: fixed; bottom: -100px; left: 50%; transform: translateX(-50%);
  background: var(--dark-navy, #3F3E57); color: #fff; padding: 12px 18px; border-radius: 10px;
  display: flex; align-items: center; gap: 12px; font-size: 14px;
  font-family: var(--font-primary); box-shadow: 0 6px 24px rgba(0,0,0,0.25);
  z-index: 4000; transition: bottom 0.3s ease; max-width: min(560px, 92vw);
}
.bc-toast.visible { bottom: 28px; }
.bc-toast .bc-toast-icon { font-size: 18px; line-height: 1; }
.bc-toast.err { background: #B3261E; }
.bc-toast-msg { flex: 1; min-width: 0; }
.bc-toast-close { cursor: pointer; font-size: 18px; line-height: 1; color: #b9b8c6; }
.bc-toast-close:hover { color: #fff; }

/* Blocking "working…" overlay (`bvBusy` in confirm.js).
 *
 * The point is the BLOCKING, not the spinner: a delete that takes a moment used to leave the page
 * live, so a second impatient click landed on whatever the first one had not yet removed. The
 * overlay therefore goes up the instant the request starts, and only the visible card is delayed
 * (`.shown`, below) so that a fast operation does not flash. z-index sits above .bc-overlay so a
 * confirm dialog left open behind it cannot be clicked through. */
.bv-busy { position: fixed; inset: 0; z-index: 5000; display: none; align-items: center; justify-content: center; background: transparent; cursor: progress; }
.bv-busy.open { display: flex; }
.bv-busy.open.shown { background: rgba(255,255,255,0.55); backdrop-filter: blur(1.5px); }
.bv-busy-box { display: flex; align-items: center; gap: 12px; background: var(--white, #fff); color: var(--dark-navy, #3F3E57); font-family: var(--font-primary); font-size: 14px; font-weight: 600; padding: 14px 20px; border-radius: 10px; box-shadow: 0 10px 40px rgba(0,0,0,0.18); opacity: 0; transition: opacity 0.15s ease; }
.bv-busy.shown .bv-busy-box { opacity: 1; }
.bv-busy-spin { width: 16px; height: 16px; flex: none; border-radius: 50%; border: 2.5px solid var(--border-light, #e3e3ea); border-top-color: var(--pink, #E8467C); animation: bv-busy-spin 0.7s linear infinite; }
@keyframes bv-busy-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .bv-busy-spin { animation-duration: 2s; } }
