/**
 * 
 * 15. Shortcode elements styling
 * 
 */


/** 15.01 Social icons **/
ul.shrk-social-icons {
	display: inline-block;
	list-style: none;
	margin-bottom: 0;
	padding: 0 10px;
	font-size: 14px;
	line-height: 18px;

	li {
		display: inline-block;
		margin-left: 6px;
		padding-left: 0;

		a {
			display: inline-block;
			width: 15px;
			text-align: center;
		}

		&:first-child {
			margin-left: 0;
			padding-left: 0;
		}
	}

	&.left {
		border-right: 2px solid rgba(247, 247, 247, 0.1);
		padding: 0 10px 0 0;
		margin-right: 10px;
	}
	&.right {
		border-left: 2px solid rgba(247, 247, 247, 0.1);
		padding: 0 0 0 10px;
		margin-left: 10px;
	}

	&.inv-link-colors {
		li a {
			@include color-link-inv();
		}
	}

	.main-content & {
		font-size: 16px;

		li a {
			width: 18px;
		}
	}
}


/** 15.02 WP Gallery **/
$gallery-gap: 15px;
.gallery {
	margin: auto ($gallery-gap*(-1)) 1.5em 0;
	flex-flow: row wrap; 
	display: flex;

	img {
	  	width: 100%; 
  		height: auto; 
	}

	.gallery-item {
 		text-align: center;
		flex: auto;
		flex-grow: 0;
		width: 25%; 
		margin: 0 $gallery-gap $gallery-gap 0; 
	}

	.gallery-caption {
		@extend %text-theme;
		margin-left: 0;
	}

	.gallery-item {
		/**
		 * Default fullwidth on mobile
		 */
		width: 100%;
	}

	@include at-least($bp-xxs) {
		.gallery-item {
			/**
			 * Larger than 5-columns fall back to 4 columns
			 * when width < bp-xs
			 */
			width: calc(25% - #{$gallery-gap}); 
		}

		&.gallery-columns-1 {
			.gallery-item {
				width: 100%; 
			}
		}

		&.gallery-columns-2 {
			.gallery-item {
				width: calc(50% - #{$gallery-gap}); 
			}
		}

		&.gallery-columns-3 {
			.gallery-item {
				width: calc(33.333% - #{$gallery-gap}); 
			}
		}

		&.gallery-columns-4 {
			.gallery-item {
				width: calc(25% - #{$gallery-gap}); 
			}
		}
	}

	@include at-least($bp-xs) {
		&.gallery-columns-5 {
			.gallery-item {
				width: calc(20% - #{$gallery-gap}); 
			}
		}

		&.gallery-columns-6 {
			.gallery-item {
				width: calc(16.66% - #{$gallery-gap}); 
			}
		}

		&.gallery-columns-7 {
			.gallery-item {
				width: calc(14.28% - #{$gallery-gap}); 
			}
		}

		&.gallery-columns-8 {
			.gallery-item {
				width: calc(12.5% - #{$gallery-gap}); 
			}
		}

		&.gallery-columns-9 {
			.gallery-item {
				width: calc(11.1% - #{$gallery-gap}); 
			}
		}
	}
}


/** 15.03 Dropcaps **/
span.dropcap {
	display: inline-block;
	float: left;
	color: #FFF;
	background-color: $color-primary; /* redux[background-color: main_theme_color] */ 
	width: 42px;
	height: 42px;
	text-align: center;
	font-size: 28px;
	line-height: 42px;
	margin: 6px 9px 0 0;
}


/** 15.04 Styled maps **/
.shrk-styled-map img {
	max-width: none;
}


/** 15.05 Quotes **/
.quote-wrapper {
	.quote {
		font-size: 30px;
		line-height: 40px;
		margin-bottom: 10px;
		i {
			font-size: 25px;
			display: inline-table;
			vertical-align: top;
			margin: 0 10px;
		}
	}
	.author {
		font-size: 16px;
		font-weight: 300;
		color: #1A1A1A;
		/* main color */
	}
}


/** 15.06 Testimonials **/
.testim-photo-wrapper {
	width: 120px;
	border-radius: 60px;
	overflow: hidden;
	text-align: center;
	box-shadow: 0px 0px 0px 3px rgba(0, 0, 0, 0.1);
	margin: 0 auto 2em auto;
}

.testim-text {
	text-align: center;
	max-width: 60%;
	margin: 0 auto;
}

.testim-name {
	text-align: center;
	max-width: 60%;
	margin: 0 auto;
	font-size: 90%;
	opacity: 0.7;
}

/** 15.07 Simple headings **/
.section-title-wrapper .section-title, 
.widget-title-wrapper .widget-title {
	margin-bottom: 3em;
}

.section-title-wrapper {
	text-align: center;
}

/** 15.08 Banner **/
.shrk-banner {
	background-size: cover;
	background-repeat: no-repeat;
	background-position: center center;
	position: relative;
	overflow: hidden;
	border-radius: 2px;
	opacity: 1;
	@include transition(opacity $duration-opacity $fn-cubic);

	&.style-1 {
		.banner-target {
			@extend %abs-cover-parent;
			display: flex;
			justify-content: center;
			align-items: flex-end;
			text-decoration: none;
			color: #fff;

			&:visited, &:hover {
				color: #fff;
			}

			&:after {
				@extend %abs-cover-parent;
				content: '';
				background-color: #000;
				opacity: 0.2;
				@include transition(opacity 0.4s $fn-cubic);
			}

			.banner-heading {
				@extend %text-theme;
				@extend %transition-transform;
				width: 100%;
				text-align: right;
				padding: 0 25px;
				z-index: 1;
				letter-spacing: -1px;

				&:after {
					content: '';
					position: absolute;
					bottom: 0;
					right: 0;
					width: 100%;
					margin-right: 25px;
					height: 3px;
					background-color: #fff;
					opacity: 0;
					@include transform(translateY(20px));
					@include transition(all $duration-transform $fn-cubic 0.1s);
				}
			}

			&:hover {
				&:after {
					opacity: 0.4;
				}

				.banner-heading {
					@include transform(translateY(-20px));
					&:after {
						opacity: 1;
						@include transform(translateY(10px));
					}
				}
			}
		}
	}

	&.style-2 {
		.banner-target {
			@extend %abs-cover-parent;
			display: flex;
			justify-content: center;
			align-items: center;
			text-decoration: none;
			color: #fff;

			&:visited, &:hover {
				color: #fff;
			}

			&:after {
				@extend %abs-cover-parent;
				content: '';
				background-color: #000;
				opacity: 0.2;
				@include transition(opacity 0.4s $fn-cubic);
			}

			.banner-heading {
				@extend %text-theme;
				@extend %transition-transform;
				// width: 100%;
				text-align: center;
				padding: 0 25px;
				z-index: 1;
				letter-spacing: -1px;

				&:after {
					content: '';
					position: absolute;
					bottom: 0;
					left: 0;
					width: 100%;
					// margin-right: 25px;
					height: 3px;
					background-color: #fff;
					opacity: 0;
					@include transform(translateY(30px));
					@include transition(all $duration-transform $fn-cubic 0.1s);
				}
			}

			&:hover {
				&:after {
					opacity: 0.4;
				}

				.banner-heading {
					@include transform(translateY(-15px));
					&:after {
						opacity: 0.5;
						@include transform(translateY(20px));
					}
				}
			}
		}
	}

	// Cover for when lazyloading
	&:after { 
		@extend %abs-cover-parent;
		content: '';
		display: block;
		background-color: darken($color-body-background, 5%);
		opacity: 0;
		visibility: hidden;
		@include transition(opacity $duration-opacity $fn-cubic, visibility 0s linear $duration-transform);
	}

	&.lazyload-bg,
	&.lazyloading-bg {
		&:after {
			opacity: 1;
			visibility: visible;
		}
	}
}

/** 15.09 WC cat-products slider **/
.xy-slider.products {
	.swiper-container-vertical {
		> .prev_swipe, > .next_swipe {
			background-color: transparent;
			i {
				color: #fff;
			}
		}
	}

	a.add_to_cart_button {
		&:before {
			@extend %ion;
			content: $ionicon-var-android-cart;
			position: absolute;
			top: 50%;
			margin-top: -0.5em;
			right: 1em;
			margin-left: 0.3em;
			height: 1em;
			width: 1em;
			color: #fff;
			display: none;
			@include transition(color 0.1s ease-in-out);
		}
	}

	.category-cover {
		position: absolute;
		width: 100%;
		height: 100%;
		top: 0;
		left: 0;
		z-index: 14;
		background-color: #585858; //fall back, when no image
		background-position: center center;
		background-size: cover;
		background-repeat: no-repeat;
		@include transition(transform 0.2s ease-in-out);

		.cover-inner {
			position: absolute;
			top: 50%;
			width: 100%;
			text-align: center;
			z-index: 1;
			@include transform(translateY(-50%));

			.cover-title {
				@extend %uppercase;
				font-size: 90px;
				line-height: 0.8em;
				font-weight: 900;
				padding: 0 0.4em 10px 0.4em;

				color: #fff;
				margin: 0;

				@include until($bp-xs) {
					font-size: 9vw;
				}
			}
		}

		&:after {
			@extend %abs-cover-parent;
			content: '';
			z-index: 0;
			background-color: transparent;
		}
	}

	.shrk-swiper-container.inner {
		> .swiper-pagination,
		> .swiper-scrollbar,
		> .prev_swipe,
		> .next_swipe {
			display: none;
		}
	}

	.button.to-product {
		position: absolute;
		top: 25px;
		right: 25px;
		padding: 8px 12px;
		z-index: 2;
		background-color: $color-darker-gray;



		&:before {
			@extend %ion;
			content: $ionicon-var-chevron-right;
			width: 40px;
			line-height: 42px;
			text-align: center;
			margin: 0;
			display: block;
			position: absolute;
			padding: 8px;
			font-weight: 900;
			right: 100%;
			top: 0;
			padding: 0;
			background-color: $color-primary; /* redux[background-color: main_theme_color] */ 
		}

		@include until($bp-xxs) {
			right: 10px;
			top: 10px;
		}
	}

	.badges-style-a & {
		span.onsale,
		span.wc-new-badge {
			@include transform(translateY(-100%));
			@include transition(transform $duration-transform $fn-cubic 0.4s);
		}
	}

	.badges-style-b & {
		span.onsale,
		span.wc-new-badge {
			top: 35px;
			left: 35px;
			font-size: 20px;
			opacity: 0;
			@include transition(opacity $duration-transform $fn-cubic 0.4s);
		}
	}

	&.inner-slide-open {
		> .shrk-swiper-container {
			> .swiper-pagination,
			> .swiper-scrollbar,
			> .prev_swipe,
			> .next_swipe {
				display: none;
			}
		}

		.shrk-swiper-container.inner {
			> .swiper-pagination,
			> .swiper-scrollbar,
			> .prev_swipe,
			> .next_swipe {
				display: block;
			}

			.prev_swipe, .next_swipe, .swiper-product-count {
				position: absolute;
				z-index: 12;
				margin: 0;
				top: auto;
				left: auto;
				bottom: 20px;
				right: 10px;
				background-color: transparent;
				@include transition(transform $duration-transform $fn-cubic);

				i { 
					color: $color-primary; /* redux[color: main_theme_color] */ 
				}

				@include until($bp-xs) {
					top: auto;
					bottom: 0;
				}
			}

			.prev_swipe {
				@include transform(translateX(-100px));
			}

			.swiper-product-count {
				font-size: 20px;
				width: 180px;
				text-align: center;
				font-weight: 900;
				line-height: 80px;
			}

			.badges-style-a & {
				.swiper-slide-active {
					span.onsale,
					span.wc-new-badge {
						@include transform(translateY(0));
					}
				}
			}

			.badges-style-b & {
				.swiper-slide-active {
					span.onsale,
					span.wc-new-badge {
						opacity: 1;
					}
				}
			}

			@include until($bp-xs) {
				.prev_swipe {
					right: auto;
					left: 0;
					@include transform(translateX(0));
				}

				.next_swipe {
					right: 0;
					left: auto;
					@include transform(translateX(0));
				}

				.swiper-product-count {
					display: none;
				}
			}
		}



		.swiper-container-fade > .swiper-wrapper {
			& > .swiper-slide {
				visibility: hidden;

				&.swiper-slide-active {
					visibility: visible;
				}
			}
		}

	}

	.slide-background {
		background-size: cover;
		background-position: center center;
		background-repeat: no-repeat;
		width: 100%;
		height: 100%;
		top: 0;
		left: 0;
		position: absolute;
		z-index: -1;
		visibility: visible;
		opacity: 1;

		&:before {
			@extend %abs-cover-parent;
			content: '';
			background-color: #fff;
			opacity: 0;
			visibility: hidden;
			@include transition( opacity $duration-opacity $fn-cubic, visibility 0s linear $duration-opacity );
		}

		&:after {
			@extend %loading-spinner;
			content: '';
			position: absolute;
			top: 50%;
			left: 50%;
			width: 30px;
			height: 30px;
			margin-left: -15px;
			margin-top: -15px;
			border-color: $color-dark-gray;
			display: none;
		}

		&.lazyloading-bg {
			&:before {
				opacity: 1;
				visibility: visible;
			}

			&:after {
				display: block;
			}
		}
	}


	.half-image .slide-background {
		width: 50%;
		left: 0;

		@include until($bp-xs) {
			width: 100%;
		}
	}

	.slide-content-wrap {
		z-index: 1;
		width: 50%;
		height: 100%;
		position: absolute;
		top: 0;
		right: 0;

		.slide-content {
			background-color: rgba(255,255,255,0.8);
			position: absolute;
			top: 50%;
			width: 90%;
			margin-left: 5%;
			padding: 40px 30px;
			display: flex;
			flex-direction: column;
			max-height: 80%;
			@include transform(translateY(-50%));

			> h3,
			.woocommerce-loop-product__title {
				@extend %uppercase;
				font-size: 62px;
				line-height: 0.9em;
				font-weight: 900;
				word-break: break-word;

				@include until($bp-xs) {
					font-size: 6vw;
					margin-bottom: 5px;
				}
				@include until($bp-xxs) {
					font-size: 8vw;
				}

			}

			.add_to_cart_button {
				margin-top: 1em;
				display: table;

				@include until($bp-xs) {
					position: absolute;
					bottom: 100%;
					right: 25px;
					margin-top: 0;
					margin-bottom: 25px;
				}

				@include until($bp-xxs) {
					right: 10px;
					margin-bottom: 10px;
					padding: 8px 12px;
				}
			}

			span.price {
				display: block;
				color: $color-dark-gray;
				
				@include until($bp-xs) {
					font-size: 4vw;
					margin-bottom: 0;
				}

				@include until($bp-xxs) {
					font-size: 5vw;
				}
			}

			div[itemprop="description"],
			.woocommerce-product-details__short-description {
				overflow-y: auto; 
				@include custom-scrollbars( 6px );
				padding: 0 6px 0 0;
				
				@include until($bp-xs) {
					display: none;
				}
			}
			
			> *:first-child {
				margin-top: 0;
			}

			@include until($bp-xs) {
				width: 100%;
				margin-left: 0;
			}

		}

		@include until($bp-xs) {
			width: 100%;

			.slide-content {
				top: auto;
				bottom: 0;
				width: 100%;
				padding: 20px 80px 20px 80px;
				@include transform(translateY(0));
			}
		}

	}

	.transp-content .slide-content {
		@include at-least($bp-xs) {
			background-color: transparent;
		}
	}

	.transp-content-mobile .slide-content {
		@include until($bp-xs) {
			background-color: transparent;
		}
	}

	.image-on-the-left {
		.slide-background {
			width: 50%;
		}

		.slide-content {
			background-color: transparent;
		}
	}

	$bp-for-xyswiper-nav: $bp-sm;

	.swiper-nav-wrapper {
		position: absolute;
		top: 0;
		left: 0;
		height: 100%;
		z-index: 15;

		@include until($bp-for-xyswiper-nav) {
			pointer-events: none;
		}

		.active-bar {
			position: absolute;
			content: '';
			width: 10px; 
			height: 10px;
			top: 0; 
			right: 0;
			background-color: $color-primary; /* redux[background-color: main_theme_color] */ 
			z-index: 1;
			opacity: 0;
			@include transition(all $duration-transform $fn-cubic);
		}

		.toggle-button {
			display: none;
			position: absolute;
			cursor: pointer;
			width: 40px; 
			height: 40px;
			top: 50%; 
			left: 100%;
			background-color: $color-secondary; /* redux[background-color: secondary_theme_color] */ 
			color: $color-light-gray;
			box-shadow: 0 0 50px 0px rgba(0, 0, 0, 0.3);
			z-index: 1;
			opacity: 1;
			@include transform(translateY(-50%));
			@include transition(all $duration-transform $fn-cubic);

			&:before {
				@extend %ion;
				content: $ionicon-var-grid;
				font-size: 16px;
				width: 40px;
				line-height: 40px;
				text-align: center;
				margin: 0;
				display: block;
				position: absolute;
				padding: 8px;
				font-weight: 900;
				left: 0;
				top: 0;
				padding: 0;
				@include transition(transform $duration-transform $fn-cubic);
			}

			@include until($bp-for-xyswiper-nav) {
				display: block;
				pointer-events: all;
			}
		}
	}

	.swiper-nav-sticky {
		@include at-least($bp-for-xyswiper-nav) {
			display: flex;
			flex-direction: row-reverse;

			.prev_swipe,
			.next_swipe {
				margin-left: 125px;
			}

			.swiper-nav-wrapper {
				position: relative;
			}
		}
	} 

	.swiper-nav-outer {
		height: 100%;
		overflow: visible;
		box-shadow: 0 0 50px 0px rgba(0, 0, 0, 0.3);
		@include transform(translateX(calc(-100% + 10px)));
		@include transition(transform $duration-transform $fn-cubic);

		.swiper-nav-thumbs-wrapper {
			position: relative;
			height: 100%;
			display: flex;
			flex-direction: column;
			overflow-y: auto;
			overflow-x: hidden;
			@include custom-scrollbars( 6px );
		}

		.nav-thumb {
			padding: 5px 25px;
			position: relative;
			height: 100%;
			min-height: 100px;
			width: 250px;
			word-break: break-word;
			overflow: hidden;
			vertical-align: middle;
			color: #fff;
			cursor: pointer;
			text-align: center;
			background-color: $color-dark-gray;
			display: flex;
			flex-direction: column;
			justify-content: center;
			@include transition(transform $duration-transform $fn-cubic);

			span {
				opacity: 0;
				@include transition(opacity 0.3s ease-in-out 0.15s);
			}

			span.cat-name {
				@extend %text-theme;
				display: inline-block;
				position: relative;
				z-index: 1;
				font-size: 1.3em;
			}

			span.count {
				position: absolute;
				top: 0;
				right: 10px;
				z-index: 1;
				font-size: 0.8em;
				color: $color-light-gray;
				display: none;
			}

			.thumb-bg {
				@extend %abs-cover-parent;
				background-size: cover;
				background-position: center center;
				@include transform(scale(1.1) translateX(-5%));
				opacity: 0;
				@include transition(transform $duration-transform $fn-cubic, opacity $duration-transform $fn-cubic);

				&.ready {
					opacity: 1;
				}
			}

			&:after {
				@extend %abs-cover-parent;
				content: '';
				display: block;
				background-color: rgba(0,0,0,0.7);
				z-index: 0;
				@include transform(scale(1.2));
				@include transition(opacity $duration-transform $fn-cubic);
			}

			&:hover {
				.thumb-bg {
					transform: scale(1.1) translateX(0);
				}

				&:after {
					opacity: 0.8;
				}
			}
		}
	}

	.swiper-nav-sticky,
	.swiper-nav-wrapper:hover {
		@include at-least($bp-for-xyswiper-nav) {
			.swiper-nav-outer {
				@include transform( translateX(0) );

				.nav-thumb span {
					opacity: 1;
				}
			}

			.active-bar {
				width: 5px;
			}
		}
	}

	.swiper-nav-force-show {
		pointer-events: all;

		.swiper-nav-outer {
			@include transform( translateX(0) );

			.nav-thumb span {
				opacity: 1;
			}
		}

		.active-bar {
			width: 5px;
		}

		.toggle-button:before {
			content: $ionicon-var-close;
			@include transform(rotate(90deg));
		}
	}

	.swiper-nav-show-count {
		.nav-thumb span.count {
			display: block;
		}
	}
}

/** 15.10 Video popup **/
.shrk-video-popup-wrapper {
	position:   fixed;
	width:      100%;
	height:     100%;
	opacity:    0;
	top:        0;
	left:       0;
	background: rgba(0,0,0,.88);
	z-index:    8888888;
	@include transition(opacity $duration-opacity $fn-cubic);

	.loader {
		opacity: 1;
		@include transition(opacity $duration-opacity $fn-cubic);

		&:after {
			@extend %loading-spinner;
			content: '';
			position: absolute;
			top: 50%;
			left: 50%;
			width: 30px;
			height: 30px;
			margin-left: -15px;
			margin-top: -15px;
			border-color: $color-light-gray;
			display: block;
		}
	}

	.close {
		&:before {
			@extend %ion;
			content:     $ionicon-var-close-round;
			position:    absolute;
			font-size:   28px;
			line-height: 80px;
			text-indent: 0;
			color:       #fff;
			right:       0;
			top:         0;
			text-align:  center;
			width:       80px;
			cursor:      pointer;
			z-index:     9999999;
			opacity:     0.5;
			@include transition(opacity $duration-opacity $fn-cubic);
		}

		&:hover {
			&:before {
				opacity: 1;
			}
		}
	}

	.shrk-video-popup-video {
		display:   block;
		z-index:   8888889;
		width:     80%;
		max-width: 1200px;
		height:    auto;
		opacity:   0;
		position:  absolute;
		left:      50%;
		top:       50%;
		@include transform(translate3d(-50%, -50%, 0));
		@include transition(opacity $duration-opacity $fn-cubic);
	}

	.shrk-video-popup {
		cursor: pointer;
	}

	&.visible {
		opacity: 1;
	}

	&.ready {
		.loader {
			opacity: 0;
		}

		.shrk-video-popup-video {
			opacity: 1;
		}
	}

	iframe:-webkit-full-screen {
		@include transform(translate3d(0,0,0));
	}

	iframe:-moz-full-screen {
		@include transform(translate3d(0,0,0));
	}
}