/* Keep the default light canvas; lift the optional dark theme to soft graphite. */
html[data-theme="dark"] {
  --dh-page: #33383c;
  --dh-card: #41474c;
  --dh-text: #f3f4f5;
  --dh-muted: #ced3d6;
  --dh-border: #626b71;
  --dh-catalog-panel: #3b4146;
  --dh-catalog-link: #ffd0a4;
  --dh-catalog-hover: #514539;
  --dh-catalog-input-border: #a2adb4;
  --dh-catalog-secondary: #ced3d6;
}
.dh-panel-header, .dh-panel-header .dh-panel-main { background: #454b50; }
.dh-panel-header .dh-panel-utility { background: #3b4146; color: #e4e7e9; }
.dh-panel-header .dh-panel-search { background: #343b40; border-color: #89949c; border-radius: 8px; }
.dh-panel-header .dh-panel-search input::placeholder { color: #d4dadd; }
.dh-panel-header .dh-contact-social > :is(a, button) { background: #394045; border-color: #939da3; }
.dh-panel-header + .menuContainerColor { background: #282e33 !important; background-image: none !important; }
.dh-panel-header .dh-mobile-sections > summary { background: #30373c; border-color: #89949c; }
.dh-panel-header .dh-mobile-categories > a { background: #454c52; border-color: #7e898f; }
html[data-theme="dark"] #footer { background: #393f44; }
html[data-theme="dark"] #catalogElement #elementProperties .detailPropertiesTable tr:nth-child(odd) td {
  background-color: #383f44 !important;
}
html[data-theme="dark"] #catalogElement :is(.deliveries-tab-item.selected .deliveries-tab-switcher) {
  background-color: #594535 !important;
}

/* A conventional moving-thumb switch, shared by desktop and mobile. */
.dh-panel-header .dh-mobile-theme-toggle {
  position: relative;
  flex: 0 0 60px;
  width: 60px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: transparent;
}
.dh-panel-header .dh-mobile-theme-toggle::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 6px;
  width: 56px;
  height: 32px;
  border-radius: 16px;
  background: #858f94;
  transition: background-color .2s ease;
}
.dh-panel-header .dh-mobile-theme-toggle .dh-theme-thumb {
  z-index: 1;
  left: 5px;
  top: 50%;
  width: 26px;
  height: 26px;
  margin-top: -13px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 5px #0004;
  transform: translateX(0);
}
.dh-panel-header .dh-mobile-theme-toggle[aria-pressed="true"]::before { background: #efa244; }
.dh-panel-header .dh-mobile-theme-toggle[aria-pressed="true"] .dh-theme-thumb { background: #fff; transform: translateX(24px); }
.dh-panel-header .dh-mobile-theme-toggle svg {
  position: absolute;
  z-index: 2;
  top: 14px;
  display: block;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}
.dh-panel-header .dh-mobile-theme-toggle .dh-theme-sun { left: 10px; }
.dh-panel-header .dh-mobile-theme-toggle .dh-theme-moon { right: 10px; }
.dh-panel-header .dh-mobile-theme-toggle[aria-pressed="false"] .dh-theme-sun,
.dh-panel-header .dh-mobile-theme-toggle[aria-pressed="true"] .dh-theme-moon { color: #263036; }
.dh-panel-header .dh-mobile-theme-toggle[aria-pressed="true"] .dh-theme-sun,
.dh-panel-header .dh-mobile-theme-toggle[aria-pressed="false"] .dh-theme-moon { color: #263036; }

/* Retain the existing range-slider math and hitboxes; replace only its raster skin. */
#smartFilter .slider {
  background: none;
  height: 44px;
  margin-top: 16px;
}
#smartFilter .rangeSlider .slider {
  flex: 0 0 calc(100% - 34px);
  width: calc(100% - 34px);
  max-width: none;
  margin-inline: 17px;
}
#smartFilter .slider .handler {
  top: 19px;
  height: 6px;
  border-radius: 3px;
  background: #c36a08;
}
html[data-theme="dark"] #smartFilter .slider .handler { background: #ffad60; }
#smartFilter .slider :is(.blackoutLeft, .blackoutRight) {
  height: 6px;
  border-radius: 3px;
  background: #7c888f;
}
html[data-theme="dark"] #smartFilter .slider :is(.blackoutLeft, .blackoutRight) { background: #9ba5ac; }
#smartFilter .slider ins {
  top: -14px;
  width: 34px;
  height: 34px;
  background: none;
  border: 0;
  border-radius: 50%;
}
#smartFilter .slider ins::before {
  content: "";
  position: absolute;
  inset: 3px;
  box-sizing: border-box;
  border: 1px solid #7c878e;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px #0003;
}
#smartFilter .slider .left { right: -17px; }
#smartFilter .slider .right { left: -17px; }
#smartFilter .slider ins:hover::before { box-shadow: 0 3px 7px #0005; }
@media (prefers-reduced-motion: reduce) {
  .dh-panel-header .dh-mobile-theme-toggle::before { transition: none; }
}
