/*
 * Bootstrap slider
 */

.slider {
	display: inline-block;
	vertical-align: middle;
	position: relative;
	margin-top: 0;
	margin-bottom: 30px;

	&.slider-horizontal {
		width: 100%!important;
		height: 20px;

		.slider-track {
			height: 10px;
			width: 100%;
			margin-top: -5px;
			top: 50%;
			left: 0;
		}

		.slider-selection {
			height: 100%;
			top: 0;
			bottom: 0;

			&+.slider-handle.triangle+.slider-handle.triangle:before {
				content: "\f0d9";
			}
		}

		.slider-handle {
			margin-left: -10px;
			margin-top: -5px;

			&.triangle {
				width: 20px;
				height: 20px;
				filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1);
				-webkit-transform: rotate(0deg);
				-ms-transform: rotate(0deg);
				transform: rotate(0deg);
				border: 0;
				line-height: 21px;
				color: #797777;
				text-shadow: 0 1px 0 rgba(255, 255, 255, .8);

				&:before {
					content: "\f0da";
					font-size: 34px;
				}
			}
		}
	}

	&.slider-vertical {
		margin-bottom: 0;
		margin-right: 5px;
		height: 210px;
		width: 20px;

		.slider-track {
			width: 10px;
			height: 100%;
			margin-left: -5px;
			left: 50%;
			top: 0;
		}

		.slider-selection {
			width: 100%;
			left: 0;
			top: 0;
			bottom: 0;

			&+.slider-handle.triangle+.slider-handle.triangle:before {
				content: "\f0d8";
				text-shadow: 0 -1px 0 rgba(255, 255, 255, .8);
			}
		}

		.slider-handle {
			margin-left: -5px;
			margin-top: -10px;

			&.triangle {
				width: 20px;
				height: 20px;
				filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1);
				-webkit-transform: rotate(0deg);
				-ms-transform: rotate(0deg);
				transform: rotate(0deg);
				border: 0;
				line-height: 21px;
				color: #797777;
				text-shadow: 0 -1px 0 rgba(255, 255, 255, .8);

				&:before {
					content: "\f0d7";
					font-size: 32px;
					text-shadow: 0 1px 0 rgba(255, 255, 255, .8);
				}
			}
		}
	}

	input {
		display: none;
	}

	.tooltip-inner {
		white-space: nowrap;
	}
}

.slider-track {
	position: absolute;
	cursor: pointer;
	background: #E5E5E5;

	.slider-danger + & >.slider-selection {
		background: #a90329;
	}

	.slider-warning+ & >.slider-selection {
		background: #c79121;
	}

	.slider-info+ & >.slider-selection {
		background: #57889c;
	}

	.slider-success+ & >.slider-selection {
		background: #739e73;
	}
}

.slider-selection {
	position: absolute;
	background: #3276b1;
}

.slider-handle {
	position: absolute;
	width: 20px;
	height: 20px;
	border: 1px solid #FFF;
	background: #858585;
	display: inline-block;
	font-family: FontAwesome;
	font-style: normal;
	font-weight: 400;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-align: center;
	line-height: 18px;
	font-size: 10px;
	color: #ccc;
	text-shadow: 0 1px 0 rgba(77, 77, 77, .5);
	filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1);
	-webkit-transform: rotate(90deg);
	-ms-transform: rotate(90deg);
	transform: rotate(90deg);

	&:before {
		content: "\f0c9";
	}

	&.round {
		border-radius: 20px;
		width: 20px;
		height: 20px;
	}
	&.triangle {
		background: transparent none;
	}
}


/*
 * fd-slider widget
 */

.fd-form-element-hidden {
	display: none;
}

.fd-slider {
	width: 100%;
	height: 20px;
	margin: 0;
}

.fd-slider-vertical {
	width: 20px;
	height: 100%;
	margin: 0 10px 10px 0;
}

.fd-slider,
.fd-slider-vertical {
	display: block;
	position: relative;
	text-decoration: none;
	border: 0 none;
	-moz-user-select: none;
	-khtml-user-select: none;
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

.fd-slider-inner {
	display: none;
}

.fd-slider-bar {
	position: absolute;
	display: block;
	z-index: 2;
	height: 6px;
	width: 100%;
	border: 1px solid #bbb;
	border-bottom: 1px solid #fff;
	border-right: 1px solid #fff;
	margin: 0;
	padding: 0;
	overflow: hidden;
	line-height: 4px;
	top: 8px;
	border-radius: 4px;
	-webkit-background-clip: padding-box;
	background-clip: padding-box;
	background-color: #333;
}

.fd-slider-range {
	position: absolute;
	display: block;
	z-index: 3;
	height: 6px;
	margin: 0;
	padding: 0 2px 0 0;
	overflow: hidden;
	top: 9px;
	border-radius: 2px;
	-webkit-background-clip: padding-box;
	background-clip: padding-box;
	background-color: #eee;
}

.fd-slider-handle {
	position: absolute;
	display: block;
	padding: 0;
	margin: 0 0 0 1px;
	z-index: 3;
	top: 5px;
	left: 0;
	width: 12px;
	height: 12px;
	line-height: 1px!important;
	outline: 0 none;
	background: #eee;
	border: 1px solid #aaa;
	border-radius: 12px;
	-webkit-user-select: none;
	-webkit-touch-callout: none;
	-moz-user-select: none;
	-moz-user-focus: none;
	-moz-outline: 0 none;
	-ms-user-select: none;
	user-select: none;

	&:focus {
		outline: 0 none;
		border: 0 none;
		-moz-user-focus: normal;
	}

	&:before,
	&:after {
		opacity: 0;
		-webkit-transition-property: opacity;
		-webkit-transition-duration: 1s;
		-webkit-transition-delay: 1s;
		transition-property: opacity;
		transition-duration: 1s;
		transition-delay: 1s;
	}

	button&:focus::-moz-focus-inner {
		border-color: transparent;
	}

	.oldie &:after,
	.oldie &:before {
		display: none;
	}
}

body.fd-slider-drag-horizontal,
body.fd-slider-drag-horizontal *,
body.fd-slider-drag-vertical,
body.fd-slider-drag-vertical * {
	-moz-user-select: none;
	-webkit-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

.fd-slider-active,
.fd-slider-focused,
.fd-slider-hover {
	.fd-slider-handle {
		:before {
			display: block;
			position: absolute;
			top: -21px;
			left: -8px;
			margin: 0;
			width: 20px;
			padding: 3px;
			height: 14px;
			line-height: 12px;
			text-align: center;
			font-size: 10px;
			font-weight: 700;
			color: #fff;
			text-shadow: 1px 1px 1px #1a3a95;
			background: #2f6ee0;
			z-index: 1;
			content: attr(aria-valuetext);
			border-radius: 3px;
			-webkit-background-clip: padding-box;
			background-clip: padding-box;
			-webkit-box-shadow: 0 0 4px #aaa;
			box-shadow: 0 0 4px #999;
			opacity: 1;
		}

		&:after {
			outline: 0;
			content: "";
			display: block;
			position: absolute;
			top: -9px;
			left: 50%;
			margin: 0 0 0 -5px;
			background: #2f6ee0;
			z-index: 2;
			width: 10px;
			height: 10px;
			overflow: hidden;
			-webkit-transform: rotate(45deg);
			-moz-transform: rotate(45deg);
			-o-transform: rotate(45deg);
			-webkit-box-shadow: 0 0 4px #aaa;
			box-shadow: 0 0 4px #aaa;
			clip: rect(4px, 14px, 14px, 4px);
			opacity: 1;
		}
	}
}

