/* ==========================================================================
   CFC WATCHDOG Z-INDEX SCALE — SINGLE SOURCE OF TRUTH
   v10.90 — created per DESIGN_AUDIT_2026_04_08.md Sprint 2

   Design goals:
     1. One named scale everyone can reference.
     2. Gaps between tiers large enough to insert new layers later.
     3. Matches actual usage in style.css, bill-detail.css, public.css,
        mobile-base.css so refactoring is a swap, not a redesign.

   IMPORTANT: This file must be loaded BEFORE style.css and public.css in
   every base template.

   RULES:
     - Local stacking inside a parent (0, 1, 2, 5): do NOT tokenize —
       they're meaningful only within their parent's stacking context.
     - Global layers (sticky nav, dropdowns, modals, toasts): MUST use a
       token from this file.
   ========================================================================== */

:root {

    /* ── Base / local stacking (0-5) ───────────────────────────────────
       These are for local stacking contexts inside a parent. Leave
       hardcoded `z-index: 0/1/2/5` in place — they do not belong in
       the global scale.                                                */

    /* ── Sticky layers (40-100) ────────────────────────────────────── */
    --z-sticky-sub: 40;        /* Sticky sub-header inside a container    */
    --z-mobile-nav: 90;        /* Mobile bottom tab bar                    */
    --z-mobile-sticky: 95;     /* Mobile sticky action / toolbar           */
    --z-sticky: 100;           /* Desktop sticky nav, sticky-action-bar   */

    /* ── Mobile overlays (110-140) ────────────────────────────────── */
    --z-mobile-drawer: 110;    /* Mobile universal search sheet            */
    --z-mobile-sheet: 120;     /* Mobile bottom sheet                      */
    --z-mobile-modal: 125;     /* Mobile modal overlay                     */
    --z-mobile-fab: 130;       /* Mobile floating action button            */
    --z-mobile-reauth: 140;    /* Mobile re-auth sheet                     */

    /* ── Dropdowns + autocomplete (200-500) ───────────────────────── */
    --z-dropdown: 200;         /* Dropdown menus, share panels             */
    --z-autocomplete: 500;     /* Address autocomplete, help tooltips     */

    /* ── Desktop floating UI (900-1070) ───────────────────────────── */
    --z-bottom-bar: 900;       /* Bill detail bottom action bar            */
    --z-bottom-sheet: 1000;    /* Bill detail bottom sheet                 */
    --z-modal-backdrop: 1040;  /* Modal backdrop                           */
    --z-modal: 1050;           /* Modal container                          */
    --z-modal-top: 1054;       /* Modal-above-modal / nested dialogs       */
    --z-fab: 1055;             /* Desktop FAB button                       */
    --z-ask-fab: 1058;         /* Ask Watchdog FAB                         */
    --z-ask-panel: 1060;       /* Ask Watchdog slide-out panel             */
    --z-toast: 1070;           /* Toast notifications (above everything)  */

    /* ── Top-level search (2100) ──────────────────────────────────── */
    --z-autocomplete-top: 2100; /* Search autocomplete dropdown (above nav) */

    /* ── Public site overlays (9000-9999) ─────────────────────────── */
    --z-public-fab: 9000;       /* Public Ask Watchdog FAB                  */
    --z-public-panel: 9001;     /* Public Ask Watchdog panel                */
    --z-public-loading: 9500;   /* Public loading overlay                   */
    --z-overlay-top: 9999;      /* Full-page loading overlays, public toasts*/

    /* ── Guided tour (10000-10001) ────────────────────────────────── */
    --z-tour-spotlight: 10000; /* Walkthrough tour spotlight (skip link)   */
    --z-tour-tooltip: 10001;   /* Walkthrough tour tooltip                 */
}
