/* The catalogue toggle sits beside the account and cart. Legacy pages have no shared header. */
.bn2-theme-toggle {
  --wd-otl-color: var(--bn2-focus, #1a649c);
  --wd-otl-style: solid;
  --wd-otl-width: 2px;
  --wd-otl-offset: 2px;
  display: inline-flex;
  flex: 0 0 auto;
  min-width: 42px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  padding: 0 4px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #103b62;
  font: inherit;
  letter-spacing: normal;
  text-transform: none;
  box-shadow: none;
  cursor: pointer;
}

.bn2-theme-toggle[hidden],
.bn2-theme-sun,
.bn2-header .bn2-brand-dark { display: none; }
.bn2-theme-toggle > span { display: flex; }
.bn2-theme-toggle > .bn2-theme-sun { display: none; }
.bn2-theme-toggle small { font-size: 10px; line-height: 1.2; font-weight: 700; }
.bn2-theme-toggle:hover { background: #eaf2f8; color: #103b62; }
.bn2-theme-toggle:focus-visible { outline: 2px solid var(--bn2-focus, #1a649c); outline-offset: 2px; }

.bn2-header button.bn2-theme-toggle {
  width: 42px;
  min-height: 42px;
  padding: 0 4px;
  background: transparent !important;
  box-shadow: none;
}
.bn2-header button.bn2-theme-toggle:is(:hover,:focus-visible) { background: #eaf2f8 !important; }
.bn2-theme-changing *, .bn2-theme-changing *::before, .bn2-theme-changing *::after { transition: none !important; }

.bn2-catalog-studio .bn2-card p { color: #536b7e; }

.bn2-theme-floating {
  position: fixed;
  z-index: 310;
  inset-inline-start: max(12px, env(safe-area-inset-left));
  inset-block-end: max(12px, env(safe-area-inset-bottom));
  flex-direction: row;
  gap: 5px;
  padding-inline: 9px;
  border-color: #b5cadc;
  background: #fff;
  box-shadow: 0 2px 10px #092e5925;
}
.bn2-theme-floating small { display: block; }

@media (max-width: 640px) {
  .bn2-header .bn2-header-main { grid-template-columns: minmax(0, 1fr) auto; }
  .bn2-header .bn2-brand { width: min(100%, 205px); }
}

html[data-bn2-theme="dark"] {
  color-scheme: dark;
  --bn2-bg: #0c1621;
  --bn2-panel: #142433;
  --bn2-raised: #1c3043;
  --bn2-field: #111f2d;
  --bn2-ink: #f0f5fa;
  --bn2-muted: #bdcddd;
  --bn2-link: #a6d5ff;
  --bn2-line: #3c546b;
  --bn2-field-line: #688298;
  --bn2-focus: #ffb36d;
  --bn2-good: #94dfb0;
  --bn2-bad: #ffaeaa;
  background-color: var(--bn2-bg);
}

[data-bn2-theme="dark"] .bn2-theme-toggle { color: var(--bn2-ink); }
[data-bn2-theme="dark"] .bn2-theme-toggle:hover { background: var(--bn2-raised); }
[data-bn2-theme="dark"] .bn2-header button.bn2-theme-toggle:is(:hover,:focus-visible) { background: var(--bn2-raised) !important; }
[data-bn2-theme="dark"] .bn2-theme-floating { background: var(--bn2-panel); border-color: var(--bn2-field-line); }
[data-bn2-theme="dark"] .bn2-theme-toggle > .bn2-theme-moon,
[data-bn2-theme="dark"] .bn2-header .bn2-brand img:not(.bn2-brand-dark) { display: none; }
[data-bn2-theme="dark"] .bn2-theme-toggle > .bn2-theme-sun { display: flex; }
[data-bn2-theme="dark"] .bn2-header .bn2-brand-dark { display: block; }

[data-bn2-theme="dark"] body.bn2-catalog-studio,
[data-bn2-theme="dark"] body.bn2-native-theme {
  --ink: var(--bn2-ink);
  --muted: var(--bn2-muted);
  --line: var(--bn2-line);
  background: var(--bn2-bg);
  color: var(--bn2-ink);
}

[data-bn2-theme="dark"] :is(.bn2-catalog-studio,.bn2-native-theme) :where(a,button,input,select,textarea):focus-visible {
  outline: 2px solid var(--bn2-focus);
  outline-offset: 2px;
}
[data-bn2-theme="dark"] .bn2-header .bn2-search input:focus-visible { outline-offset: -2px; }
[data-bn2-theme="dark"] .bn2-skip { background: var(--bn2-panel); }

/* Photos retain their light stage, independent of the cards, buttons and modal chrome. */
[data-bn2-theme="dark"] .bn2-shop-home { background: var(--bn2-bg); }
[data-bn2-theme="dark"] :is(.bn2-header,.bn2-shop-catalog,.bn2-shop-categories,.bn2-card) {
  background: var(--bn2-panel);
  border-color: var(--bn2-line);
}
[data-bn2-theme="dark"] .bn2-header-actions a,
[data-bn2-theme="dark"] :is(.bn2-shop-heading h2,.bn2-shop-categories h2,.bn2-shop-categories li a,.bn2-card h3 a) { color: var(--bn2-ink); }
[data-bn2-theme="dark"] .bn2-header-actions a:hover,
[data-bn2-theme="dark"] .bn2-promises svg { color: var(--bn2-link); }
[data-bn2-theme="dark"] .bn2-search { background: var(--bn2-field); border-color: var(--bn2-field-line); }
[data-bn2-theme="dark"] .bn2-search input::placeholder { color: var(--bn2-muted); opacity: 1; }
[data-bn2-theme="dark"] .bn2-shop-categories li { border-color: var(--bn2-line); }
[data-bn2-theme="dark"] .bn2-shop-categories li a:hover { background: var(--bn2-raised); color: var(--bn2-link); }
[data-bn2-theme="dark"] .bn2-shop-categories :is(svg,.bn2-shop-chevron) { color: var(--bn2-link); }
[data-bn2-theme="dark"] :is(.bn2-shop-category-help,.bn2-shop-heading a) { color: var(--bn2-link) !important; }
[data-bn2-theme="dark"] .bn2-shop-home .bn2-card-body,
[data-bn2-theme="dark"] .bn2-product-page .bn2-related .bn2-card-body { background: var(--bn2-panel); }
[data-bn2-theme="dark"] .bn2-card :is(.bn2-card-type,.bn2-card-bottom a) { color: var(--bn2-link); }
[data-bn2-theme="dark"] .bn2-catalog-studio .bn2-card p { color: var(--bn2-muted); }
[data-bn2-theme="dark"] .woocommerce-price-suffix { color: var(--bn2-muted); }
[data-bn2-theme="dark"] .bn2-shop-catalog .bn2-filter-buttons button {
  background: var(--bn2-field);
  border-color: var(--bn2-field-line);
  color: var(--bn2-ink);
}
[data-bn2-theme="dark"] .bn2-shop-catalog .bn2-filter-buttons button:hover {
  background: var(--bn2-raised);
  color: var(--bn2-ink);
}
[data-bn2-theme="dark"] .bn2-shop-catalog .bn2-filter-buttons button[aria-pressed="true"] {
  background: var(--bn2-link);
  border-color: var(--bn2-link);
  color: #10263b;
}

[data-bn2-theme="dark"] .bn2-product-page { --product-ink: var(--bn2-ink); --product-line: var(--bn2-line); }
[data-bn2-theme="dark"] .bn2-breadcrumb,
[data-bn2-theme="dark"] .bn2-product-page :is(.bn2-pdp-subtitle,.bn2-facts,figcaption,.bn2-gallery-position,.bn2-zoom-caption,.bn2-product-overview p),
[data-bn2-theme="dark"] .bn2-product-page .bn2-pdp-price > span,
[data-bn2-theme="dark"] .bn2-product-technical :is(dt,dd) { color: var(--bn2-muted); }
[data-bn2-theme="dark"] .bn2-product-page :is(.bn2-purchase-benefits,.bn2-breadcrumb a,.bn2-underlink,.reset_variations),
[data-bn2-theme="dark"] .bn2-product-page .bn2-facts > div::before,
[data-bn2-theme="dark"] .bn2-checkout .bn2-breadcrumb a { color: var(--bn2-link); }
[data-bn2-theme="dark"] .bn2-product-page :is(.bn2-aside-box,.bn2-product-technical,.bn2-zoom-dialog) { background: var(--bn2-panel); }
[data-bn2-theme="dark"] .bn2-product-technical dl > div { border-color: var(--bn2-line); }
[data-bn2-theme="dark"] .bn2-aside-box li::before { color: var(--bn2-focus); }
[data-bn2-theme="dark"] .bn2-product-page .bn2-thumb { border-color: var(--bn2-field-line); }
[data-bn2-theme="dark"] .bn2-product-page .bn2-thumb.active { border-color: var(--bn2-link); }
[data-bn2-theme="dark"] .bn2-product-page :is(.bn2-gallery-controls button,.bn2-zoom-dialog form button) {
  background: var(--bn2-raised);
  border-color: var(--bn2-field-line);
  color: var(--bn2-ink);
}
[data-bn2-theme="dark"] .bn2-product-page .bn2-gallery-controls button:hover { background: #294561; }
[data-bn2-theme="dark"] .bn2-product-page .bn2-zoom-dialog img { background: #eef4f8; border-radius: 4px; }
[data-bn2-theme="dark"] .bn2-cart-feedback,
[data-bn2-theme="dark"] .bn2-pdp-cart .stock.in-stock { color: var(--bn2-good); }
[data-bn2-theme="dark"] .bn2-pdp-cart .stock.out-of-stock { color: var(--bn2-bad); }
[data-bn2-theme="dark"] .bn2-product-page .bn2-pdp-cart .bn2-buy-now { border-color: #6288ac; background: #20486b; }
[data-bn2-theme="dark"] .bn2-product-page .bn2-pdp-cart .bn2-buy-now:disabled { background: var(--bn2-panel); color: var(--bn2-muted); opacity: 1; }
[data-bn2-theme="dark"] .bn2-product-page :is(.bn2-facts dt,.variations label) { color: var(--bn2-ink); }

/* WooCommerce renders some dropdowns outside the checkout container. */
[data-bn2-theme="dark"] :is(.bn2-pdp-cart,.bn2-woocommerce,.bn2-native-theme, .select2-search)
  :is(input:not([type="checkbox"],[type="radio"],[type="hidden"],[type="submit"],[type="button"]),select,textarea) {
  background-color: var(--bn2-field);
  border-color: var(--bn2-field-line);
  color: var(--bn2-ink);
}
[data-bn2-theme="dark"] :is(.bn2-pdp-cart,.bn2-woocommerce,.bn2-native-theme) :is(input,textarea)::placeholder {
  color: var(--bn2-muted);
  opacity: 1;
}
[data-bn2-theme="dark"] :is(.bn2-pdp-cart,.bn2-woocommerce) :is(td,th,fieldset,.checkout_coupon) { border-color: var(--bn2-line); }
[data-bn2-theme="dark"] :is(.bn2-pdp-cart,.bn2-woocommerce) .quantity :is(.minus,.plus) {
  background-color: var(--bn2-field);
  border-color: var(--bn2-field-line);
  color: var(--bn2-ink);
}
[data-bn2-theme="dark"] :is(.bn2-woocommerce,.bn2-native-theme .woocommerce) a:not(.button) { color: var(--bn2-link); }
[data-bn2-theme="dark"] :is(.bn2-woocommerce,.bn2-native-theme) .woocommerce-invalid :is(input,select,.select2-selection) { border-color: var(--bn2-bad); }
[data-bn2-theme="dark"] :is(.bn2-woocommerce,.bn2-native-theme) .required { color: var(--bn2-bad); }
[data-bn2-theme="dark"] :is(.bn2-woocommerce,.bn2-native-theme) .optional { color: var(--bn2-muted); }
[data-bn2-theme="dark"] .bn2-woocommerce :is(#order_review,#order_review .shop_table,.woocommerce-terms-and-conditions) {
  background: var(--bn2-panel);
  color: var(--bn2-ink);
}
[data-bn2-theme="dark"] .bn2-woocommerce #order_review .shop_table :is(th,td) { background-color: transparent; }
[data-bn2-theme="dark"] :is(.bn2-woocommerce,.bn2-native-theme) .blockUI.blockOverlay {
  background: #0c1621b8 !important;
  opacity: 1 !important;
}
[data-bn2-theme="dark"] :is(.bn2-woocommerce,.bn2-native-theme) #payment { background: var(--bn2-panel); color: var(--bn2-ink); }
[data-bn2-theme="dark"] :is(.bn2-woocommerce,.bn2-native-theme) #payment .payment_box { background: var(--bn2-raised); color: var(--bn2-ink); }
[data-bn2-theme="dark"] :is(.bn2-woocommerce,.bn2-native-theme) #payment .payment_box::before { border-bottom-color: var(--bn2-raised); }
[data-bn2-theme="dark"] :is(.bn2-woocommerce,.bn2-native-theme) #payment .payment_methods { border-color: var(--bn2-line); }
[data-bn2-theme="dark"] :is(.bn2-woocommerce,.bn2-native-theme) :is(.cart_totals,.woocommerce-terms-and-conditions) { border-color: var(--bn2-line); }
[data-bn2-theme="dark"] .bn2-woocommerce table.shop_table_responsive tr:nth-child(2n) td { background: var(--bn2-panel); }
[data-bn2-theme="dark"] .bn2-woocommerce .product-thumbnail img { background: #fff; border-radius: 4px; }
[data-bn2-theme="dark"] :is(.bn2-woocommerce,.bn2-product-notices,.bn2-native-theme) :is(.woocommerce-message,.woocommerce-error,.woocommerce-info) {
  background: var(--bn2-panel);
  color: var(--bn2-ink);
  border-inline-start: 3px solid var(--bn2-link);
}
[data-bn2-theme="dark"] :is(.bn2-woocommerce,.bn2-product-notices,.bn2-native-theme) .woocommerce-error { border-color: var(--bn2-bad); }
[data-bn2-theme="dark"] :is(.bn2-woocommerce,.bn2-product-notices,.bn2-native-theme) .woocommerce-message { border-color: var(--bn2-good); }
[data-bn2-theme="dark"] :is(.bn2-woocommerce,.bn2-product-notices,.bn2-native-theme) :is(.woocommerce-message,.woocommerce-error,.woocommerce-info) a:not(.button) {
  color: var(--bn2-link);
  text-decoration: underline;
}

[data-bn2-theme="dark"] .select2-container--default .select2-selection--single,
[data-bn2-theme="dark"] .select2-dropdown {
  background: var(--bn2-field);
  border-color: var(--bn2-field-line);
  color: var(--bn2-ink);
}
[data-bn2-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered { color: var(--bn2-ink); }
[data-bn2-theme="dark"] .select2-container--default .select2-selection__placeholder { color: var(--bn2-muted); }
[data-bn2-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__arrow b { border-top-color: var(--bn2-muted); }
[data-bn2-theme="dark"] .select2-container--default .select2-results__option[aria-selected="true"] { background: var(--bn2-raised); color: var(--bn2-ink); }
[data-bn2-theme="dark"] .select2-container--default .select2-results__option--highlighted { background: #285277; color: #fff; }

/* Woodmart also supplies some form and typography rules to the custom storefront. */
[data-bn2-theme="dark"] :is(.bn2-native-theme,.bn2-catalog-studio) {
  --wd-otl-color: var(--bn2-focus);
  --wd-otl-style: solid;
  --wd-main-bgcolor: var(--bn2-bg);
  --wd-text-color: var(--bn2-muted);
  --wd-title-color: var(--bn2-ink);
  --wd-entities-title-color: var(--bn2-ink);
  --wd-link-color: var(--bn2-link);
  --wd-link-color-hover: var(--bn2-ink);
  --wd-form-brd-color: var(--bn2-field-line);
  --wd-form-color: var(--bn2-ink);
  --wd-form-bg: var(--bn2-field);
  --color-white: var(--bn2-panel);
  --color-gray-100: #172737;
  --color-gray-200: #24394b;
  --color-gray-300: #344b60;
  --color-gray-400: #688298;
  --color-gray-500: #9db2c7;
  --color-gray-600: var(--bn2-muted);
  --color-gray-700: #d0deee;
  --color-gray-800: #e7eff8;
  --color-gray-900: var(--bn2-ink);
}
[data-bn2-theme="dark"] .bn2-native-theme :is(.website-wrapper,.main-page-wrapper) {
  background-color: var(--bn2-bg);
  color: var(--bn2-muted);
}
[data-bn2-theme="dark"] .bn2-native-theme :is(.wd-side-hidden,.wd-search-full-screen) { background-color: var(--bn2-panel); }
[data-bn2-theme="dark"] .bn2-native-theme :is(.whb-header-bottom,.whb-top-bar) { background-color: var(--bn2-panel) !important; }
[data-bn2-theme="dark"] .bn2-native-theme :is(.whb-header-bottom .wd-nav > li > a,.wd-header-cats .menu-opener) { color: var(--bn2-ink); }
[data-bn2-theme="dark"] .bn2-native-theme .wd-header-cats .menu-opener { background: var(--bn2-raised); }
[data-bn2-theme="dark"] .bn2-native-theme .entry-content :is(h1,h2,h3,h4,strong,label) { color: var(--bn2-ink); }
[data-bn2-theme="dark"] .bn2-native-theme .entry-content a:not(.button) { color: var(--bn2-link); }
[data-bn2-theme="dark"] .bn2-native-theme .entry-content :is(th,td) { border-color: var(--bn2-line); }
[data-bn2-theme="dark"] .bn2-native-theme .woocommerce .lost_password a { color: var(--bn2-link); }
[data-bn2-theme="dark"] .bn2-native-theme .woocommerce :is(.wd-switch-to-register,.wd-switch-to-login) {
  background: var(--bn2-raised);
  border-color: var(--bn2-field-line);
  color: var(--bn2-ink);
}

[data-bn2-theme="dark"] #moove_gdpr_cookie_modal :is(.moove-gdpr-modal-content,.moove-gdpr-modal-left-content,.moove-gdpr-modal-right-content) {
  background: var(--bn2-panel);
  color: var(--bn2-ink);
}
[data-bn2-theme="dark"] #moove_gdpr_cookie_modal :is(p,h2,h3,label,.tab-title) { color: var(--bn2-ink); }
