/*
Theme Name: GBWebcams Theme
Theme URI: https://gbwebcams.co.uk
Author: GBWebcams Development Team
Author URI: https://gbwebcams.co.uk
Description: Premium dark WordPress theme for GBWebcams - Britain's Live Network. Built-in Elementor support, automated Location pages, Ad Scroller manager, TGMPA plugin installer, and live webcam embeds.
Version: 2.61.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gbwebcams
Tags: dark-theme, elementor, live-stream, ads-manager, location-directory, responsive-layout, custom-colors
*/

/* Core CSS Variables and Fallbacks (Step 44 redesign tokens).
   The eight editable tokens (bg, text main/muted, accent red/cyan/green,
   default location accent, font) are overridden live by the Brand Colors
   panel — see gbwebcams_get_brand_css() in inc/theme-settings.php, which
   also re-derives every "derived" token below (card fills, outline, glow,
   gradient end) from whatever the owner picks, so the whole scheme moves
   together. The values here are only the defaults / no-JS fallbacks. */
:root {
    /* Editable */
    --gb-bg-dark: #0a1628;
    --gb-text-main: #ffffff;
    --gb-text-muted: #9fb3c8;
    --gb-accent-red: #e01e26;
    --gb-accent-blue: #1fb6d1;
    --gb-accent-green: #1e9e5a;
    --gb-location-accent: #1fb6d1;
    --gb-font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;

    /* Derived (from the editable ones — see theme-settings.php) */
    --gb-bg-dark-rgb: 10, 22, 40;
    --gb-bg-gradient-end: #060d1c;
    /* Step 54: cards are translucent (a tint of the accent over the page
       gradient, per the owner's mock); --gb-bg-surface is the solid shade
       for overlays that must hide what's beneath (mega panel, drawer,
       search bar, About popover). */
    --gb-bg-card: rgba(31, 182, 209, 0.08);
    --gb-bg-card-hover: rgba(31, 182, 209, 0.14);
    --gb-bg-surface: #0f2142;
    --gb-accent-blue-rgb: 31, 182, 209;
    --gb-accent-blue-soft: #8fd9e6;
    --gb-accent-green-hover: #1a8b4f;
    --gb-accent-red-glow: rgba(224, 30, 38, 0.4);
    --gb-border: rgba(31, 182, 209, 0.5);
    --gb-border-highlight: rgba(31, 182, 209, 0.9);
    --gb-glow: rgba(31, 182, 209, 0.18);

    /* Fixed design constants */
    --gb-font-script: 'Caveat', 'Segoe Script', 'Bradley Hand', cursive;
    --gb-radius: 14px;
    --gb-radius-lg: 16px;
    --gb-radius-sm: 10px;
    --gb-header-h: 76px;
    --gb-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/**
 * Light mode (Step 41) — visitor-facing toggle, opt-in per browser via
 * localStorage; the site still opens in dark mode by default. "Core colors
 * only": background/text/border tokens flip here; accents and font don't.
 *
 * `:root[data-theme="light"]` (specificity 0,0,2,0) intentionally outranks
 * the plain `:root { ... }` above AND the Brand Colors panel's inline
 * `:root { ... }` override, so light mode always wins without !important.
 * The Brand Colors output also appends its own `:root[data-theme="light"]`
 * block for the accent-derived tokens (outline/glow), which comes later in
 * source order and so wins over the cyan fallbacks below — by design.
 *
 * Step 45: the Location/Webcam pages now print their per-location palette
 * as a <style> block scoped to body.gb-location-scope (with its own
 * :root[data-theme="light"] body.gb-location-scope rule) — see
 * inc/location-page.php — so the toggle works there too.
 */
:root[data-theme="light"] {
    --gb-bg-dark: #f4f6fb;
    --gb-bg-dark-rgb: 244, 246, 251;
    --gb-bg-gradient-end: #e6ebf5;
    --gb-bg-card: #ffffff;
    --gb-bg-card-hover: #f1f5fb;
    --gb-bg-surface: #ffffff;
    --gb-border: rgba(31, 182, 209, 0.45);
    --gb-border-highlight: rgba(31, 182, 209, 0.9);
    --gb-glow: rgba(31, 182, 209, 0.12);
    --gb-accent-blue-soft: #178fa5;
    --gb-text-main: #0b1a33;
    --gb-text-muted: #4a5d78;
}
