/* Progressive enhancement: the existing visible navigation remains usable without JS. */
.nl-a11y-ready .nanolab-menu-toggle { display: none; }
.nl-a11y-ready .nanolab-submenu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; margin: 0; padding: 4px;
  color: inherit; background: transparent; border: 1px solid currentColor;
  border-radius: 8px; font-size: 20px; cursor: pointer;
}
.nl-a11y-ready .nanolab-header .nanolab-nav-products {
  display: flex; align-items: center; gap: 6px; position: relative;
}
.nl-a11y-ready .nanolab-submenu-toggle:hover,
.nl-a11y-ready .nanolab-submenu-toggle:focus-visible { background: #0000d7; color: #fff; }
.nl-a11y-ready .nanolab-nav-dropdown[hidden],
.nl-a11y-ready a.skip-link[hidden],
.nl-a11y-ready a.nanolab-skip-link[hidden] { display: none !important; }
.nl-a11y-ready .nanolab-nav-products.is-open .nanolab-nav-dropdown {
  opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0);
}
.nl-a11y-ready body .nanolab-skip-link:not([hidden]),
.nl-a11y-ready body:not(:has(#nanolab-main)) .nanolab-skip-link:not([hidden]) { display: block !important; }
.nl-a11y-ready .nanolab-application-form::before { content: none; }
.nl-a11y-ready .nanolab-required-note { grid-column: 1 / -1; color: #333; line-height: 1.6; }

@media (max-width: 1100px) {
  .nl-a11y-ready .nanolab-header { flex-wrap: wrap; gap: 10px; padding-block: 10px; }
  .nl-a11y-ready .nanolab-header .nanolab-wordmark { order: 1; width: clamp(100px, 30vw, 180px); max-width: 34%; }
  .nl-a11y-ready .nanolab-menu-toggle {
    order: 2; display: inline-flex; align-items: center; justify-content: center;
    min-height: 44px; padding: 8px 10px; margin-inline-start: auto;
    border: 2px solid #0000d7; border-radius: 8px;
    background: #fff; color: #0000d7; font-size: 16px; font-weight: 700;
  }
  .nl-a11y-ready .nanolab-header .nanolab-header-cta { order: 3; margin-inline-start: 0; }
  .nl-a11y-ready .nanolab-header .nanolab-nav {
    order: 4; display: none !important; width: 100%; flex-basis: 100%;
    margin: 0; padding: 12px; box-sizing: border-box;
    max-height: 60vh; overflow-y: auto; border: 1px solid #ddd;
    border-radius: 8px; background: #fff; color: #111;
  }
  .nl-a11y-ready .nanolab-header .nanolab-nav.is-open {
    display: flex !important; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 6px;
  }
  .nl-a11y-ready .nanolab-header .nanolab-nav a {
    display: block; padding: 9px 12px; color: #111 !important;
    text-shadow: none; white-space: normal;
  }
  .nl-a11y-ready .nanolab-header .nanolab-nav a:hover,
  .nl-a11y-ready .nanolab-header .nanolab-nav a:focus-visible { color: #fff !important; background: #0000d7; }
  .nl-a11y-ready .nanolab-header .nanolab-nav-products { flex-wrap: wrap; }
  .nl-a11y-ready .nanolab-header .nanolab-nav-products > a { flex: 1; }
  .nl-a11y-ready .nanolab-header .nanolab-nav-dropdown {
    position: static; flex-basis: 100%; width: 100%; min-width: 0; max-width: 100%; box-shadow: none;
  }
  .nl-a11y-ready .nanolab-nav-dropdown::before { display: none; }
}

/* Keep the optional WP Accessibility contrast mode readable. */
.nl-a11y-ready body.contrast .nanolab-header .nanolab-nav a {
  color: #f3f3f3 !important; background: #000 !important;
}
.nl-a11y-ready body.contrast .nanolab-header .nanolab-nav a:hover,
.nl-a11y-ready body.contrast .nanolab-header .nanolab-nav a:focus-visible {
  color: #000 !important; background: #fff !important;
}
.nl-a11y-ready body.contrast del,
.nl-a11y-ready body.contrast del .amount,
.nl-a11y-ready body.contrast del .woocommerce-Price-currencySymbol,
.nl-a11y-ready body.contrast .product_meta,
.nl-a11y-ready body.contrast .product_meta span,
.nl-a11y-ready body.contrast .product_meta a,
.nl-a11y-ready body.contrast legend > span { color: #f3f3f3 !important; }

/* The existing font-size toggle provides a complete 200% enlargement. */
html.nl-a11y-ready.fontsize { zoom: 2 !important; font-size: 100% !important; }
html.nl-a11y-ready.fontsize body { overflow-wrap: anywhere; }
html.nl-a11y-ready.fontsize .nanolab-header { position: relative !important; top: auto !important; }
html.nl-a11y-ready.fontsize .a11y-toolbar { top: auto !important; bottom: 8px !important; transform: none !important; }
html.nl-a11y-ready.fontsize .site-container { padding-inline: 8px; }
html.nl-a11y-ready.fontsize .entry-content-wrap { padding: 0; }
html.nl-a11y-ready.fontsize .nanolab-content-page { padding: 24px 8px; }
html.nl-a11y-ready.fontsize .nanolab-application-wrap { padding: 12px 8px; }
html.nl-a11y-ready.fontsize .nanolab-application-form { grid-template-columns: minmax(0, 1fr); }
html.nl-a11y-ready.fontsize .nanolab-application-form label { min-width: 0; }
html.nl-a11y-ready.fontsize .nanolab-application-form input:not([type="checkbox"]),
html.nl-a11y-ready.fontsize .nanolab-application-form textarea { min-width: 0; width: 100%; box-sizing: border-box; }
html.nl-a11y-ready.fontsize .nanolab-shop-tools { padding: 12px 8px; }
html.nl-a11y-ready.fontsize .nanolab-product-search { flex-direction: column; align-items: stretch; }
html.nl-a11y-ready.fontsize .nanolab-product-search input,
html.nl-a11y-ready.fontsize .nanolab-product-search button { width: 100%; min-width: 0; box-sizing: border-box; }

/* Keep the verified contrast fixes independent of Commerce Suite updates. */
.nanolab-content-page .nanolab-kicker { color: #4b57c5; }
.woocommerce del, .woocommerce del .amount,
.woocommerce del .woocommerce-Price-currencySymbol,
.wc-block-grid del, .wc-block-grid del .amount,
.wc-block-components-product-price del { color: #595959 !important; opacity: 1 !important; }
.page-id-186 legend > span { color: #4f6157 !important; }
.single-product .product_meta,
.single-product .product_meta span,
.single-product .product_meta a { color: #526176 !important; }
.nl-a11y-ready body.contrast .nanolab-kicker,
.nl-a11y-ready body.contrast del,
.nl-a11y-ready body.contrast del .amount,
.nl-a11y-ready body.contrast del .woocommerce-Price-currencySymbol,
.nl-a11y-ready body.contrast .product_meta,
.nl-a11y-ready body.contrast .product_meta span,
.nl-a11y-ready body.contrast .product_meta a,
.nl-a11y-ready body.contrast legend > span { color: #f3f3f3 !important; }
  html.nl-a11y-ready.fontsize .nanolab-header { flex-wrap: wrap; gap: 10px; padding-block: 10px; }
  html.nl-a11y-ready.fontsize .nanolab-header .nanolab-wordmark { order: 1; width: clamp(100px, 30vw, 180px); max-width: 34%; }
  html.nl-a11y-ready.fontsize .nanolab-menu-toggle {
    order: 2; display: inline-flex; align-items: center; justify-content: center;
    min-height: 44px; padding: 8px 10px; margin-inline-start: auto;
    border: 2px solid #0000d7; border-radius: 8px;
    background: #fff; color: #0000d7; font-size: 16px; font-weight: 700;
  }
  html.nl-a11y-ready.fontsize .nanolab-header .nanolab-header-cta { order: 3; margin-inline-start: 0; }
  html.nl-a11y-ready.fontsize .nanolab-header .nanolab-nav {
    order: 4; display: none !important; width: 100%; flex-basis: 100%;
    margin: 0; padding: 12px; box-sizing: border-box;
    max-height: 60vh; overflow-y: auto; border: 1px solid #ddd;
    border-radius: 8px; background: #fff; color: #111;
  }
  html.nl-a11y-ready.fontsize .nanolab-header .nanolab-nav.is-open {
    display: flex !important; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 6px;
  }
  html.nl-a11y-ready.fontsize .nanolab-header .nanolab-nav a {
    display: block; padding: 9px 12px; color: #111 !important;
    text-shadow: none; white-space: normal;
  }
  html.nl-a11y-ready.fontsize .nanolab-header .nanolab-nav a:hover,
  html.nl-a11y-ready.fontsize .nanolab-header .nanolab-nav a:focus-visible { color: #fff !important; background: #0000d7; }
  html.nl-a11y-ready.fontsize .nanolab-header .nanolab-nav-products { flex-wrap: wrap; }
  html.nl-a11y-ready.fontsize .nanolab-header .nanolab-nav-products > a { flex: 1; }
  html.nl-a11y-ready.fontsize .nanolab-header .nanolab-nav-dropdown {
    position: static; flex-basis: 100%; width: 100%; min-width: 0; max-width: 100%; box-shadow: none;
  }
  html.nl-a11y-ready.fontsize .nanolab-nav-dropdown::before { display: none; }
