/* Alternate storefront palettes. */
:root[data-store-theme="graphite"] {
  --store-page: #343941;
  --store-surface: #40464e;
  --store-raised: #494f58;
  --store-inset: #30353d;
  --store-muted: #d1d6dc;
  --store-border: #6f7986;
  --store-rule: #5b6470;
  --store-accent: #c0daf8;
  --store-accent-hover: #dfedff;
  --store-action: #a9c6e8;
  --store-action-hover: #c1dbf9;
  --store-email: #ffced7;
  --store-email-fill: #5b3440;
  --store-email-hover: #6b3e4b;
  --store-email-border: #b77a87;
}

:root[data-store-theme="dark"] {
  --store-page: #202124;
  --store-surface: #292a2e;
  --store-raised: #32343a;
  --store-inset: #232428;
  --store-muted: #bec2ca;
  --store-border: #676b75;
  --store-rule: #474a53;
  --store-accent: #b8d2f1;
  --store-accent-hover: #e0ecfb;
  --store-action: #a2bedf;
  --store-action-hover: #bad4f2;
  --store-email: #ffc2cf;
  --store-email-fill: #492b34;
  --store-email-hover: #613644;
  --store-email-border: #a36876;
}

html[data-store-theme]:not([data-store-theme="light"]) {
  --store-text: #f5f6f8;
  --store-action-text: #172128;
  --store-danger: #ffc3cf;
  --store-shadow: 0 12px 32px #1011174d;
  --page: var(--store-page);
  --paper: var(--store-surface);
  --surface: var(--store-surface);
  --text: var(--store-text);
  --muted: var(--store-muted);
  --line: var(--store-rule);
  --blue: var(--store-accent);
  --blue-deep: var(--store-accent-hover);
  --soft: var(--store-raised);
  --soft-text: var(--store-accent);
  --shadow: var(--store-shadow);
  color-scheme: dark;
}

html[data-ivekma-design][data-store-theme]:not([data-store-theme="light"]) {
  --iv-paper: var(--store-page);
  --iv-surface: var(--store-surface);
  --iv-ink: var(--store-text);
  --iv-muted: var(--store-muted);
  --iv-rule: var(--store-rule);
  --iv-soft: var(--store-raised);
  --iv-accent: var(--store-accent);
  --iv-accent-hover: var(--store-accent-hover);
}

html[data-store-theme]:not([data-store-theme="light"]) body :is(
  .site-header, .iv-head-menu, .iv-footer, .live-filters, .live-product, .catalog-selection,
  .live-empty, .live-pagination, .quote-dialog, .quote-footer, .mobile-filter-drawer,
  .search-dialog, .search-form, .search-popover, .catalog-explorer, .filter-dialog,
  .catalog-directory .branch-tile, .contact-location-card, .contact-letter-preview,
  .unit-options, .iv-foot-file, .workflow-section, .real-specs dl > div:nth-child(odd)
) {
  color: var(--store-text);
  background-color: var(--store-surface);
  border-color: var(--store-rule);
}

html[data-store-theme]:not([data-store-theme="light"]) body :is(
  .table-head, .quote-modes, .quote-upload, .contact-quote-option,
  .contact-map-placeholder, .contact-map-current, .contact-location-choice-state, .branch-search, .branch-alternatives,
  .iv-head-mobile > summary:hover, .iv-head-mobile[open] > summary, .iv-head-nav > a:hover,
  .iv-head-actions > button:not(.iv-head-quote):hover, .iv-head-menu :is(a, button):hover,
  .iv-foot-file:hover, .iv-foot-strip, .visual-bottom > span, .workflow-list li,
  .iv-direction:is(:hover, :focus-within), .iv-featured-card:is(:hover, :focus-within),
  .catalog-directory__card:is(:hover, :focus-within), .category-card:not(.category-card-cta):hover,
  .live-product:hover, .product-row:hover, .range-apply:hover, .filter-chip:hover,
  .quantity-stepper-button:hover, .unit-option[data-active="true"], .unit-trigger:hover,
  .contact-topics input:checked + span, .contact-regions input:checked + span,
  .icon-button:hover, .button-outline:hover, .button-soft:hover, .facet-value:hover, .subcategory-links a:hover
) {
  color: var(--store-text);
  background-color: var(--store-raised);
  border-color: var(--store-rule);
}

html[data-store-theme]:not([data-store-theme="light"]) body :is(
  .iv-head-nav a, .iv-head-nav .iv-head-catalog, .iv-head-actions > button:not(.iv-head-quote),
  .iv-head-mobile > summary, .iv-head-menu :is(a, button), .visual-cross, .visual-footnote,
  .live-results-count strong, .catalog-selection__count, .live-product__name > a,
  .live-product__attrs dd, .live-pagination strong, .real-product__key dt,
  .quote-modes button, .quote-modes button[aria-selected="true"], .quote-dialog .quote-remove
) { color: var(--store-text); }

html[data-store-theme]:not([data-store-theme="light"]) body :is(
  .live-results-count, .live-product__standard, .live-product__attrs dt,
  .category-count, .category-card:not(.category-card-cta) .category-card-top,
  .live-product__image.is-empty span, .catalog-product-select > span,
  .quote-item-meta, .quote-intro, .quote-control-label, .quote-footer-summary > p,
  .real-specs dt, .real-specs p, .suggestion-copy small, .contact-location-choice-state
) { color: var(--store-muted); }

html[data-store-theme]:not([data-store-theme="light"]) body :is(
  .hero-visual, .product-art, .real-product__visual, .catalog-directory__media, .live-product__image,
  .iv-direction-art, .iv-service-visual, .iv-service-diagram, .iv-faq-heading,
  .quote-item, .live-loading, .quote-dialog .file-list > div, .quote-count:not(.has-items)
) {
  color: var(--store-text);
  background: var(--store-inset);
  border-color: var(--store-rule);
}

html[data-store-theme]:not([data-store-theme="light"]) body :is(
  .quote-upload, .quantity-stepper, .unit-trigger, .facet-value input, .range-apply, .filter-chip,
  input:is([type="email"], [type="number"], [type="tel"], [type="text"], [data-value-search]), textarea, select
) {
  color: var(--store-text);
  background-color: var(--store-inset);
  border-color: var(--store-border);
}

html[data-ivekma-design][data-store-theme]:not([data-store-theme="light"]) .iv-head-menu a[aria-current] {
  color: var(--store-accent);
  background: var(--store-raised);
}

html[data-ivekma-design][data-store-theme]:not([data-store-theme="light"]) img[data-ivekma-art] {
  mix-blend-mode: normal;
}

html[data-ivekma-design][data-store-theme]:not([data-store-theme="light"]) .live-product__image:has(img[data-ivekma-art]) {
  background: var(--store-raised);
}

html[data-store-theme]:not([data-store-theme="light"]) body .facet-value > small { color: var(--store-muted); }

html[data-store-theme]:not([data-store-theme="light"]) body .quote-add-more { color: var(--store-accent); }

html[data-store-theme]:not([data-store-theme="light"]) body .live-product__action [data-add-product] {
  color: var(--store-accent);
  background: var(--store-raised);
  border-color: var(--store-rule);
}
html[data-store-theme]:not([data-store-theme="light"]) body .live-product__action [data-add-product]:is(:hover, :focus-visible, .is-added) {
  color: var(--store-action-text);
  background: var(--store-action);
  border-color: var(--store-action);
}

html[data-store-theme]:not([data-store-theme="light"]) body :is(input, textarea)::placeholder { color: var(--store-muted); }

html[data-store-theme]:not([data-store-theme="light"]) body :is(
  .button-primary, .catalog-trigger, .search-submit, .catalog-navigation-mode--primary,
  .iv-head-actions > .iv-head-quote, .skip-link, .toast, .quote-count.has-items,
  .category-card-cta, .iv-featured-add
) {
  color: var(--store-action-text);
  background: var(--store-action);
  border-color: var(--store-action);
}

html[data-store-theme]:not([data-store-theme="light"]) body :is(
  .button-primary, .catalog-trigger, .search-submit, .catalog-navigation-mode--primary,
  .iv-head-actions > .iv-head-quote, .iv-featured-add
):is(:hover, :focus-visible) {
  color: var(--store-action-text);
  background: var(--store-action-hover);
  border-color: var(--store-action-hover);
}

html[data-store-theme]:not([data-store-theme="light"]) body :is(
  .category-card-cta p, .category-card-cta .category-card-top, .iv-head-quote [data-quote-count]
) { color: inherit; }
html[data-store-theme]:not([data-store-theme="light"]) body .iv-head-quote [data-quote-count] { background: #161d2826; }

html[data-store-theme]:not([data-store-theme="light"]) body :is(
  .facet-value[data-selected="true"], .live-product[data-selected="true"], .live-product[data-selected="true"]:hover,
  .search-option:is(:hover, [aria-selected="true"]), .quote-modes button[aria-selected="true"],
  .contact-location-card[data-selected="true"], .iv-faq-frame details[open] > summary
) { background-color: var(--store-raised); }

html[data-store-theme]:not([data-store-theme="light"]) body :is(
  .search-option mark, .facet-selection-count, [data-filter-badge]
) { background: var(--store-action); color: var(--store-action-text); }

html[data-store-theme]:not([data-store-theme="light"]) body :is(.live-error, .contact-error) {
  color: var(--store-danger);
  background: var(--store-email-fill);
}
html[data-store-theme]:not([data-store-theme="light"]) body .iv-head-email {
  color: var(--store-email);
  background-color: var(--store-email-fill);
  border-color: var(--store-email-border);
}
html[data-store-theme]:not([data-store-theme="light"]) body .iv-head-email:is(:hover, :focus-visible) {
  background-color: var(--store-email-hover);
  border-color: var(--store-email);
}

html[data-store-theme]:not([data-store-theme="light"]) :is(.iv-brand-type, .iv-brand-sign) { fill: var(--store-text); }
html[data-store-theme]:not([data-store-theme="light"]) :is(entega-logo, .brand-logo:is(img, :has(img))) {
  filter: brightness(0) invert(.93);
}

html[data-store-theme]:not([data-store-theme="light"]) .arc-controls {
  color-scheme: dark;
  --background: var(--store-inset);
  --surface: var(--store-surface);
  --surface-raised: var(--store-raised);
  --surface-muted: var(--store-inset);
  --foreground: var(--store-text);
  --text-secondary: var(--store-muted);
  --text-muted: var(--store-muted);
  --border: var(--store-rule);
  --border-subtle: var(--store-rule);
  --border-strong: var(--store-border);
  --accent: var(--store-action);
  --accent-strong: var(--store-action-hover);
  --accent-foreground: var(--store-action-text);
  --control-on: var(--store-action);
  --control-glyph: var(--store-action-text);
  --control-track: var(--store-border);
}

.site-prefs-changing *, .site-prefs-changing *::before, .site-prefs-changing *::after { transition: none !important; }

.site-prefs-toggle {
  display: inline-flex;
  min-block-size: 44px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 9px;
  border: 0;
  border-radius: 7px;
  color: var(--muted, #4b5563);
  background: transparent;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}
.site-prefs-toggle > svg { flex: none; }
.site-prefs-toggle:is(:hover, :focus-visible) { color: var(--blue, #26416b); background: var(--soft, #edf0f5); }

.site-prefs {
  box-sizing: border-box;
  inline-size: min(380px, calc(100vw - 28px));
  max-block-size: calc(100dvh - 28px);
  margin: auto;
  padding: 18px;
  overflow: auto;
  border: 1px solid var(--line, #dce1e5);
  border-radius: 14px;
  background: var(--surface, #fdfdfc);
  color: var(--text, #202731);
  box-shadow: 0 24px 70px #171b274a;
}
.site-prefs::backdrop { background: #131a2775; }
.site-prefs__header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.site-prefs__header h2 { margin: 0; font-size: 22px; font-weight: 720; line-height: 1.2; }
.site-prefs__close {
  display: grid;
  min-inline-size: 44px;
  min-block-size: 44px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--soft, #edf0f5);
  color: inherit;
}
.site-prefs__themes { display: grid; gap: 4px; min-inline-size: 0; margin: 0; padding: 0; border: 0; }
.site-prefs__themes legend { margin-bottom: 6px; padding: 0; color: var(--muted); font-size: 12px; font-weight: 650; }
.site-prefs__choice {
  display: flex;
  align-items: center;
  gap: 9px;
  min-block-size: 44px;
  padding: 5px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}
.site-prefs__choice:is(:hover, :has(:checked)) { border-color: var(--line); background: var(--soft); }
.site-prefs__choice input { flex: 0 0 auto; inline-size: 16px; block-size: 16px; margin: 0; accent-color: var(--blue); }
.site-prefs__swatch { display: grid; inline-size: 27px; block-size: 20px; border: 1px solid #838a95; border-radius: 4px; background: #f7f6f2; }
.site-prefs__swatch[data-site-swatch="graphite"] { background: #40464e; }
.site-prefs__swatch[data-site-swatch="dark"] { background: #202124; }
.site-prefs__traffic {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-block-size: 49px;
  margin-top: 12px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: inherit;
  text-align: left;
  font-size: 13px;
  font-weight: 680;
}
.site-prefs__traffic:is(:hover, [aria-pressed="true"]) { background: var(--soft); }
.site-prefs__traffic small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; font-weight: 500; }
.site-prefs__traffic-state { flex: 0 0 auto; color: var(--muted); font-size: 12px; }
.site-prefs__traffic[aria-pressed="true"] .site-prefs__traffic-state { color: var(--blue); }

@media (max-width: 479px) {
  .utility-bar .site-prefs-toggle { min-inline-size: 44px; padding-inline: 4px; }
  .utility-bar .site-prefs-toggle > span { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); }
}
