@import "../styles/base/fn.wxss";

.@{wuxClassNamePrefix}-slider {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;

	&__rail {
		width: 100%;
		height: 4px;
		margin: 15px 0;
		background-color: #e9e9e9;
		border-radius: 4px;
		vertical-align: middle;
		position: relative;
	}

	&__track {
		position: absolute;
		left: 0;
		height: 4px;
		border-radius: 4px;
		background-color: @balanced;
	}

	&__handle {
		background-color: #fff;
		border-radius: 50%;
		height: 28px;
		left: 0;
		top: 50%;
		position: absolute;
		width: 28px;
		box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
		transform: translate3d(-50%, -50%, 0);
        transition: transform .2s;

        &:after {
            content: attr(data-meta);
            color: #fff;
            position: absolute;
            pointer-events: none;
            display: none;
            opacity: 0;
            visibility: hidden;
            z-index: 15;
            font-size: 14px;
            line-height: 1.25;
            padding: 4px 8px;
            border-radius: 4px;
            background-color: rgba(0, 0, 0, .7);
            white-space: nowrap;
            text-align: center;
            left: 50%;
            bottom: 100%;
            margin-bottom: 10px;
            transform: translateX(-50%);
        }

		&--last {
			z-index: 2;
		}

        &--is-touched {
            transform: translate3d(-50%, -50%, 0) scale(1.3);
        }
	}

    &--has-tip &__handle--is-touched:after {
        display: block;
        opacity: 1;
        visibility: visible;
    }

	&__mark {
		position: absolute;
	    width: 4px;
	    height: 4px;
	    border-radius: 50%;
	    background-color: #ccc;
	    transform: translateX(-50%);
	}

	&__min,
	&__max {
		font-size: 14px;
		color: #888;
	}

	&__min {
		margin-right: 12px;
	}

	&__max {
		margin-left: 12px;
	}

	&--disabled {
		opacity: .3;
	}
}
