/**
 * Containers
 * This includes the main wrapper for all sliders, then each slider,
 * which is one level above the individual slides.
 * Don't be afraid to use !important as needed.
 */

$theme_name: jenga;
$theme_prefix: .metaslider.ms-theme-$(theme_name);

.ms-jenga {
	padding-bottom: 40px;
	opacity: 0;
	transition: opacity 0.3s;
	&.ms-loaded {
		opacity: 1;
	}
}

$(theme_prefix) {
	*,
	*::before,
	*::after {
		box-sizing: border-box;
	}
	.flexslider {
		margin-bottom: 0;
	}
	.flexslider:not(.filmstrip) .slides,
	.rslides,
	.nivoSlider,
	.coin-slider .coin-slider {
	}

	.rslides img,
	.nivoSlider {
	}

   .slide-control,
   &.has-thumb-nav .flex-direction-nav {
      width: auto;
      display: flex;
      flex-direction: column;
      justify-content: center;
      position: absolute;
      top: 50%;
      right: 10%;
      background: transparent;
      line-height: 15px;
      margin: 0;
      padding: 0 !important;
      z-index: 8;
      transition: top .2s;
      /* position: relative; */
   }
   &.has-thumb-nav .flexslider ul.flex-direction-nav li a {
	   position: absolute;
   }

   .flex-direction-nav li {
      float: left;
   }

	/**
	* Dots
	* You should inspect the sliders to see more specific rules
	* mixin use: @mixin mixinName ...supported_libraries
	*/
	@mixin dotsContainer flex, rslides, nivo {
		display: flex;
		flex-direction: column;
		flex-wrap: wrap;
		align-items: center;
		justify-content: flex-end;
		background: transparent;
		position: static;
		margin: 0;
		margin-bottom: 0;
		margin-left: 0;
		padding: 0 !important;
		height: 120px;
	}
	@mixin dotsContainer nivo {
		position: absolute;
		z-index: 9;
		right: 40px;
		top: 15px;
		width: 80px;
		z-index: 9;
		align-items: center;
	}

	@mixin dotsContainer coin {
		display: flex;
		flex-direction: column;
		flex-wrap: wrap;
		align-items: center;
		justify-content: flex-end;
		flex-wrap: wrap;
		height: 120px;
		justify-content: flex-end;
		left: auto !important;
		right: 10%;
		position: absolute !important;
		right: 116px;
		top: 26%;
	}

	@mixin dotsLink { 
		box-shadow: 2px 3px 5px -4px rgba(0,0,0,0.4) !important;
		transition: background 0.2s ease-in-out;
		cursor: pointer;
		text-indent: -9999px;
		display: block;
		position: relative;
		left: 2px;
		line-height: 15px;
		width: 16px;
		height: 16px;
		padding: 0;
		background: rgba(255, 255, 255, .9);
		border-radius: 50%;
		margin: 0 4px 8px 0;
	}


	@mixin dotsLinkActive {
		background: rgba(183,180,180,0.2);
      	border: 2px solid rgba(255, 255, 255, .9);

		&::after {
			transform: translateY(0);
			opacity: 1;
		}
	}

	/**
	* Arrows
	*
	*/
	@mixin arrowsContainer {
		width: 64px;
	}
	@mixin arrowsLink {
		position: relative;
		top: 15px;
		background: none;
		box-shadow: none;
		width: 32px;
		height: 41px;
		color: black;
		opacity: 0;
		overflow: hidden;
		transition: all .2s ease-in-out;
		margin: 0;

		&::before {
			content: '' !important;
			position: absolute;
			display: block;
			width: 100%;
			height: 41px;
			max-width: 22px;
			max-height: 41px;
			background: url("images/arrow.png") no-repeat;
			background-size: 100%;
			background-position: 50% 50%;
		}
	}

   	@mixin arrowsLink__prev {
		left: 0;

      	&::before {
			left: 15%;
      	}
	}

	&.has-carousel-mode {
		ul.flex-direction-nav li a {
			position: absolute;
			top: 50%;
			margin-top: -20px;
		}
	}

   @mixin arrowsLink__next {
		right: -1px;

      &::before {
         transform: rotate(180deg);
         right: 15%;
      }
	}

	@mixin arrowsLink rslides {
		padding: 0;
		display: inline-block;
	}

	@mixin arrowsLink nivo {
		height: 38px;
		position: absolute;
		top: 140px;
		width: 25px;
		padding: 0;
	}

   	@mixin arrowsLink__prev nivo {
		right: 85px;
		left: auto;
	}
	@mixin arrowsLink__next nivo {
		right: 50px;
	}

   @mixin sliderHover__arrowsLinks {
		opacity: 1 !important;

		&:hover {
			color: black;
			opacity: 1 !important;
		}
	}

   .coin-slider .coin-slider div {
		display: block !important;
	}

   .coin-slider .coin-slider .cs-prev,
   .coin-slider .coin-slider .cs-next {
		margin-top: 15px !important;
		right: 120px !important;
   }
   .coin-slider .coin-slider .cs-prev {
		left: auto !important;
		margin-right: 16px;
   }
   .coin-slider .coin-slider .cs-next {
		margin-right: -16px;
   }

	/**
	* Caption
	*/
	@mixin caption flex, rslides, nivo {
		width: 100%;
		position: absolute;
		bottom: 0;
		background: rgba(0, 0, 0, 0.8);
		margin: 0;
		transition: 0.5s all;
	}


	@mixin caption rslides {

	}

	@mixin caption nivo {
		transform: translateY(0);
		a {
			border-bottom: 0;
		}
	}

	@mixin caption coin {
		padding: 20px;
		margin: 10px;
		width: calc(100% - 20px);
	}

	.flexslider ul.slides .flex-active-slide .caption-wrap,
	.rslides li[class*=rslides] .caption-wrap {
		transform: translateY(0);
	}

	.flexslider ul.slides .caption-wrap .caption,
	.rslides .caption-wrap .caption,
	.nivoSlider .nivo-caption {
		font-size: 0.9rem;
      	text-align: center;
      	color: #ffffff;
		padding: 20px 30px 55px 30px;

		.ms-is-small& {
			padding-top: 50px;
		}

	}

   /**
	* Filmstrip
	*/
	.filmstrip {
		z-index: 4;
		width: 100%;
		border-radius: 0;
		margin-top: 10px;
		ul.flex-direction-nav li a {
			position: absolute;
			top: 50%;
			margin-top: -20px;
			&::after {
				width: 10px;
			}

			&.flex-prev {
				left: 0;
			}

			&.flex-next {
				right: 0;
			}
		}


	}

	&.has-filmstrip {

		@mixin arrowsContainer flex {
			width: 90px;
		}

		@mixin caption flex {
			margin-right: 110px;
		}

	}

	&.fullwidth {

		@mixin caption {
			margin-right: 320px;
		}

		@mixin caption__text {
			padding-left: 20px;
		}

		@mixin dotsContainer flex, rslides, nivo {
			right: 60px;
		}

		@mixin arrowsContainer flex, nivo {
			right: 20px;
		}

		@mixin arrowsLink rslides {

			&.prev {
				right: 284px;
			}

			&.next {
				right: 20px;
			}
		}

	}

   /**
   * Thumbnail
   */

   .slider-wrapper .nivo-controlNav.nivo-thumbs-enabled a:hover,
   .slider-wrapper .nivo-controlNav.nivo-thumbs-enabled a.active {
      border: 0 none;
   }

	&.has-thumb-nav .slide-control {
		top: 100px!important;
	}

	/**
	* When slider is small (< 600px)
	*/
	&.ms-is-small {
		padding-bottom: 50px;
	}

	&.ms-is-small .flexslider ul.slides .caption-wrap,
	&.ms-is-small .rslides .caption-wrap,
	&.ms-is-small .nivoSlider .nivo-caption {
		margin-right: 0;
	}

	&.ms-is-small .flexslider ol.flex-control-nav,
	&.ms-is-small ul.rslides_tabs,
	&.ms-is-small .slider-wrapper .nivo-controlNav,
	&.ms-is-small .coin-slider .cs-buttons {
		/* bottom: -35px; */
		width: 100%;
		left: 0;
		right: 0;
	}

	&.ms-is-small .flexslider:not(.filmstrip) ul.flex-direction-nav,
	&.ms-is-small .nivo-directionNav {
		width: 100%;
	}

	&.ms-is-small.fullwidth {

		@mixin arrowsContainer flex, nivo {
			right: 0;
		}

		@mixin arrowsLink__prev {
			left: 20px;
		}

		@mixin arrowsLink__next {
			right: 20px;
		}

	}

}
