/* Slider */

$slider_size: $scalable_icon_size;
$slider_size: to_em(18px);; // Yaru change: larger slider cause to border in light theme

.slider {
  // Yaru: Use less invasive handle color on light theme
  color: if($variant == 'light', lighten($fg_color, 15%), darken($fg_color, 9%));

  // slider trough
  -barlevel-height: 4px;
  -barlevel-background-color: transparentize($fg_color, 0.9);
  // fill style
  -barlevel-active-background-color: -st-accent-color;
  // overfill style (red in this case)
  -barlevel-overdrive-color: $destructive_color;
  -barlevel-overdrive-separator-width:1px;
  // slider handler
  // -slider-handle-border-width: 0;
  // -slider-handle-border-color: transparent; // because 0 width
  -slider-handle-border-width: 1px; // Yaru change: add border
  -slider-handle-border-color: if($variant=='light', darken($alt_borders_color, 3%), transparent); // because 0 width - Yaru change: the handle border needs to be darker for the light theme
  -slider-handle-radius: $slider_size * 0.5; // half the size of the size

  height: $slider_size + to_em(2px); // Yaru change: increase height due to border

  // hc style
  @if $contrast == 'high' {
    -barlevel-background-color: transparentize($fg_color, 0.6);
  }

  &:hover {
    color: if($variant == 'light', lighten($fg_color, 7%), $fg_color);
  }
}
