/* Arjometa dark mode. Active only when <html data-theme="dark">. */

html[data-theme="dark"] {
  color-scheme: dark;
  /* Arjometa colours */
  --ar-paper: #121212;
  --ar-surface: #1b1b1a;
  --ar-ink: #f1f0ec;
  --ar-steel: #a9a8a2;
  --ar-line: #34332f;
  /* GeneratePress colours */
  --contrast: #f1f0ec;
  --contrast-2: #b9b8b2;
  --contrast-3: #6b6a65;
  --base: #1b1b1a;
  --base-2: #121212;
  --base-3: #1b1b1a;
  --accent: #ff8a2a;
}

/* ---------- Toggle button (all modes) ---------- */
.main-navigation .main-nav ul li.ar-theme-item { height: 60px; display: flex; align-items: center; margin-left: 10px; }
.main-navigation .main-nav ul li.ar-theme-item button.ar-theme-toggle {
  width: 40px; height: 40px; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--ar-line); border-radius: 3px; cursor: pointer;
  background: var(--ar-surface) !important; color: var(--ar-ink) !important; line-height: 1;
}
.main-navigation .main-nav ul li.ar-theme-item button.ar-theme-toggle:hover { border-color: var(--ar-ink); }
.ar-theme-toggle .ar-ico-sun { display: none; }
html[data-theme="dark"] .ar-theme-toggle .ar-ico-moon { display: none; }
html[data-theme="dark"] .ar-theme-toggle .ar-ico-sun { display: block; }

/* ---------- Logo: white version of the icon ---------- */
html[data-theme="dark"] .site-logo img,
html[data-theme="dark"] img.header-image { content: url("images/arjometa-logo-mark-white.png"); }

/* ---------- Page and text ---------- */
html[data-theme="dark"] body { background: var(--ar-paper); color: var(--ar-ink); }
html[data-theme="dark"] .site-header,
html[data-theme="dark"] .main-navigation,
html[data-theme="dark"] .main-navigation ul ul { background: var(--ar-paper); }
html[data-theme="dark"] .separate-containers .inside-article,
html[data-theme="dark"] .one-container .container,
html[data-theme="dark"] .inside-page-header { background: var(--ar-surface); }
html[data-theme="dark"] .woocommerce-breadcrumb { color: var(--ar-steel); }
html[data-theme="dark"] .woocommerce-breadcrumb a { color: var(--ar-ink); }

/* ---------- Buttons (dark text on light buttons) ---------- */
html[data-theme="dark"] button,
html[data-theme="dark"] input[type="submit"],
html[data-theme="dark"] input[type="button"],
html[data-theme="dark"] a.button,
html[data-theme="dark"] .woocommerce a.button,
html[data-theme="dark"] .woocommerce button.button { color: #141414; }
html[data-theme="dark"] button:hover,
html[data-theme="dark"] input[type="submit"]:hover,
html[data-theme="dark"] a.button:hover,
html[data-theme="dark"] .woocommerce a.button:hover,
html[data-theme="dark"] .woocommerce button.button:hover { color: var(--ar-ink); }

/* orange buttons keep dark text */
html[data-theme="dark"] .ar-btn-accent,
html[data-theme="dark"] button.button.ar-btn-accent,
html[data-theme="dark"] .ar-mini-accent,
html[data-theme="dark"] .ar-search button,
html[data-theme="dark"] .ar-schemos-search button { color: #141414 !important; }

html[data-theme="dark"] .ar-mini:hover { color: #141414 !important; }
html[data-theme="dark"] .ar-chip.is-active { color: #141414; }
html[data-theme="dark"] .ar-matrix-table .ar-col-no { color: #141414; }

/* ---------- Dark blocks and footer ---------- */
html[data-theme="dark"] .site-info { background: #0b0b0b; color: var(--ar-ink); border-top: 1px solid var(--ar-line); }
html[data-theme="dark"] .site-info a { color: var(--ar-ink); }
html[data-theme="dark"] .ar-help { background: #0b0b0b; color: var(--ar-ink); border-top: 1px solid var(--ar-line); border-bottom: 1px solid var(--ar-line); }
html[data-theme="dark"] .ar-help h2 { color: var(--ar-ink); }

/* ---------- Forms ---------- */
html[data-theme="dark"] .ar-schemos-search,
html[data-theme="dark"] .ar-schemos-search input[type="search"] { background: var(--ar-surface); color: var(--ar-ink); }
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder { color: var(--ar-steel); opacity: 1; }

/* ---------- Diagrams and tables ---------- */
/* drawings are black on white: keep their white card */
html[data-theme="dark"] .ar-diagram { background: #fff; }
html[data-theme="dark"] .ar-diagram figcaption { color: #5b5b57; }
html[data-theme="dark"] .ar-parts tr.is-hit,
html[data-theme="dark"] .ar-matrix-table tbody tr.is-hit td:nth-child(1),
html[data-theme="dark"] .ar-matrix-table tbody tr.is-hit td:nth-child(2) { background: #33220f; }
html[data-theme="dark"] .ar-code:hover { background: #3a2615; }
html[data-theme="dark"] .ar-hits { background: var(--ar-surface); }

/* ---------- WooCommerce product page ---------- */
html[data-theme="dark"] .woocommerce div.product .woocommerce-tabs ul.tabs::before { border-bottom-color: var(--ar-line); }
html[data-theme="dark"] .woocommerce div.product .woocommerce-tabs ul.tabs li { background: var(--ar-surface); border-color: var(--ar-line); }
html[data-theme="dark"] .woocommerce div.product .woocommerce-tabs ul.tabs li::before,
html[data-theme="dark"] .woocommerce div.product .woocommerce-tabs ul.tabs li::after { display: none; }
html[data-theme="dark"] .woocommerce div.product .woocommerce-tabs ul.tabs li.active { background: var(--ar-paper); border-bottom-color: var(--ar-paper); }
html[data-theme="dark"] .woocommerce div.product .woocommerce-tabs ul.tabs li a { color: var(--ar-steel); }
html[data-theme="dark"] .woocommerce div.product .woocommerce-tabs ul.tabs li.active a { color: var(--ar-ink); }
html[data-theme="dark"] .woocommerce table.shop_attributes th,
html[data-theme="dark"] .woocommerce table.shop_attributes td { background: transparent; border-color: var(--ar-line); color: var(--ar-ink); }
html[data-theme="dark"] .woocommerce-ordering select { background: var(--ar-surface); color: var(--ar-ink); }

/* ---------- Hero: phone button and search box ---------- */
html[data-theme="dark"] a.button.ar-btn-ghost { background: transparent; border-color: #fff; color: #fff !important; }
html[data-theme="dark"] a.button.ar-btn-ghost:hover { background: #fff; border-color: #fff; color: #141414 !important; }

/* search box on the photo: dark box with light text */
html[data-theme="dark"] .ar-hero2 .ar-search,
html[data-theme="dark"] .ar-pagehero .ar-search { background: var(--ar-surface); border-color: #6b6a65; }
html[data-theme="dark"] .ar-hero2 .ar-search:focus-within,
html[data-theme="dark"] .ar-pagehero .ar-search:focus-within { border-color: var(--ar-orange); }
html[data-theme="dark"] .ar-hero2 .ar-search input[type="search"],
html[data-theme="dark"] .ar-pagehero .ar-search input[type="search"] { color: var(--ar-ink); }
