/*
 * SPDX-FileCopyrightText: 2023 Siemens AG
 *
 * SPDX-License-Identifier: MIT
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
/*
* SPDX-FileCopyrightText: 2024 Siemens AG
*
* SPDX-License-Identifier: MIT
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/*
* SPDX-FileCopyrightText: 2024 Siemens AG
*
* SPDX-License-Identifier: MIT
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
:host {
  display: flex;
  flex-direction: column;
  min-height: 2rem;
  justify-content: center;
  --thumb-size: 1rem;
  --value: 0;
  --trace-start: 0;
  --trace-end: 0;
  --trace-reference: 0;
  --trace-reference-color: var(--theme-slider-track-marker--background);
  --trace-color: var(--theme-slider-trace--background);
  --tick-color: var(--theme-slider-track-marker--background);
  --tick-color--active: var(--theme-slider-trace-marker--background);
  --track-color: var(--theme-slider-track--background);
}
:host *,
:host *::after,
:host *::before {
  box-sizing: border-box;
}
:host ::-webkit-scrollbar-button {
  display: none;
}
@-moz-document url-prefix() {
  :host * {
    scrollbar-color: var(--theme-scrollbar-thumb--background) var(--theme-scrollbar-track--background);
    scrollbar-width: thin;
  }
}
:host {
  /* width */
}
:host ::-webkit-scrollbar {
  width: 0.5rem;
  height: 0.5rem;
}
:host {
  /* Track */
}
:host ::-webkit-scrollbar-track {
  border-radius: 5px;
  background: var(--theme-scrollbar-track--background);
}
:host ::-webkit-scrollbar-track:hover {
  background: var(--theme-scrollbar-track--background--hover);
}
:host {
  /* Handle */
}
:host ::-webkit-scrollbar-thumb {
  border-radius: 5px;
  background: var(--theme-scrollbar-thumb--background);
}
:host {
  /* Handle on hover */
}
:host ::-webkit-scrollbar-thumb:hover {
  background: var(--theme-scrollbar-thumb--background--hover);
}
:host ::-webkit-scrollbar-corner {
  display: none;
}
:host input[type=range] {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 0;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  background: transparent;
  cursor: pointer;
  width: 100%;
  height: 1.5rem;
  margin: 0;
}
:host input[type=range].trace::before {
  content: "";
  position: absolute;
  display: block;
  z-index: -1;
  width: calc((var(--trace-end) - var(--trace-start)) * 100%);
  left: calc(var(--trace-start) * 100%);
  height: 4px;
  background-color: var(--trace-color);
  top: 50%;
  transform: translateY(-50%);
  border-radius: clamp(0rem, (0.01 - var(--trace-start)) * 999rem, 0.125rem) clamp(0rem, (var(--trace-end) - 0.99) * 999rem, 0.125rem) clamp(0rem, (var(--trace-end) - 0.99) * 999rem, 0.125rem) clamp(0rem, (0.01 - var(--trace-start)) * 999rem, 0.125rem);
}
:host .slider-container {
  width: 100%;
}
:host .slider-container .slider {
  width: 100%;
}
:host .slider-container .slider input[type=range] {
  width: 100%;
}
:host input[type=range].trace:not(.hide-trace-reference)::after {
  content: "";
  position: absolute;
  display: block;
  width: 2px;
  height: 16px;
  background-color: var(--trace-reference-color);
  top: 50%;
  transform: translateY(-50%);
  left: calc(100% * var(--trace-reference));
}
:host input[type=range]::-webkit-slider-runnable-track {
  background: transparent;
  height: 0.25rem;
}
:host input[type=range]::-moz-range-track {
  background: transparent;
  height: 0.25rem;
}
:host input[type=range i]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  margin-top: -6px;
}
:host input[type=range i]::-moz-range-thumb {
  border: none;
  border-radius: 0;
}
:host input[type=range]::-webkit-slider-thumb {
  border-radius: 50%;
  background-color: var(--theme-slider-thumb--background);
  height: var(--thumb-size);
  width: var(--thumb-size);
  -webkit-transition: all var(--theme-default-time) ease-in-out;
  transition: all var(--theme-default-time) ease-in-out;
  z-index: 10;
}
:host input[type=range]::-moz-range-thumb {
  border-radius: 50%;
  background-color: var(--theme-slider-thumb--background);
  height: var(--thumb-size);
  width: var(--thumb-size);
  -moz-transition: all var(--theme-default-time) ease-in-out;
  transition: all var(--theme-default-time) ease-in-out;
  z-index: 10;
}
:host input[type=range]:hover::-webkit-slider-thumb {
  background-color: var(--theme-slider-thumb--background--hover);
}
:host input[type=range]:hover::-moz-range-thumb {
  background-color: var(--theme-slider-thumb--background--hover);
}
:host input[type=range]:active::-webkit-slider-thumb {
  background-color: var(--theme-slider-thumb--background--active);
}
:host input[type=range]:active::-moz-range-thumb {
  background-color: var(--theme-slider-thumb--background--active);
}
:host input[type=range]:focus {
  outline: none;
}
:host input[type=range]:focus-visible::-webkit-slider-thumb {
  outline: 1px solid var(--theme-color-focus-bdr);
  outline-offset: 0.125rem;
}
:host input[type=range]:focus-visible::-moz-range-thumb {
  outline: 1px solid var(--theme-color-focus-bdr);
  outline-offset: 0.125rem;
}
:host {
  /* style datalist */
}
:host .ticks {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
:host .ticks circle.tick {
  --tick-size: 6px;
  --tick-radius: calc(var(--tick-size) / 2);
  r: var(--tick-radius);
  fill: var(--tick-color);
  transform: translate(calc(var(--tick-value) * (100% - var(--thumb-size)) + var(--thumb-size) / 2), 50%);
}
:host .ticks .tick.tick-at-min {
  transform: translate(var(--tick-radius), 50%);
}
:host .ticks .tick.tick-at-max {
  transform: translate(calc(100% - var(--tick-radius)), 50%);
}
:host .ticks .tick.tick-active {
  fill: var(--tick-color--active);
}
:host .slider {
  position: relative;
  display: block;
  width: 100%;
  height: 1.5rem;
}
:host .track {
  position: absolute;
  background-color: var(--track-color);
  height: 4px;
  width: 100%;
  top: 50%;
  transform: translateY(-50%);
  left: 0px;
  border-radius: 2px;
}
:host .thumb {
  display: block;
  position: absolute;
  background-color: transparent;
  height: 1rem;
  width: 1rem;
  border-radius: 100px;
  top: 50%;
  transform: translateY(-50%);
}
:host .hide-tooltip {
  display: none;
}
:host .label {
  display: flex;
  position: relative;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 0.5rem;
  min-height: 0px;
}

:host(.error),
:host(.invalid) {
  --trace-color: var(--theme-slider-trace--background--invalid);
  --tick-color--active: var(--theme-slider-trace-marker--background--invalid);
}
:host(.error) input[type=range]::-webkit-slider-thumb,
:host(.invalid) input[type=range]::-webkit-slider-thumb {
  background-color: var(--theme-slider-thumb--background--invalid);
}
:host(.error) input[type=range]::-moz-range-thumb,
:host(.invalid) input[type=range]::-moz-range-thumb {
  background-color: var(--theme-slider-thumb--background--invalid);
}
:host(.error) input[type=range]:hover::-webkit-slider-thumb,
:host(.invalid) input[type=range]:hover::-webkit-slider-thumb {
  background-color: var(--theme-slider-thumb--background--invalid--hover);
}
:host(.error) input[type=range]:hover::-moz-range-thumb,
:host(.invalid) input[type=range]:hover::-moz-range-thumb {
  background-color: var(--theme-slider-thumb--background--invalid--hover);
}
:host(.error) input[type=range]:active::-webkit-slider-thumb,
:host(.invalid) input[type=range]:active::-webkit-slider-thumb {
  background-color: var(--theme-slider-thumb--background--invalid--active);
}
:host(.error) input[type=range]:active::-moz-range-thumb,
:host(.invalid) input[type=range]:active::-moz-range-thumb {
  background-color: var(--theme-slider-thumb--background--invalid--active);
}

:host(.disabled) {
  pointer-events: none;
  --track-color: var(--theme-slider-track--background--disabled);
  --trace-color: var(--theme-slider-trace--background--disabled);
  --tick-color: var(--theme-slider-track-marker--background--disabled);
  --tick-color--active: var(--theme-slider-trace-marker--background--disabled);
}
:host(.disabled) input[type=range]::-webkit-slider-thumb {
  background-color: var(--theme-slider-thumb--background--disabled);
}
:host(.disabled) input[type=range]::-moz-range-thumb {
  background-color: var(--theme-slider-thumb--background--disabled);
}

:host(.warning) {
  --trace-color: var(--theme-color-warning-40);
  --tick-color--active: var(--theme-color-warning);
}
:host(.warning) input[type=range]::-webkit-slider-thumb {
  background-color: var(--theme-color-warning);
}
:host(.warning) input[type=range]::-moz-range-thumb {
  background-color: var(--theme-color-warning);
}

:host(.info) {
  --trace-color: var(--theme-color-info-40);
  --tick-color--active: var(--theme-color-info);
}
:host(.info) input[type=range]::-webkit-slider-thumb {
  background-color: var(--theme-color-info);
}
:host(.info) input[type=range]::-moz-range-thumb {
  background-color: var(--theme-color-info);
}

:host(.valid) {
  --trace-color: var(--theme-color-success-40);
  --tick-color--active: var(--theme-color-success);
}
:host(.valid) input[type=range]::-webkit-slider-thumb {
  background-color: var(--theme-color-success);
}
:host(.valid) input[type=range]::-moz-range-thumb {
  background-color: var(--theme-color-success);
}