body, html {
    width: 100%;
    height: 100%;
    background: #EFEFEF;
    overflow: hidden;
}

.drawer {
    background: #E4E4E4;
    width: 30%;
    max-width: 300px;
    min-width: 200px;
    padding: 0;
    height: calc(100% - 45px);
    position: absolute;
    left: -100%;
    top: 0;
    transition: 0.8s all;
}

.thumbs-list .row {
    margin-bottom: 20px;
}

.thumbs-list .row:last-of-type {
    margin-bottom: 0;
}

.thumbs-list .thumb {
    -moz-box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.09);
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.09);
    position: relative;
    display: block;
    height: 0;
    padding: 0;
    overflow: hidden;
}

.thumbs-list .thumb .info {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 10;
    width: 100%;
    height: 100%;
    text-align: center;
    line-height: 100%;
    background: rgba(1, 124, 142, 0.74);
    display: none;
    color: #fff;
}

.thumbs-list .thumb .info p {
    background: rgba(0, 0, 0, 0.8);
    position: absolute;
    left: 0;
    bottom: 0;
    margin: 0;
    padding: 10px 13px;
    border-radius: 0 10px 0 0;
}

.thumbs-list .thumb.active .info {
    display: block;
}

.thumbs-list img {
    width: 100%;
    height: 100%;
    cursor: pointer;
    position: absolute;
    left: 0;
    top: 0;
}

.form {
    min-width: 300px;
    background: #E4E4E4;
    left: auto;
    right: -100%;
}

.drawer.thumbs-list.open {
    left: 0 !important;
}

.drawer.form.open {
    right: 0 !important;
}

.hide-btn {
    background: #E4E4E4;
    border: none;
    color: #C7C7C7;
    border-radius: 0 100px 100px 0;
    position: absolute;
    left: 100%;
    top: 50%;
    font-size: 18px;
    width: 46px;
    line-height: 46px;
    padding: 0;
    margin-left: -15px;
}

.form .hide-btn {
    left: 0;
    margin-left: -31px;
    border-radius: 100px 0 0 100px;
}

.form h2 {
    font-size: 24px;
    margin: 0 0 20px 0;
}

.form .alert {
    padding: 10px 15px;
}

.form .bcms-form-row .alert {
    margin: 5px 0 0 0;
}

.form .alert.alert-success {
    background-color: #3b8742;
    color: #fff;
    border-color: #307236;
}

.bcms-form-row {
    padding: 0 0 10px 0;
}

.bcms-form-row.form-fn-input input.has-error,
.bcms-form-row textarea.has-error {
    background: #f5eae9;
    border: 1px solid #e49696;
}

.bcms-form-row.form-fn-input input,
.bcms-form-row textarea {
    font-size: 12px;
}

.bcms-form-row.form-fn-submit {
    margin-top: 10px;
}

.form {
    font-size: 12px;
}

.drawer-scroll {
    overflow: auto;
    width: 100%;
    height: 100%;
    padding: 25px 25px;
}

/* @group MENU TOOLBAR */
.menu {
    position: fixed;
    z-index: 10;
    left: 0;
    bottom: 0;
    min-height: 45px;
    width: 100%;
    background: #1F1F1F;
    -moz-box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.28);
    box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.28);
}

.menu .brand {
    float: left;
}

.menu .btn {
    background: transparent;
    border: none;
    border-radius: 0;
    color: #D3D3D3;
    line-height: 20px;
    padding: 13px 16px;
    margin: 0;
    float: left;
    font-size: 13px;
    transition: 0.3s all;
}

.menu .btn .fa {
    font-size: 14px;
}

.menu .btn:hover {
    color: #fff;
    background: #000;
}

.menu .btn.active {
    background-color: #02889b;
    color: #fff;
    box-shadow: none;
    border-color: rgba(0, 0, 0, 0);
}

.menu .magnify-settings button {
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-left .btn {
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.menu .menu-left {
    float: left;
}

.menu .menu-right {
    float: right;
}

.menu-right .btn {
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.menu .menu-center {
    margin: 0 auto;
    overflow: auto;
    text-align: center;
}

.menu .btn.btn-warning {
    color: #faca58;
}

.menu .btn.btn-danger {
    color: #f76767;
}

.menu .btn.btn-success {
    color: #19c86d;
}

.menu .btn.btn-primary {
    color: #20baf6;
}

.popover .popover-content {
    font-size: 12px;
}

.menu-center .btn {
    float: none;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    display: inline-block;
}

.menu-center .btn-pages {
    min-width: 150px;
}

.menu-center .btn-pages em {
    font-style: normal;
}

.menu-center .btn-pages span {
    color: #5d5d5d;
}

.menu-center .btn.nav-prev {
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-center .btn.nav-btn .fa {
    font-size: 24px;
    line-height: 20px;
    float: left;
}

.menu-center .btn-pages .fa-list {
    margin-right: 10px;
    font-size: 16px;
    float: left;
    line-height: 20px;
}

.menu-center .btn-pages .fa-caret-down {
    margin-left: 8px;
}

.btn-paging-wrapper {
    display: inline-block;
    position: relative;
}

.page-select {
    width: 100%;
    text-align: left;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 10;
    display: none;
}

.menu-center .select2-choice {
    height: 45px;
    background: #fff !important;
    border: none;
}

.menu-center .select2-choice .select2-chosen {
    line-height: 45px;
    font-weight: bold;
    font-size: 12px;
}

.menu-center .select2-choice .select2-arrow {
    background: #fff;
    border: none;
}

.menu-center .select2-choice .select2-arrow b {
    background-position: left 8px;
}

/* @end */

/* @group PAGEs */

.pages {
    width: 50%;
    position: absolute;
    left: 30px;
    top: 30px;
    z-index: 10;
}

.pages[data-scale] .page-pair{
    overflow: scroll;
}

.pages[data-scale] .page-pair::-webkit-scrollbar{
    display: none;
}

.pages.ani {
    transition: 0.3s all;
}

.pages.js-zoom {
    cursor: grab;
    overflow: auto;
}

.pages.js-zoom .page-img::after {
    display: none;
}

.pages .page-nav {
    position: absolute;
    background: transparent;
    border: none;
    font-size: 34px;
    color: #CBCBCB;
    height: 100%;
    right: 100%;
    padding-right: 40px;
    margin-right: -20px;
    top: 0;
    transition: 0.3s all;
}

.pages .page-nav:hover {
    color: #000;
}

.pages .page-nav.disabled {
    color: #e5e5e5;
}

.pages .page-nav.page-next {
    right: auto;
    left: 100%;
    padding-left: 40px;
    margin-left: -20px;
}

.page-pair {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: none;
    -webkit-perspective-origin: 50% 50%;
    -webkit-perspective: 1000px;
    -moz-perspective-origin: 50% 50%;
    -moz-perspective: 1000px;
    perspective-origin: 50% 50%;
    perspective: 1500px;
    z-index: 10;
    transition: 0.2s all;
}

.page {
    width: 50%;
    float: left;
    -webkit-transform: rotateY(0deg);
    -moz-transform: rotateY(0deg);
    transform: rotateY(0deg);
    -webkit-transform-origin: 0 0;
    -webkit-transition: 0.2s all;
    -moz-transform-origin: 0 0;
    -moz-transition: 0.2s all;
    transform-origin: 0 0;
    transition: 0.2s all;
}

.page .page-no {
    font-size: 11px;
    color: #b7b7b7;
    display: block;
    padding: 8px 0 5px;
}

.page-1 .page-no {
    text-align: right;
}

.page-1 {
    float: right;
}

.page-0 {
    -webkit-transform-origin: 100% 0;
    -moz-transform-origin: 100% 0;
    transform-origin: 100% 0;
}

.rotate-90 {
    -webkit-transform: rotateY(-90deg);
    -moz-transform: rotateY(-90deg);
    transform: rotateY(-90deg);
}

.rotate90 {
    -webkit-transform: rotateY(90deg);
    -moz-transform: rotateY(90deg);
    transform: rotateY(90deg);
}

.page-img {
    width: 100%;
    /*overflow: hidden;*/
    position: relative;
    -moz-box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.16);
    box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.16);
}

.page-img::after {
    content: "";
    height: 100%;
    width: 6%;
    position: absolute;
    left: 0;
    top: 0;
    background-image: -webkit-linear-gradient(right, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.13) 100%);
    background-image: -moz-linear-gradient(right, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.13) 100%);
    background-image: -ms-linear-gradient(right, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.13) 100%);
    background-image: linear-gradient(to left, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.13) 100%);
}

.page-0 .page-img::after {
    left: auto;
    right: 0;
    background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.13) 100%);
    background-image: -moz-linear-gradient(left, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.13) 100%);
    background-image: -ms-linear-gradient(left, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.13) 100%);
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.13) 100%);
}

.page img {
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
}

.page::after {
    content: "";
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    background: url(/admin/elementi/loading.gif) no-repeat center;
    background-size: 16px;
    z-index: 1;
}

.page.loaded::after, .page-pair.loaded .page::after {
    display: none;
}

.loupe {
    z-index: 1000;
    border: 1px solid #dfdfdf;
    -moz-box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.13);
    box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.13);
}

.loupe-disabled .loupe {
    display: none !important;
}

/* @end */

@media (max-width: 767px) {
    select,
    textarea,
    input {
        font-size: 16px !important;
    }

    .loupe {
        display: none !important;
    }

    .pages {
        height: auto !important;
    }

    .menu {
        position: fixed;
        bottom: auto;
        top: 0;
        z-index: 1002;
    }

    body, html {
        height: auto;
        width: 100%;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .drawer {
        position: fixed;
        width: 100%;
        max-width: 100%;
        margin-top: 45px;
        z-index: 1001;
        display: none;
    }

    .drawer.open {
        display: block;
    }

    .pages {
        width: 100% !important;
        position: relative;
        left: 0 !important;
        top: 0 !important;
        z-index: 0;
        padding: 65px 20px;
        overflow: auto;
    }

    .page-pair {
        position: relative;
        left: auto;
        top: auto;
        float: left;
        clear: both;
        width: 100%;
        display: block;
    }

    .page-nav {
        display: none;
    }

    .page-pair .page-img::after {
        display: none;
    }

    .page-pair .page {
        width: 100%;
    }

    .page-1 .page-no {
        text-align: left;
        padding-bottom: 15px;
    }

    .mobile-menu-btn {
        background: transparent;
        color: #fff;
        border: none;
        font-size: 18px;
        position: absolute;
        right: 0;
        line-height: 26px;
        top: -45px;
        padding: 9px 15px 10px;
        border-left: 1px solid rgba(255, 255, 255, 0.1);
    }

    .mobile-menu-drawer {
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        float: left;
        width: 100%;
        display: none;
    }

    .menu-center {
        float: left;
    }

    .mobile-menu-drawer > div {
        float: left;
        width: 100% !important;
        display: block;
    }

    .mobile-menu-drawer .btn {
        float: none;
        display: block;
        text-align: left;
        border: none;
        width: 100%;
    }

    .mobile-menu {
        float: left;
        width: 100%;
        position: relative;
    }

    .page-select {
        position: fixed;
        width: 100%;
    }
}