/*
 *
 * Plugin Name: ModuloBox
 * Plugin URI: https://www.theme-one.com/modulobox/
 * Author: Themeone
 * Author URI: https://www.theme-one.com/
 * Description: a pure JavaScript and touchable lightbox
 * Version: 1.0.0
 * Tags: lightbox, touch, swipe, image, video, iframe, html
 *
 * Copyright (C) 2017 Themeone - All Rights Reserved
 *
 */

/* ============================================================
   SUMMARY
/* ============================================================
	
	00. Main containers
	01. Top Bar
	02. Bottom Bar
	03. Caption
	04. Item
	05. Counter
	06. Loader
	07. Buttons
	08. Gallery
	09. Media Queries

/* ============================================================
   00. Main containers
/* ============================================================ */

.mobx-holder {
	position: fixed;
	overflow: hidden;
	z-index: 9999999;
	width: 100%;
	height: 100%;
	left: 0;
	top: 0;
	visibility: hidden;
	opacity: 0;
	will-change: opacity, visibility;
	box-sizing: border-box;
	-ms-touch-action: none;
	touch-action: none;
	pointer-events: none;
	-webkit-text-size-adjust: 100%;
	-webkit-backface-visibility: hidden;
	font-family: Arial, Helvetica, sans-serif;
	-webkit-transition: opacity .4s ease; /*** prevent issue on old Safari version ***/
	transition: opacity .4s ease, visibility .4s ease;
}
.mobx-holder:-webkit-full-screen {
	background-color: transparent;
}
.mobx-holder * {
	box-sizing: border-box;
}
.mobx-holder svg {
	pointer-events: none;
}
.mobx-open {
	pointer-events: auto;
	visibility: visible;
	opacity: 1;
}
.mobx-rtl {
	direction: rtl;
}
.mobx-slider {
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	bottom: 0;
	opacity: 1;
	-webkit-tap-highlight-color: transparent;
	-webkit-touch-callout: none;
	-ms-touch-action: none;
	touch-action: none;
	-webkit-transition: opacity 0.45s ease;
	transition: opacity 0.45s ease;
}
.mobx-hide {
	opacity: 0;
	-webkit-transition: none;
	transition: none;
}
.mobx-overlay {
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	will-change: opacity;
	transform: translateZ(0);
	background-color: #000000;
}
.mobx-ui:after {
	position: absolute;
	content: "";
	left: 0;
	top: 0;
	right: 0;
	bottom: 0;
	opacity: 0;
	visibility: hidden;
	will-change: opacity;
	background: rgba(0,0,0,0.4);
	-webkit-transition: opacity 0.25s ease-out, visibility 0.25s ease-out;
	transition: opacity 0.25s ease-out, visibility 0.25s ease-out;
}
.mobx-open-tooltip .mobx-ui:after {
	opacity: 1;
	visibility: visible;	
}

/* ============================================================
   01. Top Bar
/* ============================================================ */

.mobx-top-bar {
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	will-change: transform;
	background-color: rgba(0,0,0,0.4);
	-webkit-transform: translateY(0);
	transform: translateY(0);
	-webkit-transition: -webkit-transform 0.25s ease-in-out;
	transition: transform 0.25s ease-in-out;
}
.mobx-idle .mobx-top-bar,
.mobx-will-close .mobx-top-bar,
.mobx-holder:not(.mobx-open) .mobx-top-bar {
	-webkit-transform: translateY(-100%);
	transform: translateY(-100%);
}

/* ============================================================
   02. Bottom Bar
/* ============================================================ */

.mobx-bottom-bar {
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
	will-change: transform;
	background-color: rgba(0,0,0,0.4);
	-webkit-transform: translateY(0);
	transform: translateY(0);
	-webkit-transition: -webkit-transform 0.25s ease-in-out;
	transition: transform 0.25s ease-in-out;
}
.mobx-panzoom .mobx-bottom-bar,
.mobx-will-close .mobx-bottom-bar,
.mobx-holder:not(.mobx-open) .mobx-bottom-bar {
	-webkit-transform: translateY(100%);
	transform: translateY(100%);
}

/* ============================================================
   03. Caption
/* ============================================================ */

.mobx-caption {
	position: relative;
	display: block;
	width: 100%;
	padding: 0;
	margin: 0;
	pointer-events: none;
}
.mobx-caption-inner {
	max-width: 420px;
	margin: 0 auto;
	pointer-events: auto;
	cursor: default;
}
.mobx-holder .mobx-title {
	position: relative;
	display: block;
	margin: 0;
	padding: 14px 10px 12px;
	font-size: 13px;
	line-height: 18px;
	font-weight: normal;
	text-align: center;
	color: #eeeeee;
}
.mobx-holder .mobx-desc {
	position: relative;
	display: block;
	margin: 0;
	padding: 14px 10px 12px;
	font-size: 12px;
	line-height: 16px;
	font-weight: normal;
	text-align: center;
	color: #bbbbbb;
}
.mobx-title + .mobx-desc {
	margin: -6px 0 0 0;
	padding: 0 10px 10px;
}

/* ============================================================
   04. Item
/* ============================================================ */

.mobx-item,
.mobx-item-inner {
	position: absolute;
	display: block;
	overflow: hidden;
	left: 0;
	top: 0;
	bottom: 0;
	width: 100%;
	text-align: center;
	touch-action: none;
	transform: translate3d(0,0,0);
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
	-webkit-transform-origin: center;
	transform-origin: center;
}
.mobx-img,
.mobx-panzoom .mobx-item {
	cursor: move; /* fallback if grab cursor is unsupported */
	cursor: grab;
	cursor: -webkit-grab;
}
.mobx-dragging .mobx-item * {
	cursor: grabbing;
	cursor: -webkit-grabbing;
}
.mobx-img,
.mobx-html,
.mobx-video,
.mobx-iframe,
.mobx-error {
	position: absolute;
	display: block;
	height: 0;
	width: 0;
	max-width: none;
	padding: 0;
	margin: 0;
	opacity: 0;
	will-change: opacity;
	visibility: hidden;
	-webkit-tap-highlight-color: transparent;
	-webkit-touch-callout: none;
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
	transform: translate3d(0,0,0);
	-webkit-transition: opacity 0.35s ease;
	transition: opacity 0.35s ease;
}
.mobx-media-loaded {
	opacity: 1;
	visibility: visible;
}
.mobx-error,
.mobx-html-inner {
	top: 50%;
	-webkit-transform: translateY(-50%);
	transform: translateY(-50%);
}
.mobx-error {
	width: 100%;
	height: auto;
	padding: 20px 60px;
	color: #bbbbbb;
	pointer-events: none;
	text-align: center;
}
.mobx-html {
	pointer-events: none;
}
.mobx-html-inner {
	position: relative;
	display: inline-block;
	overflow: auto;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 100%;
	margin: 0 auto;
	pointer-events: auto;
}

/* ============================================================
   05. Counter
/* ============================================================ */

.mobx-holder .mobx-counter {
	position: relative;
	display: inline-block;
	float: left;
	height: 44px;
	font-size: 13px;
	line-height: 44px;
	color: #ffffff;
	opacity: 0.75;
	margin: 0 10px;
	letter-spacing: 0.6px;
}
.mobx-rtl .mobx-counter {
	float: right;
}

/* ============================================================
   06. Loader
/* ============================================================ */

.mobx-holder .mobx-loader {
	position: absolute;
	width: 30px;
	height: 30px;
	top: 50%;
	left: 50%;
	margin: -15px 0 0 -15px;
	outline: 1px solid transparent;
	border-radius: 50%;
	border-width: 3px;
	border-right-style: solid;
	border-top-style: solid;
	border-bottom-style: solid;
	border-color: rgba(255,255,255,.2);
	border-left: 3px solid #fff;
	-webkit-animation: mobx-load 1.1s infinite linear;
	animation: mobx-load 1.1s infinite linear;
}
@-webkit-keyframes mobx-load {
  0% {
	-webkit-transform: rotate(0deg);
	transform: rotate(0deg);
  }
  100% {
	-webkit-transform: rotate(360deg);
	transform: rotate(360deg);
  }
}
@keyframes mobx-load {
  0% {
	-webkit-transform: rotate(0deg);
	transform: rotate(0deg);
  }
  100% {
	-webkit-transform: rotate(360deg);
	transform: rotate(360deg);
  }
}

/* ============================================================
   07. Buttons
/* ============================================================ */

.mobx-ui button {
	position: relative;
	display: inline-block;
	width: 40px;
	height: 40px;
	padding: 0;
	cursor: pointer;
	box-shadow: none;
	border: none;
	border-radius: 0;
	outline: none;
	background-repeat: no-repeat;
	background-image: url(../icons/modulobox.svg);
	background-color: transparent;
	-ms-touch-action: manipulation;
	touch-action: manipulation;
	-webkit-appearance: none;
	-webkit-transition: opacity 0.25s ease-in-out;
	transition: opacity 0.25s ease-in-out;
}
.mobx-ui button:hover {
	opacity: 1;
}
.mobx-top-bar button {
	float: right;
	margin: 2px;
	opacity: 0.75;
}
.mobx-top-bar * {
	color: #ffffff;
}
.mobx-rtl .mobx-top-bar button {
	float: left;
}
button.mobx-prev,
button.mobx-next {
	position: absolute;
	left: 0;
	top: 50%;
	width: 44px;
	height: 32px;
	margin: 0 6px;
	opacity: 0.75;
	background-color: rgba(0,0,0,0.4);
	will-change: transform;
	-webkit-transform: translateX(0) translateY(-50%);
	transform: translateX(0) translateY(-50%);
	-webkit-transition: opacity 0.25s ease-in-out, -webkit-transform 0.25s ease-in-out;
	transition: opacity 0.25s ease-in-out, transform 0.25s ease-in-out;
}
button.mobx-next {
	left: auto;
	right: 0;
}
.mobx-idle .mobx-prev,
.mobx-will-close .mobx-prev,
.mobx-holder:not(.mobx-open) .mobx-prev {
	-webkit-transform: translateX(-120%) translateY(-50%);
	transform: translateX(-120%) translateY(-50%);
}
.mobx-idle .mobx-next,
.mobx-will-close .mobx-next,
.mobx-holder:not(.mobx-open) .mobx-next {
	-webkit-transform: translateX(120%) translateY(-50%);
	transform: translateX(120%) translateY(-50%);
}
button.mobx-prev {
	left: 0;
	background-position: 10px 4px;
}
button.mobx-next {
	right: 0;
	background-position: 10px -40px;
}
button.mobx-close {
	background-position: 12px -76px;
}

/* ============================================================
   08. Gallery
/* ============================================================ */

.mobx-gallery,
.mobx-gallery * {
	box-sizing: border-box;
}
.mobx-gallery {
	position: relative;
	display: block;
	overflow: hidden;
}
.mobx-gallery figure {
	position: relative;
	display: inline-block;
	overflow: hidden;
	float: left;
	margin: 0;
	width: 25%;
}
.mobx-gallery figure img {
	display: block;
	height: 100% !important;
	width: 100% !important;
	margin: 0 !important;
	border-radius: 0;
	object-fit: cover;
	will-change: transform;
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
	-webkit-transition: transform 0.3s ease-in-out;
	transition: transform 0.3s ease-in-out;
}
.mobx-gallery figure:hover img {
	-webkit-transform: scale(1.05);
	transform: scale(1.05);
}
.mobx-gallery figure figcaption {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	min-height: 40px;
	margin: 0;
	padding: 10px 10px 8px;
	font-size: 13px;
	font-weight: 400;
	line-height: 18px;
	background: -webkit-gradient(linear, left top, left bottom, from(transparent), to(rgba(0,0,0,0.6)));
	background: -webkit-linear-gradient(top, transparent 0%, rgba(0,0,0,0.6) 100%);
	background: -moz-linear-gradient(top, transparent 0%, rgba(0,0,0,0.6) 100%);
	background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.6) 100%);
	color: #ffffff;
	opacity: 0;
	pointer-events: none;
	will-change: opacity, transform;
	-webkit-transform: translateY(100%);
	transform: translateY(100%);
	-webkit-transition: opacity 0.25s, -webkit-transform 0.25s ease-out;
	transition: opacity 0.25s, transform 0.25s ease-out;
}
.mobx-gallery figure figcaption a {
	pointer-events: auto;
}
.mobx-gallery figure figcaption.hide {
	display: none;
}
.mobx-gallery figure:hover figcaption {
	opacity: 1;
	-webkit-transform: translateY(0);
	transform: translateY(0);
}
.mobx-gallery figure .mobx-gallery-play {
	position: absolute;
	content: "";
	left: 50%;
	top: 50%;
	height: 50%;
	width: 50%;
	-webkit-transform-origin: 0 0;
	transform-origin: 0 0;
	-webkit-transform: translateX(-50%) translateY(-50%);
	transform: translateX(-50%) translateY(-50%);
	-webkit-transition: -webkit-transform 0.15s ease-in-out, opacity 0.15s ease-in-out;
	transition: transform 0.15s ease-in-out, opacity 0.15s ease-in-out;
}
.mobx-gallery figure:hover .mobx-gallery-play {
	opacity: 0;
	-webkit-transform: scale(0.8) translateX(-50%) translateY(-50%);
	transform: scale(0.8) translateX(-50%) translateY(-50%);
}
.mobx-gallery figure .mobx-gallery-play svg {
	position: absolute;
	left: 50%;
	top: 50%;
	max-height: 90px;
	max-width: 90px;
	-webkit-transform: translateX(-50%) translateY(-50%);
	transform: translateX(-50%) translateY(-50%);
}

/* ============================================================
   09. Media Queries
/* ============================================================ */

@media screen and (max-width: 400px) {
	.mobx-timer {
		margin: 10px 0;
	}
	.mobx-top-bar button {
		margin: 2px 0;
	}
}
@media screen and (max-width: 360px) {
	.mobx-counter {
		margin: 0 6px 0 4px;
	}
	.mobx-top-bar button {
		width: 34px;
	}
	.mobx-top-bar button svg {
    	padding: 9px;
	}
}
@media
only screen and (-webkit-min-device-pixel-ratio: 2)   and (max-width: 380px),
only screen and (   min--moz-device-pixel-ratio: 2)   and (max-width: 380px),
only screen and (     -o-min-device-pixel-ratio: 2/1) and (max-width: 380px),
only screen and (        min-device-pixel-ratio: 2)   and (max-width: 380px) { 
	.mobx-top-bar button {
		width: 40px;
	}
}