/* MudRadzenHeaders - global host chrome (scroll-to-top FAB etc.).
   PERF-S17: extracted VERBATIM from an in-body <style> block in MudRadzenHeaders.razor, which shipped
   these 90 lines inside EVERY HTML response - uncacheable, on every page, whether or not
   the component was visible. Same move and same reasoning as rently-home.css (PUB-9.S3c) and
   dynamic-carousel.css. Razor's @@ at-rule escaping is un-escaped here, so edit the styles in
   THIS file - the .razor no longer carries them. */

    /* G4 (2026-07-22): the former margin-bottom:88px / 100px lift is retired. The offset now lives in
       one place — the inline `bottom: calc(... + var(--rently-fab-lift, 0px))` on the MudScrollToTop
       wrapper in ScrollToTopHost.razor — so the same expression carries BOTH the Companion clearance
       and the footer clamp. Two owners of the vertical offset made the clamp impossible to express.
       Only the GLOBAL header FAB is offset; the admin FAB (.admin-scroll-to-top-fab) has no Companion
       to clear (CompanionHost suppresses itself on /admin/*) and keeps the wrapper's default 16px. */

    /* S8-09 yield. js/fab-dock.js adds .rently-fab-yield to this FAB's host — the STATIC
       .rently-scroll-to-top-host wrapper in ScrollToTopHost.razor, never the Mud span itself:
       MudScrollToTop re-renders its root on hidden/visible flips and Blazor rewrites the class
       attribute from the render tree, wiping a JS-added class mid-scroll (S8 live-QA find). The
       yield fires when the lift NEEDED to clear the footer or a declared obstacle exceeds what the
       viewport can give. Riding the clamp at that point parks the stack on the content it exists to
       avoid, so the pair fades out instead and returns on the way back up. Positioning is untouched:
       fab-dock remains the single owner of `bottom`.

       Two deliberate details:
       · !important — MudScrollToTop's own .visible / .hidden state classes set opacity as plain
         author rules, and .visible would otherwise win the tie on specificity grounds we do not
         control.
       · NO transition here. Those same vendor state classes carry their own transition list
         (.visible is transform .5s), and a transition declaration on this rule would replace it
         wholesale — losing the vendor's show/hide transform animation to buy a fade nobody asked
         for. The yield is an instant opacity flip by design. */
    .rently-scroll-to-top-host.rently-fab-yield .mud-scroll-to-top {
        opacity: 0 !important;
        pointer-events: none;

        /* S9-01 re-review: without this the invisible FAB stayed keyboard-focusable — a focused,
           operable control with no visible indicator (SC 2.4.7). Instant like the opacity flip. */
        visibility: hidden !important;
    }

    /* Both FABs are 60x60 so the scroll-to-top squircle is the same box as the Companion's. MudFab
       defaults to Size.Large = 56x56 via .mud-fab-size-large (0,1,0); the compound selector below is
       (0,2,0) and wins without !important. Do NOT add a Label — that switches Mud to
       .mud-fab-extended { width: auto } and the square box is lost. */
    .scroll-to-top-fab.mud-fab,
    .admin-scroll-to-top-fab.mud-fab {
        width: 60px;
        height: 60px;
    }

    /* Initiative C · C6 Pt3 — "Quiet utility" scroll-to-top FAB (locked Pt2 look, FAB A).
       A neutral frost squircle that DEFERS to the teal Help Companion FAB sharing the bottom-right
       corner. Token-driven, so it follows the C4 palette + C5 dark mode automatically (the old
       Color.Secondary red ignored the theme). Color="Color.Inherit" on the MudFab strips Mud's
       colour-variant background, leaving only the base .mud-fab surface for us to override; the
       compound .scroll-to-top-fab.mud-fab (0,2,0) beats Mud's .mud-fab (0,1,0), and !important on
       the contested visual props beats Mud's :hover/:focus/:active box-shadow variants. Shared by
       the global header FAB and the admin FAB; only the global one is lifted (above).
       S33 — line-level disable with a reason: the block above owns the BOX (size, and why a
       Label breaks it), this one owns the SURFACE. Merging collapses two reasoned comments into
       one. Never a file-level disable. */
    /* stylelint-disable-next-line no-duplicate-selectors */
    .scroll-to-top-fab.mud-fab,
    .admin-scroll-to-top-fab.mud-fab {
        background: var(--rently-card-bg) !important;
        color: var(--rently-text-secondary) !important;
        border: 1px solid var(--rently-border-strong) !important;
        box-shadow: var(--rently-shadow-hover) !important;
        border-radius: 34% / 38% !important; /* squircle — matches the Companion FAB */
        transition: color var(--rently-transition-base), border-color var(--rently-transition-base), box-shadow var(--rently-transition-base), transform var(--rently-transition-base);
    }

    .scroll-to-top-fab.mud-fab:hover,
    .admin-scroll-to-top-fab.mud-fab:hover {
        color: var(--rently-primary-dark) !important;
        border-color: var(--rently-primary) !important;
        transform: translateY(-2px) scale(1.04);
    }

    .scroll-to-top-fab.mud-fab:focus-visible,
    .admin-scroll-to-top-fab.mud-fab:focus-visible {
        outline: 3px solid var(--rently-primary-dark);
        outline-offset: 3px;
    }

    .scroll-to-top-fab.mud-fab .mud-icon-root,
    .admin-scroll-to-top-fab.mud-fab .mud-icon-root {
        font-size: 1.5rem !important; /* beats .mud-button-icon-size-medium > *:first-child (20px) */
        color: inherit; /* inherits the FAB text colour, incl. the hover teal */
    }

    @media (prefers-reduced-motion: reduce) {
        .scroll-to-top-fab.mud-fab,
        .admin-scroll-to-top-fab.mud-fab {
            transition: none;
        }

        .scroll-to-top-fab.mud-fab:hover,
        .admin-scroll-to-top-fab.mud-fab:hover {
            transform: none;
        }
    }
