/* Canonical modal base — control-system consolidation Phase 4 (G1).
   Extracted from style.css so BOTH the main app (index.html) and the standalone
   Schedule Generator page (schedule-generator.html) share ONE modal overlay system.
   Load this EARLY (before the per-module CSS) so each module's namespace class can
   still override the z-index tier via normal source order.
   NOTE: only the overlay + z-index scale are shared here. The dialog/content chrome
   (.modal-content / .modal-header / .modal-title) stays in style.css — it is used by
   the main-app global modals only; module + generator modals keep their own dialog classes. */

/* Modal / overlay z-index scale. Named tiers so overlays stack predictably instead of
   ad-hoc 10000→100000 literals. */
:root {
    --z-modal: 20000;             /* global .modal-overlay (import / show-columns / version) */
    --z-modal-elevated: 99999;    /* module modal scrims (documents/meetings/rfis/submittals/daily-reports/generator…) */
    --z-modal-fullscreen: 100000; /* module modal content + fullscreen (photo viewer) */
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--modal-scrim, rgba(0,0,0,0.5));
    z-index: var(--z-modal); /* must stay above dependency popup (10000) */
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-overlay.show {
    display: flex;
}
