/*!
 * Cartonbox v1.5.4 by Maxim Sofronov <imaxsof@gmail.com>
 * Correct modal windows
 * Demo: https://constlab.github.io/cartonbox/
 * License: MIT
 */


/* Back */

.cartonbox-back {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.7);
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
    -webkit-tap-highlight-color: transparent;
}




/* Preloader */

.cartonbox-preloader {
    display: none;
    position: fixed;
    z-index: 10002;
    box-sizing: border-box;
    width: 25px;
    height: 25px;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    border: 1px solid #999;
    border-bottom-color: rgba(255, 255, 255, 0);
    border-left-color: rgba(255, 255, 255, 0);
    margin: -13px 0 0 -13px;
    -webkit-animation: preloader 0.5s infinite linear;
    animation: preloader 0.5s infinite linear;
}

@-webkit-keyframes preloader {
    0% {
        -webkit-transform: rotate(0deg);
        transform: rotate(0deg);
    }
    100% {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

@keyframes preloader {
    0% {
        -webkit-transform: rotate(0deg);
        transform: rotate(0deg);
    }
    100% {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}




/* Wrapper */

.cartonbox-wrap {
    max-width: 480px;
    box-sizing: border-box;
    padding: 0 15px;
    margin: auto;
    display: none;
    z-index: 10001;
    position: relative;
}

.cartonbox-flex {
    min-height: 100vh;
    box-sizing: border-box;
    padding: 25px 0;
    display: -ms-flexbox;
    display: -webkit-box;
    display: flex;
    -ms-flex-direction: column;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    flex-direction: column;
}

.cartonbox-item {
    -ms-flex: 1 0 auto;
    -webkit-box-flex: 1;
    flex: 1 0 auto;
    display: -ms-flexbox;
    display: -webkit-box;
    display: flex;
    -ms-flex-pack: center;
    -webkit-box-pack: center;
    justify-content: center;
    -ms-flex-align: center;
    -webkit-box-align: center;
    align-items: center;
    -ms-flex-line-pack: center;
    align-content: center;
}




/* Content */

.cartonbox-container {
    background: #fff;
    padding: 15px 50px;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}




/* Iframe */

.cartonbox-iframe .cartonbox-container {
    padding: 0;
    line-height: 0;
}

.cartonbox-iframe .cartonbox-container iframe {
    width: 100%;
    height: 500px;
}




/* Img */

.cartonbox-img .cartonbox-container {
    padding: 0;
    line-height: 0;
}




/* Caption */

.cartonbox-caption {
    background: #fff;
    padding: 40px 50px;
}

.cartonbox-caption-text {
    line-height: 20px;
    max-width: 520px;
    margin: auto;
}




/* Nav */

.cartonbox-nav {
    box-sizing: border-box;
    height: 33px;
    padding-top: 25px;
    display: none;
    text-align: center;
    font-size: 0;
    line-height: 0;
}




/* Dotted */

.cartonbox-nav-dotted {
    display: inline-block;
    margin: -5px 0 0;
    padding: 0;
    text-align: center;
    white-space: nowrap;
}

.cartonbox-nav-dotted li {
    margin: 0;
    list-style: none;
    display: inline-block;
    padding: 5px;
    position: relative;
}

.cartonbox-nav-dotted a {
    display: block;
    box-sizing: border-box;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px #999;
    width: 8px;
    height: 8px;
    -webkit-transition: 0.2s;
    transition: 0.2s;
    border: 0;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
    -webkit-tap-highlight-color: transparent;
}

.cartonbox-nav-dotted a:before {
    position: absolute;
    content: "";
    top: -20px;
    bottom: -20px;
    left: 0;
    right: 0;
}

.cartonbox-nav-dotted a:hover {
    box-shadow: inset 0 0 0 1px #fff;
}

.cartonbox-nav-dotted .active a {
    box-shadow: inset 0 0 0 4px #fff;
    cursor: default;
}




/* Close */

.cartonbox-close {
    display: none;
    position: fixed;
    z-index: 10004;
    top: 0;
    right: 0;
    padding: 25px;
    width: 75px;
    height: 75px;
    cursor: pointer;
    box-sizing: border-box;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
    -webkit-tap-highlight-color: transparent;
}

.cartonbox-close svg {
    width: 25px;
    height: 25px;
    display: block;
    fill: #999;
    -webkit-transition: 0.2s;
    transition: 0.2s;
}

.cartonbox-close:hover svg {
    fill: #fff;
}




/* Arrows */

.cartonbox-prev,
.cartonbox-next {
    position: fixed;
    z-index: 10003;
    top: 0;
    left: 0;
    bottom: 0;
    width: 75px;
    cursor: pointer;
    box-sizing: border-box;
    display: none;
}

.cartonbox-next {
    left: auto;
    right: 0;
}

.cartonbox-prev a,
.cartonbox-next a {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 0;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
    -webkit-tap-highlight-color: transparent;
}

.cartonbox-prev svg,
.cartonbox-next svg {
    margin: -28px 25px 0;
    display: block;
    content: "";
    height: 55px;
    width: 25px;
    position: absolute;
    top: 50%;
    left: 0;
    fill: #999;
    -webkit-transition: 0.2s;
    transition: 0.2s;
}

.cartonbox-prev a:hover svg,
.cartonbox-next a:hover svg {
    fill: #fff;
}




/* CartonBox Custom */

.cartonbox-body {
    -webkit-transition: -webkit-filter 0.2s;
    -webkit-transition: -webkit-filter 0.2s;
    transition: -webkit-filter 0.2s;
    transition: filter 0.2s;
    transition: filter 0.2s, -webkit-filter 0.2s;
    overflow-x: hidden;
}

.cartonbox-go {
    -webkit-filter: blur(1px);
    filter: blur(1px);
}

.cartonbox-up .cartonbox-wrap {
    -webkit-transition: -webkit-transform 0.2s;
    -webkit-transition: -webkit-transform 0.2s;
    transition: -webkit-transform 0.2s;
    transition: transform 0.2s;
    transition: transform 0.2s, -webkit-transform 0.2s;
    -webkit-transform: translate3d(0, -200px, 0);
    transform: translate3d(0, -200px, 0);
}

.cartonbox-up .cartonbox-close,
.cartonbox-up .cartonbox-prev,
.cartonbox-up .cartonbox-next,
.cartonbox-up .cartonbox-nav,
.cartonbox-zoom-start .cartonbox-close,
.cartonbox-zoom-start .cartonbox-prev,
.cartonbox-zoom-start .cartonbox-next,
.cartonbox-zoom-start .cartonbox-nav {
    opacity: 0;
}

.cartonbox-zoom-start .cartonbox-wrap {
    -webkit-transition: -webkit-transform 0.2s;
    -webkit-transition: -webkit-transform 0.2s;
    transition: -webkit-transform 0.2s;
    transition: transform 0.2s;
    transition: transform 0.2s, -webkit-transform 0.2s;
    -webkit-transform: scale3d(0.8, 0.8, 1);
    transform: scale3d(0.8, 0.8, 1);
}

.cartonbox-zoom-finish .cartonbox-wrap {
    -webkit-transform: scale3d(1, 1, 1);
    transform: scale3d(1, 1, 1);
}