/* ==========================================================================
   MMM dark theme — Missing Mile Modular
   Drawn from PANEL_STYLE_v1.04: white silkscreen on black soldermask,
   single-weight lettering, uppercase and letterspaced, hairline rules.

   This file only overrides. It is loaded AFTER variables.css, framework.min.css
   and app.min.css, so it wins without any of them being edited — a LiteCart
   upgrade replaces those and leaves this alone.

   Loaded from: layouts/default.inc.php, blank.inc.php, checkout.inc.php.
   Not printable.inc.php — invoices print on white paper.
   ========================================================================== */

:root {
  /* ---- ground and ink ------------------------------------------------- */
  --site-background-color: #000;
  --whitespace-color: #0a0a0a;
  --default-background-color: #0e0e0e;
  --default-border-color: #262626;
  --default-text-color: #f2f2f2;
  --link-text-color: #fff;
  --shadow-color: rgba(0, 0, 0, 0.6);

  /* PCB-native: marks meet at corners, they are not rounded off */
  --border-radius: 2px;
  --input-border-radius: 2px;

  /* ---- header and notices --------------------------------------------- */
  --header-background-color: #000;
  --header-text-color: #fff;
  --important-notice-background-color: #fff;
  --important-notice-text-color: #000;
  --cookie-notice-background-color: rgba(10, 10, 10, 0.94);
  --cookie-notice-text-color: #f2f2f2;

  /* ---- navigation ------------------------------------------------------ */
  --navigation-background-color: #0a0a0a;
  --navigation-background-color-hover: rgba(255, 255, 255, 0.08);
  --navigation-background-color-active: rgba(255, 255, 255, 0.16);
  --navigation-text-color: #f2f2f2;
  --navigation-text-color-hover: #fff;
  --navigation-text-color-active: #fff;
  --offcanvas-background-color: #0a0a0a;
  --offcanvas-text-color: #f2f2f2;

  /* ---- buttons ---------------------------------------------------------
     Primary inverts to white-on-black: on a black panel the brightest mark
     is the one that reads first, and that should be "add to cart".         */
  --default-button-background-color: #161616;
  --default-button-background-color-hover: #1f1f1f;
  --default-button-background-color-active: #262626;
  --default-button-border-color: #333;
  --default-button-text-color: #f2f2f2;

  --primary-button-background-color: #fff;
  --primary-button-background-color-hover: #d8d8d8;
  --primary-button-background-color-active: #bdbdbd;
  --primary-button-border-color: #fff;
  --primary-button-text-color: #000;

  --success-button-background-color: #7ee081;
  --success-button-background-color-hover: #92e695;
  --success-button-background-color-active: #6ccf70;
  --success-button-border-color: #7ee081;
  --success-button-text-color: #04180a;

  --warning-button-background-color: #e8c46a;
  --warning-button-background-color-hover: #eecd7f;
  --warning-button-background-color-active: #dbb655;
  --warning-button-border-color: #e8c46a;
  --warning-button-text-color: #1a1204;

  --danger-button-background-color: #e87070;
  --danger-button-background-color-hover: #ef8585;
  --danger-button-background-color-active: #d95f5f;
  --danger-button-border-color: #e87070;
  --danger-button-text-color: #1a0505;

  /* ---- notices ---------------------------------------------------------- */
  --default-notice-background-color: #141414;
  --default-notice-text-color: #f2f2f2;
  --default-notice-border-color: #2e2e2e;
  --primary-notice-background-color: #10222b;
  --primary-notice-text-color: #9ad9ef;
  --primary-notice-border-color: #1d4757;
  --success-notice-background-color: #0e1f10;
  --success-notice-text-color: #7ee081;
  --success-notice-border-color: #234d26;
  --warning-notice-background-color: #241d0c;
  --warning-notice-text-color: #e8c46a;
  --warning-notice-border-color: #56451c;
  --danger-notice-background-color: #240d0d;
  --danger-notice-text-color: #e87070;
  --danger-notice-border-color: #572222;

  /* ---- surfaces --------------------------------------------------------- */
  --breadcrumbs-background-color: transparent;
  --breadcrumbs-text-color: #8c8c8c;
  --breadcrumbs-border-color: #1f1f1f;

  --card-background-color: #0a0a0a;
  --card-text-color: #f2f2f2;
  --card-border-color: #242424;
  --card-header-background-color: transparent;
  --card-header-text-color: #fff;
  --card-body-background-color: transparent;
  --card-footer-background-color: #101010;

  --input-background-color: #111;
  --input-text-color: #fff;

  --pills-background-color: transparent;
  --pills-background-color-hover: rgba(255, 255, 255, 0.07);
  --pills-background-color-active: #1c1c1c;
  --pills-text-color: #bdbdbd;
  --pills-text-color-active: #fff;

  --tabs-pane-background-color: #0a0a0a;
  --tabs-pane-border-color: #242424;
  --tabs-background-color: #111;
  --tabs-background-color-active: #0a0a0a;
  --tabs-text-color: #a8a8a8;
  --tabs-text-color-active: #fff;
  --tabs-border-color: #242424;
  --tabs-border-color-active: #383838;
  --tabs-content-background-color: #0a0a0a;

  --dropdown-menu-background-color: #101010;
  --dropdown-menu-item-background-color: transparent;
  --dropdown-menu-item-text-color: #f2f2f2;

  --table-striped-row-background-odd: #0d0d0d;
  --table-striped-row-background-even: #0a0a0a;
  --table-row-hover-background: #191919;

  --pagination-background-color: #0e0e0e;
  --pagination-background-color-hover: #1a1a1a;
  --pagination-background-color-active: #fff;
  --pagination-text-color: #d8d8d8;
  --pagination-text-color-hover: #fff;
  --pagination-text-color-active: #000;
  --pagination-border-color: #2a2a2a;

  --footer-background-color: #050505;
  --footer-title-color: #fff;
  --footer-text-color: #9a9a9a;
  --copyright-background-color: #000;
  --copyright-text-color: #6e6e6e;
}

/* --------------------------------------------------------------------------
   Structural overrides — for the places the framework hardcodes a light
   value instead of reading a variable.
   -------------------------------------------------------------------------- */

html,
body {
  background-color: var(--site-background-color);
  color: var(--default-text-color);
}

/* Browser UI (scrollbars, form controls, autofill) follows the page */
:root { color-scheme: dark; }

a { color: var(--link-text-color); }
a:hover { color: #fff; }

hr,
.card,
.panel,
table td,
table th {
  border-color: var(--default-border-color);
}

/* Inputs: hairline box, no inner glow */
input[type="text"], input[type="email"], input[type="password"],
input[type="search"], input[type="tel"], input[type="url"],
input[type="number"], input[type="date"], select, textarea, .form-control {
  background-color: var(--input-background-color);
  border: 1px solid var(--default-border-color);
  color: var(--input-text-color);
}
input::placeholder, textarea::placeholder { color: #6e6e6e; }
input:focus, select:focus, textarea:focus, .form-control:focus {
  border-color: #fff;
  outline: none;
  box-shadow: none;
}

/* Chrome/Safari autofill paints its own yellow — repaint it */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff;
  -webkit-box-shadow: 0 0 0 1000px #111 inset;
  transition: background-color 9999s ease-out 0s;
}

/* --------------------------------------------------------------------------
   Header search box

   app.css hardcodes a literal grey here instead of reading
   --input-background-color, so it is the one input the token sweep misses:

     .navbar-header form[name="search_form"] .input-group { background: #f1f3f5 }

   Matching that selector exactly to take it back.
   -------------------------------------------------------------------------- */

.navbar-header form[name="search_form"] .input-group {
  background-color: var(--input-background-color);
  border-color: var(--default-border-color);
}

.navbar-header form[name="search_form"] .input-group:focus-within {
  border-color: #fff;
}

/* The magnifier sits inside the field and inherits, but state it anyway */
.navbar-header form[name="search_form"] .input-group-icon {
  color: #8c8c8c;
}

/* WebKit paints the clear "x" near-black, which vanishes on a dark field */
input[type="search"]::-webkit-search-cancel-button {
  filter: invert(1);
  opacity: 0.6;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Remaining hardcoded light values

   Found by sweeping app.css / checkout.css / framework.css for literal light
   colours that bypass the variables. Each override repeats the original
   selector so the specificity matches.
   -------------------------------------------------------------------------- */

/* Selected shipping/payment option — checkout.css: #eaebef.
   The most important one: it marks the customer's current choice. */
#box-checkout-shipping .option.active,
#box-checkout-payment .option.active {
  background: #1c1c1c;
  color: #fff;
}
#box-checkout-shipping .option,
#box-checkout-payment .option {
  border-color: var(--default-border-color);
}
#box-checkout-shipping .option hr,
#box-checkout-payment .option hr {
  border-color: var(--default-border-color);
}

/* Manufacturer caption strip — app.css: #f2f2f2 */
.listing .manufacturer .caption {
  background: var(--default-background-color);
  color: var(--default-text-color);
}

/* Dropdown divider — framework.css: #e5e5e5 (account and currency menus) */
.dropdown .dropdown-menu .dropdown-divider {
  background-color: var(--default-border-color);
}

/* Message bubbles — framework.css: #e5e5ea / #fcfcfc */
.bubbles .bubble { background: #161616; color: var(--default-text-color); }
.bubbles .bubble.local:after { background: #161616; }

/* Filter tokens keep their pastel fills (app.css) — they are colour-coded by
   group and carry dark text, so they stay legible and the coding survives. */

/* --------------------------------------------------------------------------
   House lettering — uppercase, letterspaced, single weight.
   Body copy stays in Asap; product descriptions have to stay readable.
   -------------------------------------------------------------------------- */

h1, h2, h3, h4, h5, h6,
.card > .card-header,
#box-site-menu .navbar-nav > li > a,
.btn,
#footer h4, #footer .h4 {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1, h2 { letter-spacing: 0.3em; }
.btn { letter-spacing: 0.12em; }

/* Section headers sit over a hairline, the way a panel divides a row */
.card > .card-header {
  border-bottom: 1px solid var(--default-border-color);
  color: #fff;
}

/* --------------------------------------------------------------------------
   Logotype
   -------------------------------------------------------------------------- */

.logotype img {
  height: 44px;
  width: auto;
  /* the mark is drawn white; nothing to invert */
}

@media (max-width: 767px) {
  .logotype img { height: 34px; }
}

/* --------------------------------------------------------------------------
   Product images
   Most product photography arrives on a white background, which on a black
   page reads as a bright rectangle rather than an object. A near-black tile
   behind the image keeps the grid even until the catalog is shot on black.
   -------------------------------------------------------------------------- */

.product .image,
#box-category .product .image,
.listing-normal .product .image {
  background-color: #0f0f0f;
  border: 1px solid var(--default-border-color);
}

/* --------------------------------------------------------------------------
   The star-field stays off (PANEL_STYLE_v1.04): no decorative texture.
   -------------------------------------------------------------------------- */
