.slider {
    position: relative;
    display: flex;
    width: 200px;
    align-items: center;
    padding: 0.5rem 0;
    touch-action: none;
}

.slider[data-orientation="vertical"] {
    width: auto;
    height: 200px;
    flex-direction: column;
}

.slider-track {
    position: relative;
    height: 0.5rem;
    box-sizing: border-box;
    flex-grow: 1;
    border-radius: 9999px;
    background: var(--primary-color-5);
}

.slider[data-orientation="vertical"] .slider-track {
    width: 4px;
    height: 100%;
}

.slider-range {
    position: absolute;
    height: 100%;
    border-radius: 9999px;
    background-color: var(--secondary-color-2);
}

.slider[data-orientation="vertical"] .slider-range {
    width: 100%;
}

.slider-thumb {
    all: unset;
    position: absolute;
    top: 50%;
    display: block;
    width: 16px;
    height: 16px;
    border: 1px solid var(--secondary-color-2);
    border-radius: 50%;
    background-color: var(--primary-color-1);
    cursor: pointer;
    transform: translate(-50%, -50%);
    transition: border-color 150ms;
}

.slider[data-orientation="vertical"] .slider-thumb {
    left: 50%;
    transform: translate(-50%, 50%);
}

.slider-thumb:focus-visible[data-dragging="true"],
.slider-thumb:focus-visible,
.slider-thumb:hover {
    box-shadow: 0 0 0 4px
        color-mix(in oklab, var(--primary-color-7) 50%, transparent);
    transition: box-shadow 150ms;
}

.slider[data-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.5;
}

.slider[data-disabled="true"] .slider-thumb {
    cursor: not-allowed;
}
