/***** ELEMENTS *****/

* {
    margin: 0;
    padding: 0;

    -webkit-user-drag: none;
    user-drag: none;

    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -o-user-select: none;
    user-select: none;
}

/* MOVED TO global.css
form input,
form textarea,
form .trumbowyg-editor {
    -webkit-touch-callout: text;
    -webkit-user-select: text;
    -khtml-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    -o-user-select: text;
    user-select: text;
}
*/

#viewer ul,
#viewer ol {
    padding-left: 1.5em;
}

/***** VIEWER *****/

#viewerPlate,
#viewer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    display: none;
    overflow: hidden;
    box-sizing: border-box;
    background-repeat: no-repeat;
    background-position: 50% calc(45px + (100% - 45px) / 2);
    text-align: center;
    z-index: 900;
}

#viewerPlate {
    background-color: black;  
}

#viewer img {
    border: none;
    cursor: pointer;
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
    position: relative;
    max-width: 100% !important;
    max-height: 100% !important;
}

/***** VIEWER: BUTTONS & COUNTER *****/

#viewer .material-icons {
    position: absolute;
    font-size: 110%;
    opacity: 0.8;
    cursor: pointer;
    text-decoration: none !important;
}
#viewer .material-icons:hover {
    opacity: 1;
}

#arrowPrev,
#arrowNext {
    min-width: 20vw;
    min-height: 50vh;

    line-height: 50vh;
    margin-top: -25vh;
    padding: 0 1vw;
    position: absolute;
    text-align: center;
    text-decoration: none;
    top: calc(50% + 26.25px);

    font-size: 200% !important;
}
#arrowPrev {
    left: 0;
    text-align: left;
}
#arrowNext {
    right: 0;
    text-align: right;
}

#backClose {
    top: 12px;
    right: 18px;
}
#itemDelete {
    top: 12px;
    color: #f00;
}

#counter {
    position: absolute;
    top: 18px;
    left: 50%;
    width: 60px;
    margin-left: -30px;
    font-size: 50%;
    cursor: default;
    text-align: center;
}

/***** VIEWER: CAPTION *****/

#imageCaption {
    cursor: default;
    position: fixed;
    top: 18px;
    overflow: hidden;
    box-sizing: border-box;
    font-size: 50%;
    font-weight: normal;
    text-align: left;
    white-space: nowrap;
}
#imageCaption:empty {
    display: none;  
}

/***** VIEWER: IMAGE INFO *****/

#imageInfo {
    position: fixed;
    top: 0;
    bottom: 0;
    height: 100%;
    box-sizing: border-box;
    border-width: 0;
    border-right-width: 1px;
    border-style: solid;
    overflow: hidden;
    text-align: left;
}
#imageInfo,
#imageInfo * {
    -webkit-touch-callout: text;
    -webkit-user-select: text;
    -khtml-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    -o-user-select: text;
    user-select: text;  
}

#imageInfo div.scroll-wrapper {
    width: calc(100% + 17px);
    height: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: scroll !important;
}
#imageInfo div.hide-header {
    position: absolute;
    box-sizing: border-box;
    top: 0;
    left: 0;
    height: 60px;
    padding: 12px 12px;
    text-align: right;
}
#imageInfo div.hide-footer {
    position: absolute;
    box-sizing: border-box;
    bottom: 0;
    left: 0;
    height: 60px;
}

#infoText {
    font-size: 50%;
    padding: 65px 15px 65px 15px;
    box-sizing: border-box;
}

a#infoOpen {
    top: 12px;
    left: 18px;
}
a#infoClose {
    position: relative !important;
}
a#infoOpen:hover,
a#infoClose:hover {
    text-decoration: none;
}
body.login a#infoOpen {
    color: #0f0;
}

/***** VIEWER: IMAGE INFO - EDIT FORM *****/

#infoText label.header {
    display: block;
    margin-top: 15px;
    font-weight: bold;
}
#infoText input[type=text],
#infoText select,
#infoText textarea {
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
    padding: 2px 5px;
    font: inherit;
}
#infoText input[type=submit] {
    padding: 7px 12px;
    border: 1px solid #a9a9a9;
    background-color: #fff;
    font-family: inherit;
    font-size: inherit;
}
#infoText textarea {
    min-height: 200px;
    max-height: 400px;
    height: 30vh;
}

#infoStats {
    margin-top: 40px;
    padding-top: 10px;
    border-top-width: 1px;
    border-top-style: solid;
    font-size: 90%;
    line-height: 1.5em;
}
#infoStats .value {
    float: right;
}
#infoStats:empty {
    display: none;
}

/***** STATS CADRE *****/

.stats {
    background-color: rgba(0, 0, 0, 0.8);
    border: 1px solid #333;
    bottom: 20px;
    font-size: 40%;
    right: 15px;
    padding: 15px 15px 45px;
    position: absolute;
    text-align: left;
    color: #fff;
    z-index: 999;
}
.stats .itemEdit {
    right: 60px;
    bottom: 10px;
}
.stats .itemDelete {
    right: 15px;
    bottom: 10px;
}

.itemEdit,
.itemDelete {
    background-color: rgba(30, 30, 30, 0.8);
    border: 1px solid #333;
    cursor: pointer;
    font-size: 50%;
    position: absolute;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    padding: 3px 7px;
}
.itemEdit {
    color: #0c0 !important;
}
.itemDelete {
    color: #f00 !important;
}
.itemEdit:after {
    content: "edit";
}
.itemDelete:after {
    content: "delete";
}

body.point .itemEdit:hover,
body.point .itemDelete:hover {
    background-color: rgba(45, 45, 45, 0.8);
    border-color: #555;
}

/***** SPECIFICS *****/

.valignHelper {
    display: inline-block;
    height: 100%;
    vertical-align: middle;
}

/***** RESPONSIVE: SMALL/MINIMUM *****/

@media screen and (max-width:599px) {
    #viewer {
        font-size: 21px;
        padding-top: 45px;
    }
    #itemDelete {
        left: 48px;
    }
    #imageCaption {
        left: 42px;
        max-width: calc(100% - 2 * 42px);
    }
    body.login #imageCaption {
        left: 72px;
        max-width: calc(100% - 2 * 42px - 30px);
    }
}

/***** RESPONSIVE: MEDIUM/FLUID *****/

@media screen and (min-width:600px) and (max-width:1200px) {
    #viewer {
        font-size: calc(1.5vw + 12px);
        padding-top: calc(2.5vw + 30px);
    }          
    #itemDelete {
        left: calc(2vw + 36px);
    }
    #imageCaption {
        left: calc(2vw + 30px);
        max-width: calc(100% - 2 * (2vw + 30px));
    }
    body.login #imageCaption {
        left: calc(3vw + 54px);
        max-width: calc(100% - 2 * (2vw + 30px) - (3vw + 54px));
    }
}

/***** RESPONSIVE: LARGE/MAXIMUM *****/

@media screen and (min-width:1201px) {
    #viewer {
        font-size: 30px;
        padding-top: 60px;
    }
    #itemDelete {
        left: 60px;
    }
    #imageCaption {
        left: 54px;
        max-width: calc(100% - 2 * 54px);
    }
    body.login #imageCaption {
        left: 90px;
        max-width: calc(100% - 2 * 54px - 36px);
    }
}
