/*
 FoxScanner

 written by Valéry Febvre
 vfebvre@aester-eggs.com

 Copyright 2015 Valéry Febvre

 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU Affero General Public License as
 published by the Free Software Foundation, either version 3 of the
 License, or (at your option) any later version.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU Affero General Public License for more details.

 You should have received a copy of the GNU Affero General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

* {
    font-family: FiraSans, sans-serif;
}

.button {
    border-radius: 3px !important;
}

section[role="region"] header h2 {
    padding: 0.8rem 1.5rem;
}
section[role="region"] > header:first-child button {
    font-style: normal;
}

.picture-container {
    padding-bottom: 5.5rem;
}

#activity-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
}

#documents [data-type="list"] li p {
    padding-left: 0;
}
#documents [data-type="list"] aside img {
    border-radius: 0;
}
#documents [data-type="list"] li p:last-of-type {
    font-size: 1rem;
}
#documents .counter {
    display: inline;
    padding: 0.2em 0.4em;
    font-weight: 700;
    line-height: 1;
    color: #FFF;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25em;
    background-color: #ccc;
}

#cropper .content {
    padding: 20px;
}
#cropper [role="toolbar"] {
    z-index: 1000;
}

#enhancer .content {
    height: calc(100% - 4rem);
    top: 4rem;
}

#document hr {
    border: 0px none;
    height: 1px;
    background: -moz-linear-gradient(left center , #ccc, #333, #ccc) repeat scroll 0% 0% #333;
}

/*
 * Jcrop
 * customize handles look in picture cropper
 */
.jcrop-handle.ord-n, .jcrop-handle.ord-s {
    width: 40px !important;
    margin-left: -22px !important; /* 20 + 2 */
    border-radius: 4px;
}
.jcrop-handle.ord-w, .jcrop-handle.ord-e {
    height: 40px !important;
    margin-top: -22px !important;
    border-radius: 4px;
}
.jcrop-handle.ord-nw, .jcrop-handle.ord-ne, .jcrop-handle.ord-se, .jcrop-handle.ord-sw {
    width: 40px !important;
    height: 40px !important;
    border-radius: 20px;
}
.jcrop-handle.ord-nw {
    margin-top: -22px !important;
    margin-left: -22px !important;
}
.jcrop-handle.ord-ne {
    margin-top: -22px !important;
    margin-right: -22px !important;
}
.jcrop-handle.ord-sw {
    margin-bottom: -22px !important;
    margin-left: -22px !important;
}
.jcrop-handle.ord-se {
    margin-bottom: -22px !important;
    margin-right: -22px !important;
}

/*
 * Enhancer panel: contrast, brightness, threshold
 */
.enhancer-equalizer-panel {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    margin: 0;
    padding-bottom: 55px;
    transform: translateY(100%);
}
.enhancer-equalizer-panel header h2 {
    text-align: right;
    background-color: inherit !important;
    color: #fff !important;
}
.enhancer-equalizer-panel [role="slider"] > div {
    padding: 0 1rem;
}
.enhancer-equalizer-panel [role="slider"] > label:first-of-type {
    width: 6.6rem;
    padding: 0 0 0 1rem;
}
.enhancer-equalizer-panel [role="slider"] > label:last-of-type {
    width: 4.5rem;
    padding: 0;
}
.enhancer-equalizer-panel [role="slider"] > label a {
    padding: 0.5rem;
    color: white;
}
.enhancer-equalizer-panel [role="slider"] > label a:active {
    color: #00aacb;
}
.enhancer-equalizer-panel [role="slider"] > label:first-of-type a:last-of-type {
    margin-left: 0.5rem;
}

.enhancer-equalizer-panel input[type="range"] {
    background: inherit;
    border: none;
    padding-top: 0;
}
.enhancer-equalizer-panel.currentToBottom {
    animation: currentToBottom 0.25s forwards;
}
@keyframes currentToBottom {
    0% { transform: translateY(0); }
    100% { transform: translateY(100%); }
}
.enhancer-equalizer-panel.bottomToCurrent {
    animation: bottomToCurrent 0.25s forwards;
}
@keyframes bottomToCurrent {
    0% { transform: translateY(100%); }
    100% { transform: translateY(0); }
}

/*
 * Toolbars
 */
[role="toolbar"] {
    position: fixed;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.85);
    border-top: none;
}
[role="toolbar"] span {
    flex: 1;
    position: relative;
}

.toolbar-top {
    top: 0;
}
.toolbar-top button {
    font-size: 12px;
}

/* adjust color, size and position of icomoon icons in toolbars */
[role="toolbar"] button {
    color: white;
}
[class^="icon-"], [class*=" icon-"] {
    font-size: 2.5rem !important;
}

/*
 * Pages animations
 */
[data-position="right"] {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    transform: translateX(100%);
    -webkit-transform: translateX(100%);
}

[data-position="left"] {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    transform: translateX(-100%);
    -webkit-transform: translateX(-100%);
}

.leftToCurrent {
    animation: leftToCurrent 0.4s forwards;
    -webkit-animation: leftToCurrent 0.4s forwards;
}
.currentToLeft {
    animation: currentToLeft 0.4s forwards;
    -webkit-animation: leftToCurrent 0.4s forwards;
}
.rightToCurrent {
    animation: rightToCurrent 0.4s forwards;
    -webkit-animation: leftToCurrent 0.4s forwards;
}
.currentToRight {
    animation: currentToRight 0.4s forwards;
    -webkit-animation: leftToCurrent 0.4s forwards;
}
.show {
    animation: show 0.4s forwards;
    -webkit-animation: show 0.4s forwards;
}
.hide {
    animation: hide 0.4s forwards;
    -webkit-animation: hide 0.4s forwards;
}
