/*
  Slider (Multirange) — Restyled
  Deque University ARIA Component

  This component has been adapted from an example provided by the W3C,
  in accordance with the W3C Software and Document License
  https://www.w3.org/copyright/software-license-2023/
*/

:root {
  --dqu-interactive: #2e5f7a;
  --dqu-interactive-light: rgba(46, 95, 122, 0.08);
  --dqu-bg-primary: #fcfaf8;
  --dqu-bg-secondary: #f6f3ed;
  --dqu-border-secondary: #8c827d;
  --dqu-text-primary: #21201e;
  --dqu-font-family: "Noto Sans", sans-serif;
}

.slider-seek .label {
  font-weight: 600;
  font-size: 125%;
  font-family: var(--dqu-font-family);
}

.slider-seek svg {
  forced-color-adjust: auto;
}

.slider-seek text {
  font-weight: 600;
  fill: var(--dqu-text-primary);
  font-family: var(--dqu-font-family);
}

.slider-seek {
  margin-top: 1em;
  padding: 6px;
  color: var(--dqu-text-primary);
}

.slider-slider .value {
  position: relative;
  top: 20px;
  height: 1.5em;
  font-size: 80%;
}

.slider-seek .temp-value {
  padding-left: 24px;
  font-size: 200%;
  font-family: var(--dqu-font-family);
}

.slider-seek .rail {
  stroke: var(--dqu-border-secondary);
  stroke-width: 2px;
  fill: var(--dqu-bg-secondary);
  fill-opacity: 0.5;
}

.slider-seek .thumb {
  stroke-width: 0;
  fill: var(--dqu-interactive);
}

.slider-seek .focus-ring {
  stroke: currentcolor;
  stroke-opacity: 0;
  fill-opacity: 0;
  stroke-width: 3px;
  display: none;
}

.slider-seek .slider-group {
  touch-action: pan-y;
}

.slider-seek .slider-group .value {
  display: none;
}

/* Focus and hover styling */
.slider-seek.focus [role="slider"],
.slider-seek [role="slider"] {
  color: var(--dqu-interactive);
}

.slider-seek [role="slider"]:focus {
  outline: none !important;
}

.slider-seek [role="slider"]:focus .focus-ring {
  display: block;
  stroke-opacity: 1;
}

.slider-seek [role="slider"]:focus .value {
  display: block;
}

/* Native HTML range input */
input[type="range"].deque-slider-widget {
  accent-color: var(--dqu-interactive);
  cursor: pointer;
}

input[type="range"].deque-slider-widget:focus-visible {
  outline: 3px solid var(--dqu-interactive) !important;
  outline-offset: 4px;
}

/* Data table */
table.data {
  border-collapse: collapse;
  font-family: var(--dqu-font-family);
  font-size: 0.9375rem;
}

table.data th,
table.data td {
  border: 1px solid var(--dqu-border-secondary);
  padding: 10px 12px;
  text-align: left;
  color: var(--dqu-text-primary);
}

table.data th {
  background: var(--dqu-bg-secondary);
  font-weight: 600;
}

.dqu-example h2, .dqu-example h3 {
  font-family: var(--dqu-font-family);
  color: var(--dqu-text-primary);
}

.dqu-example label {
  font-family: var(--dqu-font-family);
  color: var(--dqu-text-primary);
}
