// ============================================================================
// :: Slider
// ============================================================================
.m-slider {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

// ============================================================================
// :: Elements
// ============================================================================
.m-slider__image-container {
	position: relative;

	display: flex;
	justify-content: center;
	align-items: center;
	width: 100vw;
	height: 50rem;
	max-height: 50rem;
}

.m-slider__image {
	position: absolute;

	display: block;
	max-width: 100%;

	opacity: 0;

	transition: opacity 0.3s ease-in-out;
}

.m-slider__range {
	width: 100%;
}

.m-slider__container {
	position: relative;

	width: 100%;
	height: 4.4rem;
}

.m-slider__input {
	position: relative;

	width: 100%;
	height: 100%;

	background: $background-color-grey-extra-light;
	border-radius: 2.2rem;
	-webkit-appearance: none;

	&::-webkit-slider-thumb {

		width: 4.5rem;
		height: 4.5rem;

		border-radius: $border-radius-round;

		background-color: $background-color-white;
		-webkit-appearance: none;

		cursor: pointer;
	}

	&:focus:not(.focus-visible):not(:hover) {
		@include outline();
	}
}

.m-slider__inner {
	position: absolute;
	top: 50%;
	left: 50%;

	width: calc(100% - 2 * 2.4rem);
	height: 1rem;

	overflow: hidden;

	border-radius: 0.5rem;
	background-color: $background-color-grey-light;

	transform: translateX(-50%) translateY(-50%) scale(1);

	pointer-events: none;
}

.m-slider__active {
	position: absolute;
	top: 0;
	left: 0;

	width: 100%;
	height: 100%;

	background: $gradient-primary;

	transform: translateX(-100%);
}

.m-slider__icon {
	position: absolute;
	top: 0;
	left: 0;

	display: block;
	width: 4.5rem;
	height: 4.5rem;

	background-color: $background-color-white;
	box-shadow: $box-shadow;
	border-radius: $border-radius-round;

	pointer-events: none;

	&::before {
		position: absolute;
		top: 50%;
		left: 50%;

		font-size: $font-size-2x-large;

		color: $text-color-primary;

		transform: translateX(-50%) translateY(-50%);
	}
}

.m-slider__value {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	margin-top: 4rem;

	font-family: $font-family-beausans;
	text-align: center;

	color: $text-color-primary;
}

.m-slider__number {
	font-weight: $font-weight-bold;
	font-size: $font-size-4x-large;
}

.m-slider__unit {
	font-size: $font-size-2x-large;
}

// ============================================================================
// :: States
// ============================================================================
.m-slider__image {

	&.is-active {
		opacity: 1;
	}
}
