/* =========================================================
   Schedule — Stabilization layer styles

   Loaded after R46c CSS. Adds the visible-feedback toast that
   the schedule_stabilization.js module renders for top
   controls, card controls, and alert actions. No layout or
   color overrides — purely additive feedback affordances.
   ========================================================= */

/* Stabilization feedback toast — anchored bottom-center,
   non-blocking, auto-dismissed by JS after ~2.4s. */
.stab-toast {
  position: fixed;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%);
  max-width: min(86vw, 560px);
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(20, 28, 40, 0.94);
  color: #f4f7fb;
  font: 600 14px/1.3 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
  z-index: 99999;
  pointer-events: none;
  opacity: 0;
  animation: stab-toast-in 140ms ease-out forwards,
             stab-toast-out 280ms ease-in forwards 2.05s;
  text-align: center;
  letter-spacing: 0.01em;
}

.stab-toast-alert   { background: rgba(20, 70, 60, 0.94); }
.stab-toast-control { background: rgba(28, 38, 60, 0.94); }
.stab-toast-error   { background: rgba(120, 30, 30, 0.94); }

@keyframes stab-toast-in {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes stab-toast-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}

/* Stack additional toasts upward — JS only allows three at
   once. Each successive child gets pushed higher via :nth-of-type. */
body > .stab-toast:nth-of-type(2) { bottom: 134px; }
body > .stab-toast:nth-of-type(3) { bottom: 184px; }

/* Ensure that hidden / offscreen duplicates don't accidentally
   become tappable when their parent has [aria-hidden="true"]. */
[aria-hidden="true"] button[data-msx-quick],
[aria-hidden="true"] button[data-sv6-act],
[aria-hidden="true"] .sv4-mobile-add-worker {
  pointer-events: none !important;
}

/* Zero-size duplicates that the stabilization layer hides at
   runtime — belt-and-suspenders display:none so Playwright's
   `:visible` and isVisible() always return false. We also set
   visibility:hidden in case any parent transition briefly
   negates display:none. */
[data-stab-zero-hidden="1"],
[data-stab-zero-hidden="1"] * {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  opacity: 0 !important;
}
