.root {
	display: block;
	composes: mdc-slider from '@material/slider/dist/mdc.slider.css';
}

.inputWrapper {
	margin: var(--mdc-theme-grid-base) 0;
	position: relative;
}

.track {
	position: relative;
	composes: mdc-slider__track-container from '@material/slider/dist/mdc.slider.css';
}

.root .track {
	overflow: visible;
}

.fill {
	composes: mdc-slider__track from '@material/slider/dist/mdc.slider.css';
}

.thumb {
	background-color: var(--mdc-theme-secondary);
	border-radius: 50%;
	height: 16px;
	margin-left: -7px;
	position: absolute;
	top: -7px;
	transition: transform 0.1s ease-out;
	width: 16px;
	transform: scale(0.571);
	will-change: transform;
}

.root .input {
	height: 16px;
	outline: none;
	top: -7px;
}
.input::-ms-thumb {
	height: 16px;
	width: 16px;
}
.input::-moz-range-thumb {
	height: 16px;
	width: 16px;
}
.input::-webkit-slider-thumb {
	height: 16px;
	width: 16px;
}

/* focused styles */
.input:active ~ .track .thumb {
	transform: scale(1);
}

.thumb:before {
	content: '';
	width: 32px;
	height: 32px;
	border-radius: 50%;
	opacity: 0.25;
	background-color: var(--mdc-theme-secondary);
	transition: transform 0.1s ease-out;
	transform: scale(0.571);
	will-change: transform;
	display: block;
	top: -8px;
	position: relative;
	left: -8px;
}

.input:focus ~ .track .thumb:before {
	transform: scale(1);
}

.input:focus:active ~ .track .thumb:before {
	transform: scale(1);
}

.input:focus ~ .outputTooltip,
.root:hover .outputTooltip {
	opacity: 1;
	pointer-events: auto;
	z-index: 1;
}

.output {
	background-color: var(--mdc-theme-background);
	color: var(--mdc-text-color);
	display: inline-block;
	margin: var(--mdc-theme-grid-base) 0 0;
	padding: var(--mdc-theme-grid-base);
}

.outputTooltip {
	margin: 0;
	opacity: 0;
	pointer-events: none;
	position: absolute;
	top: calc(var(--grid-base) * 2.5);
	transform: translate(-50%, 0);
	transition: opacity var(--transition-duration) var(--transition-easing);
	background-color: var(--mdc-raised-surface-background);
	border-radius: var(--mdc-theme-border-radius);
}

.outputTooltip::before {
	border-left: var(--grid-base) solid transparent;
	border-right: var(--grid-base) solid transparent;
	border-bottom: var(--grid-base) solid var(--color-background-inverted);
	content: '';
	left: 50%;
	margin-left: calc(var(--grid-base) * -1);
	margin-top: calc(var(--grid-base) * -1);
	position: absolute;
	top: 0;
}

.vertical .outputTooltip {
	left: calc(var(--grid-base) * 2.5);
	top: auto;
	transform: translate(0, -50%);
}

.vertical .outputTooltip::before {
	border-bottom: var(--grid-base) solid transparent;
	border-left: 0;
	border-right: var(--grid-base) solid var(--color-background-inverted);
	border-top: var(--grid-base) solid transparent;
	left: 0;
	top: 50%;
}

/* vertical slider */
.vertical .input,
.vertical .track {
	transform-origin: 0 0;
	transform: rotate(-90deg) translate(-100%, 0);
}

/* disabled and readonly styles */
.disabled .track,
.readonly .track {
	background-color: var(--mdc-border-color);
}

.disabled .thumb,
.readonly .thumb {
	background-color: var(--mdc-border-color);
}

/* invalid style */
.invalid .track {
	background-color: var(--mdc-theme-error);
}
.invalid .thumb {
	border-color: var(--mdc-theme-error);
}

/* valid style */
.valid .track {
	background-color: var(--mdc-theme-success);
}
.valid .thumb {
	border-color: var(--mdc-theme-success);
}
