/* ===================================================================
   LEEFHub – Root CSS Variables
   Global Design Tokens used across all frontend components
   -------------------------------------------------------------------
   This file is ALWAYS loaded. It should contain ONLY variables.
=================================================================== */

:root {
  /* Base theme */
  --lh-bg: #ffffff;
  --lh-surface: #f9f9f9;

  --lh-border: #e0e0e0;
  --lh-shadow: 0 2px 6px rgba(0,0,0,0.05);

  --lh-text: #222;
  --lh-text-muted: #666;

  --lh-success: #28a745;
  --lh-warning: #ffc107;
  --lh-danger:  #dc3545;
  --lh-muted:   #bbb;

  /* ============================================================
     BRAND COLORS (Dynamic via PHP in AssetsManager::inject_global_colors)
     ============================================================ */
  --lh-primary:        #0073aa;     /* replaced dynamically */
  --lh-primary-hover:  #005f8d;     /* replaced dynamically */
  --lh-text-contrast:  #ffffff;     /* replaced dynamically */

  /* ============================================================
     CALENDAR + BOOKINGS COLORS
     Always inherit BRAND
     ============================================================ */
  --lh-cal-bg:     var(--lh-primary);
  --lh-cal-hover:  var(--lh-primary-hover);
  --lh-cal-text:   var(--lh-text-contrast);

  /* ============================================================
     PURCHASE / TRIAL SHORTCODE COLORS
     (sandboxed via .leefhub-shortcode)
     ============================================================ */
  --lh-sc-primary:        var(--lh-primary);
  --lh-sc-primary-hover:  var(--lh-primary-hover);
  --lh-sc-text:           var(--lh-text-contrast);
  --lh-sc-bg:             var(--lh-surface);
  --lh-sc-border:         var(--lh-border);
}

/* Disable OS dark mode */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: light;
    --lh-bg: #ffffff;
    --lh-surface: #f9f9f9;
    --lh-border: #e0e0e0;
    --lh-text: #222;
    --lh-text-muted: #666;
    --lh-shadow: 0 2px 6px rgba(0,0,0,0.05);
  }
}

/* ===================================================================
   SHORTCODE SCOPED OVERRIDES
   (affect purchase/trial buttons ONLY)
=================================================================== */
.leefhub-shortcode,
.leefhub-shortcode * {
  --lh-primary:        var(--lh-sc-primary);
  --lh-primary-hover:  var(--lh-sc-primary-hover);

  /* IMPORTANT: do NOT override --lh-text or --lh-text-contrast */
  --lh-text-button:    var(--lh-sc-text);

  --lh-border:         var(--lh-sc-border);
  --lh-bg:             var(--lh-sc-bg);
  --lh-surface:        var(--lh-sc-bg);
}