/*
 * PumpWorks Selector and Configurator
 * Copyright (c) 2026 DXP Enterprises, Inc. All rights reserved.
 *
 * Developed by Frees Consulting and Development LLC (FCD)
 * https://freesconsulting.com
 */

/* ==========================================================================
   Design tokens per akb/ux/branding.md §1, and the one place a token is
   declared. Every page links this file before its own stylesheet:
   views/layout.pug before app.css, views/auth/entry.pug before login.css.
   tests/unit/css-token-gate.test.js fails a reference to any other token.
   ========================================================================== */

:root {
  /* Primary */
  --mc-red:          #ee3a43;
  --mc-red-dark:     #a41c22;
  --mc-red-bright:   #ec2028;
  /* Deep maroon — the QA "File QA Issue" action, deliberately darker than the
     PumpWorks reds so it reads as its own distinct affordance (#273). */
  --mc-maroon:       #6d1519;
  --mc-maroon-dark:  #4f0f13;

  /* Secondary */
  --mc-navy:         #022762;
  --mc-cyan:         #23ced9;
  --mc-magenta:      #f00069;
  --mc-blue-accent:  #167ce3;
  --mc-blue-dark:    #0e5fb0;

  /* Neutrals */
  --mc-black:        #000000;
  --mc-white:        #ffffff;
  --mc-gray-100:     #ebeff4;
  --mc-gray-200:     #ededed;
  --mc-gray-300:     #e9e9e9;
  --mc-gray-400:     #d5d5d5;
  --mc-gray-500:     #b8b8b8;
  --mc-gray-700:     #6c757d;
  --mc-gray-800:     #32373c;

  /* Semantic */
  --mc-bg-primary:      var(--mc-white);
  --mc-bg-light:        var(--mc-gray-100);
  --mc-text-primary:    var(--mc-black);
  --mc-text-on-dark:    var(--mc-white);
  --mc-text-heading:    var(--mc-navy);
  --mc-accent:          var(--mc-red);
  --mc-link:            var(--mc-blue-accent);

  /* Subtle / help text (branding §7) */
  --mc-text-subtle: #888888;

  /* Alert backgrounds */
  --mc-alert-error-bg: #fff5f5;

  /* Status palettes — backgrounds, foregrounds, borders */
  --mc-status-success-bg:     #d1e7dd;
  --mc-status-success-fg:     #0f5132;
  --mc-status-success-hover:  #0b3d26;
  --mc-status-success-border: #badbcc;
  --mc-status-warning-bg:     #fff3cd;
  --mc-status-warning-fg:     #856404;
  --mc-status-warning-border: #ffe69c;
  --mc-status-warning-dark:   #5b4500;
  /* Bright amber for warning ICONS/accents on white — the fg/dark ambers
     read brown at glyph size (selector near-miss flags). */
  --mc-status-warning-icon:   #e0a800;
  /* Very light amber row-hover wash (Option Configuration option-row hover). */
  --mc-status-warning-tint:   #fff8e1;
  --mc-status-info-bg:        #cfe2ff;
  --mc-status-info-fg:        #084298;
  --mc-status-info-border:    #b6d4fe;
  --mc-status-error-bg:       #f8d7da;
  --mc-status-error-fg:       #842029;
  --mc-status-error-border:   #f5c2c7;
  /* Danger foreground — the brand red, for required-unset glyphs, the required
     marker, field messages, and invalid borders. Was referenced without a
     fallback and left undefined, so those inherited the dark text colour. */
  --mc-status-danger-fg:      var(--mc-red);
  /* Disposition accents — swap (purple) and its tint. Adder reuses the existing
     blue accent / info palette; swap had no token (a bare hex in one rule). */
  --mc-swap:                  #7048c4;
  --mc-swap-bg:               #ece6f7;
  /* The figure entered for one pump on an RFQ or PPA line sets navy on this
     pale yellow. */
  --mc-quoted-bg:             #fff3b8;

  /* Danger button hover */
  --mc-danger-hover-bg: #7a1318;
  /* Light danger tint — destructive *icon* button hover, where the red glyph
     must stay legible (a filled dark-red hover would hide it). */
  --mc-danger-tint: rgba(164, 28, 34, 0.12);

  /* Deferred-field icon (yellow clock) */
  --mc-deferred-icon: #e0a800;

  /* Shadow of a surface floating over the page (a popover, the saving card) */
  --mc-shadow-popover: 0 4px 14px rgba(0, 0, 0, 0.12);

  /* Font */
  --mc-font: 'MonteCristo', 'Play', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout heights — keep in sync with actual element heights */
  --mc-topbar-h: 44px;
  /* 14px padding top and bottom, a 0.95rem title on the inherited 1.5
     line-height, and the 1px bottom border. Summed rather than rounded because
     `.mc-oc-heading` pins flush beneath the header: a fraction under hides a slice
     of the heading block behind it, a fraction over shows a sliver of scrolling rows.
     THE HEIGHT IS NOT CONSTANT — this sum describes a detail-page header whose
     breadcrumb fits one line, and /js/page-header-height.js measures the header
     actually on screen and overrides it. The sum is what governs before that
     runs and on a page with no header. */
  --mc-page-header-h: calc(28px + 0.95rem * 1.5 + 1px);
}
