/* ==========================================================================
   QZONE OMS — LEGACY VARIABLE COMPATIBILITY
   The previous theme exposed its own custom-property vocabulary, and ~1,300
   references to it remain inline across the view tree (style attributes and
   per-view <style> blocks).

   Rather than hand-edit every one, the old names are re-pointed at the new
   tokens here. Those views therefore inherit the console palette, spacing and
   geometry automatically, and stay correct in both themes.

   This is a bridge, not a foundation: new work should use --qz-* directly.
   As views are rewritten, their legacy references disappear and this file
   shrinks. Nothing in app/assets/stylesheets/qzone/*.css depends on it.
   ========================================================================== */

:root {
  /* ---- Core palette --------------------------------------------------- */
  --primary-color:     var(--qz-accent);
  --primary-light:     var(--qz-accent-hi);
  --primary-dark:      var(--qz-accent-lo);
  --primary-white:     var(--qz-text);
  --primary-danger:    var(--qz-crit);
  --primary-success:   var(--qz-ok);
  --primary-warning:   var(--qz-warn);
  --primary-info:      var(--qz-info);
  --primary-secondary: var(--qz-text-mute);
  --primary-login:     var(--qz-accent);
  --primary-login2:    var(--qz-accent-hi);

  /* The old "neon" layer was the saturated accent set. It collapses onto the
     status tokens — the console palette has one saturated hue per meaning. */
  --neon-cyan:     var(--qz-accent);
  --neon-gold:     var(--qz-warn);
  --neon-green:    var(--qz-ok);
  --neon-red:      var(--qz-crit);
  --neon-purple:   #b07cff;
  --electric-blue: var(--qz-accent-hi);

  --accent-primary:     var(--qz-accent);
  --accent-primary-alt: var(--qz-accent-hi);
  --accent-warning:     var(--qz-warn);
  --accent-success:     var(--qz-ok);
  --accent-danger:      var(--qz-crit);
  --accent-violet:      #b07cff;

  /* Security views use their own accent pair. */
  --sec-accent:   var(--qz-accent);
  --sec-accent-2: var(--qz-accent-hi);

  /* ---- Surfaces ------------------------------------------------------- */
  --surface-void:   var(--qz-bg);
  --surface-deep:   var(--qz-surface-1);
  --surface-base:   var(--qz-surface-2);
  --surface-raised: var(--qz-surface-2);
  --surface-float:  var(--qz-surface-3);
  --surface-hover:  var(--qz-surface-3);

  /* The glass system is flattened: opaque surface + hairline, no blur. */
  --glass-bg:     var(--qz-surface-2);
  --glass-border: var(--qz-line);
  --glass-glow:   transparent;
  --glass-shine:  transparent;

  /* ---- Text ----------------------------------------------------------- */
  --text-primary:   var(--qz-text);
  --text-secondary: var(--qz-text-dim);
  --text-muted:     var(--qz-text-mute);
  --text-accent:    var(--qz-accent);
  --text-gold:      var(--qz-warn);
  --text-warning:   var(--qz-warn);

  /* ---- Typography ----------------------------------------------------- */
  --font-display: var(--qz-font-display);
  --font-body:    var(--qz-font-body);
  --font-mono:    var(--qz-font-mono);

  /* ---- Geometry ------------------------------------------------------- */
  --radius-sm:   var(--qz-r-sm);
  --radius-md:   var(--qz-r-md);
  --radius-lg:   var(--qz-r-lg);
  --radius-xl:   var(--qz-r-xl);
  --radius-pill: var(--qz-r-pill);

  /* ---- Glows are gone. Neutralised so `box-shadow: var(--glow-x)` is a
          valid no-op rather than an invalid declaration. ----------------- */
  --glow-cyan:  none;
  --glow-gold:  none;
  --glow-blue:  none;
  --glow-red:   none;
  --glow-green: none;

  /* ---- Inputs --------------------------------------------------------- */
  --input-bg:           var(--qz-surface-inset);
  --input-bg-focus:     var(--qz-bg);
  --input-border:       var(--qz-line);
  --input-border-focus: var(--qz-accent);
  --input-shadow:       var(--qz-ring);
  --input-shadow-focus: inset 0 0 0 1px var(--qz-accent), 0 0 0 3px var(--qz-accent-weak);
  --input-color-scheme: normal;
  --input-icon-filter:  none;

  /* ---- Chrome --------------------------------------------------------- */
  --navbar-bg:     var(--qz-surface-1);
  --navbar-border: var(--qz-line);
  --navbar-shadow: none;
  --navbar-toggler-border: var(--qz-line);
  --navbar-toggler-focus:  var(--qz-accent-weak);
  --navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%239fb0bf' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.25' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");

  --sidebar-bg-start: var(--qz-surface-1);
  --sidebar-bg-end:   var(--qz-surface-1);
  --sidebar-border:   var(--qz-line);
  --sidebar-glow:     transparent;

  --dropdown-bg:         var(--qz-surface-3);
  --dropdown-border:     var(--qz-line);
  --dropdown-shadow:     var(--qz-shadow-2);
  --dropdown-item-hover: var(--qz-surface-4);

  --modal-footer-bg: var(--qz-surface-inset);

  /* ---- Charts --------------------------------------------------------- */
  --chart-legend-color: var(--qz-text-mute);
  --chart-tooltip-bg:   var(--qz-surface-4);
}

/* The hamburger glyph is drawn, not tinted, so it needs a per-theme value. */
[data-theme="light"] {
  --navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%231a2d44' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.25' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
