/*
 * Webal Phoca Blocks: the dark colours for Phoca Cart's OWN pages (checkout first). Loaded as the Web Asset "wbl.phoca.dark". Owner's exception to "never restyle a
 * third-party extension", 6 Nov 2026: Phoca's white panels with Webal's pale dark-mode text made the checkout unreadable (about 1.2:1).
 *
 * WHY THIS FILE EXISTS: Phoca Cart has dark values of its own, but only for Bootstrap's [data-bs-theme="dark"], which Cassiopeia and Webal never set. This file gives the
 * same variables values in Webal's dark state. It sets Phoca's own colour variables and paints nothing else; it edits no Phoca file. Phoca's `main.css` reads them.
 *
 * WHEN IT LOADS: the set descriptor (wblset.xml, darkStyle) asks the core for it on com_phocacart pages only, and only when the core's Cassiopeia dark stylesheet is wanted
 * (Site colour mode not Light, Option on, Cassiopeia family). A shop on Light never gets it, and in the light state nothing here applies.
 *
 * The selectors are the core's three dark states (see cassiopeia-dark.css); the second block repeats the first because a media query cannot sit in a selector list. A test
 * fails if the two differ, or if a name here stops existing in Phoca's main.css. Forced colours and print keep Phoca's own values.
 */

@media screen and (forced-colors: none) {
    :is(:root[data-wbl-theme="dark"], :root:where(:not([data-wbl-theme]):has(#wbl-boot[data-wbl-mode="dark"]))) {
        --ph-white-bg: var(--wbl-cd-hover, #1c1f26);
        --ph-grey-bg: var(--wbl-cd-raised, #1a1d23);
        --ph-grey-border: var(--wbl-border, #6c727d);
    }
}

@media screen and (forced-colors: none) and (prefers-color-scheme: dark) {
    :root:root:where(:not([data-wbl-theme]):has(#wbl-boot[data-wbl-mode="auto"], #wbl-boot[data-wbl-mode="switch"])) {
        --ph-white-bg: var(--wbl-cd-hover, #1c1f26);
        --ph-grey-bg: var(--wbl-cd-raised, #1a1d23);
        --ph-grey-border: var(--wbl-border, #6c727d);
    }
}
