.bar {
    background-color: var(--theme-colors-foreground);
    transition: background-color 0.2s ease-in-out;
}

.label {
    max-width: 200px;
    padding: var(--theme-spacing-sm) var(--theme-spacing-md);
    font-size: var(--theme-font-size-md);
    font-weight: 550;
    color: var(--theme-colors-surface-foreground);
    background: var(--theme-colors-surface);
    box-shadow: 4px 4px 10px 0 rgb(0 0 0 / 20%);
}

.root {
    width: 100%;

    &:hover {
        .bar {
            background-color: var(--theme-colors-primary-filled);
        }

        .thumb {
            opacity: 1;
        }
    }

    &:focus {
        .bar {
            background-color: var(--theme-colors-primary-filled);
        }

        .thumb {
            opacity: 1;
        }
    }
}

.thumb {
    width: 1rem;
    height: 1rem;
    border-color: var(--theme-colors-primary-filled);
    border-width: 1px;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.slider-container {
    --slider-value-width: 4.75rem;
    --slider-value-gap: var(--theme-spacing-sm);

    display: grid;
    grid-template-columns: var(--slider-value-width) minmax(0, 1fr) var(--slider-value-width);
    gap: var(--slider-value-gap);
    align-items: center;
    width: 95%;
    height: 20px;
}

.slider-value-wrapper {
    min-width: 0;
    min-height: 0;

    &:first-child {
        justify-self: end;
    }

    &:last-child {
        justify-self: start;
    }

    @media (width < 768px) {
        display: none;
    }
}

@media (width < 768px) {
    .slider-container {
        grid-template-columns: minmax(0, 1fr);
    }
}

.slider-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    height: 100%;
}
