﻿._ghor(@start-color, @end-color, @start-percent, @end-percent) {
	background-image: -webkit-linear-gradient(left, @start-color @start-percent, @end-color @end-percent);
	background-image: -o-linear-gradient(left, @start-color @start-percent, @end-color @end-percent);
	background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent);
	background-repeat: repeat-x;
	filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d',endColorstr='%d',GradientType=1)",argb(@start-color),argb(@end-color)));
}

._swiper-shadow {
	text-shadow: 0 0 2pt rgba(0,0,0,.7);
}

._swiper-reset-buttons(@size) {
	.swiper-button-prev,
	.swiper-button-next {
		._swiper-shadow();
		position: absolute;
		top: 50%;
		margin: -@size * .6 0 0 0;
		padding: 0;
		background: none;
		/*background-color: rgba(255,255,255,.5);*/
		height: @size;
		line-height: @size;
		width: .8em;
		text-align: center;
		font-size: @size;
		color: #fff;
		z-index: 10;

		> i {
			vertical-align: middle;
		}
	}

	.swiper-button-prev.swiper-button-disabled,
	.swiper-button-next.swiper-button-disabled {
		opacity: 0;
		cursor: auto;
		pointer-events: none;
	}

	.swiper-button-prev,
	.swiper-container-rtl .swiper-button-next {
		left: 0;
		right: auto;
		/*text-align: left;*/
	}

	.swiper-button-next,
	.swiper-container-rtl .swiper-button-prev {
		right: 0;
		left: auto;
		/*text-align: right;*/
	}
}

._swiper-reset-pagination(@size) {
	.swiper-pagination-bullet {
		._swiper-shadow();
		background-color: #fff;
		width: @size;
		height: @size;
		opacity: .4;
	}

	.swiper-pagination-bullet-active {
		background-color: #fff;
		opacity: 1;
	}
}

._swiper-menu(@bg, @height, @width, @size) {
	@bgz1: fade(@bg, 75);
	@bgz2: fade(@bg, 0);
	._swiper-reset-buttons(@size * 3);
	background-color: @bg;

	> .swiper-wrapper {
		> .swiper-slide {
			margin: 0 .5em;
			padding: 0;
			min-height: @height;
			height: @height;
			line-height: @height;
			width: @width;
			background-color: @bg;
			text-align: center;
			font-size: @size;

			> span {
				display: inline-block;
				line-height: 1.1;
				vertical-align: middle;
			}

			&:hover {
				background-color: lighten(@bg, 5%);
			}

			&.active {
				background-color: lighten(@bg, 10%);
			}
		}
	}

	.swiper-button-prev,
	.swiper-button-next {
		padding: 0 .1em;
		height: @height;
	}

	.swiper-button-prev,
	.swiper-container-rtl .swiper-button-next {
		._ghor(@bgz1, @bgz2, 50%, 100%);
		left: 0;
		right: auto;
		text-align: left;
	}

	.swiper-button-next,
	.swiper-container-rtl .swiper-button-prev {
		._ghor(@bgz2, @bgz1, 0%, 50%);
		right: 0;
		left: auto;
		text-align: right;
	}
}

._swiper-vbanners(@height) {
	height: @height;

	> .swiper-wrapper {

		> .swiper-slide {
			padding: 0;
			text-align: center;
			display: -webkit-box;
			display: -ms-flexbox;
			display: -webkit-flex;
			display: flex;
			-webkit-box-pack: center;
			-ms-flex-pack: center;
			-webkit-justify-content: center;
			justify-content: center;
			-webkit-box-align: center;
			-ms-flex-align: center;
			-webkit-align-items: center;
			align-items: center;

			a, img {
				padding: 0;
				height: @height;
			}
		}
	}
}
