/*!
 * app.css : Main CSS of the application
 * 
 * Copyright 2013-2014 Mossroy and contributors
 * License GPL v3:
 * 
 * This file is part of Kiwix.
 * 
 * Kiwix is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * Kiwix 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 General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with Kiwix (file LICENSE-GPLv3.txt).  If not, see <http://www.gnu.org/licenses/>
 */

[role=region] {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    position: fixed;
    overflow: hidden;
}

[role=region] > header {
    margin-left: 1px;
    text-align: center;
}

[role=region] > header > h1 {
    margin: 0;
    text-shadow: 0 1px 1px rgba(0,0,0,.4);
}

[role=region] > .view-content {
    margin: 0;
    position: relative; /*Fixes #250 Random button display bug in W10M */
    height: 0;
}

[role=region] > footer {
    background: rgba(217,237,247,0.8);
    right: 0;
    bottom: 0;
    left: 0;
    position: fixed;
    text-align: center;
}

[role=region] > footer > menu[role=toolbar] {
    margin: 0;
    padding: 0;
}

label {
    font-weight: normal !important;
    margin-left: 20px;
}

#navigationButtons .restrictedSize {
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
}

body {
    background-color: whitesmoke !important;
}

div:not(.panel-success, .alert-message) {
    -ms-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

.dark ::-webkit-scrollbar {
    height: 10px;
}

.dark ::-webkit-scrollbar-button:start:decrement,
.dark ::-webkit-scrollbar-button:end:increment {
    height: 30px;
    background-color: transparent;
}

.dark ::-webkit-scrollbar-track-piece {
    background-color: #3b3b3b;
}

.dark ::-webkit-scrollbar-thumb:vertical {
    height: 50px;
    background-color: #666;
    border: 1px solid #eee;
}

.nopadding {
    padding-right: 1px !important;
    padding-left: 1px !important;
}

#articleList {
    margin-bottom: 12px !important;
}

#scrollbox {
    position: absolute;
}

#articleListWithHeader {
    position: absolute; 
    top: 0; 
    left: 5%;
    padding-left: 12px;
    padding-right: 12px;
    background: lightblue;
    z-index: 1;
}

#articleList a:hover, #articleList a.hover, .backgroundLightBlue {
    background: lightblue;
}

.dark #articleList a:hover, .dark #articleList a.hover {
    background: darkslategray;
}

.dark #articleListWithHeader {
    background: darkslategrey;
}

#btnHome {
    padding: 0px 1em !important;
}

.form-control:not([id^="findInArticle"]) {
    margin-top: 5px !important;
    margin-bottom: 5px !important;
    /*box-shadow: none !important;*/
}

.form-control:not([id^="archiveList"]) {
    height: 2.2em !important;
    padding: 5px 1em !important;
}

.navbar-inverse {
    background-color: #d9edf7 !important;
    border-color: #d9edf7 !important;
    margin-bottom: 0 !important;
}

.dark .form-control {
    color: lightgray;
    background: #222;
}

.articleIFrame {
    position: fixed;
    width: 100%;
    border: 0;
    transition: top 300ms;
    z-index: 0;
}

.category-padding {
    margin: 0 auto;
    max-width: 800px;
}

.apiAvailable {
    color: green;
}

.apiUnavailable {
    color: orange;
}

.loader {
    position: absolute;
    margin: 0 auto;
    left: 0;
    right: 0;
    border: 5px solid lightgrey;
    -webkit-animation: spin 1s linear infinite;
    animation: spin 1s linear infinite;
    border-top: 5px solid steelblue;
    border-radius: 50%;
    width: 50px;
    height: 50px;
}

.status {
    position: absolute;
    top: 50%;
    width: 100%;
    height: 50%;
    z-index: 1;
}

.message {
    position: absolute;
    margin: 70px auto 0;
    left: 0;
    right: 0;
    font-size: smaller;
    background: whitesmoke;
    color: dimgrey;
    border: 1px solid gainsboro;
    padding: 1px 4px;
    width: 200px;
}

.dark .message {
    background: darkslategrey;
    color: darkgrey;
    border: 1px solid dimgrey;
}

.dark code {
    background-color: lightsteelblue;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.settings {
    float: left;
    margin: 5px;
    padding: 10px;
    max-width: 500px;
    min-height: 150px;
    border: 1px solid black;
}

.navbar-header {
    float: none !important;
}

.navbar-fixed-bottom {
    background: inherit;
}

.navbar {
    min-height: 0px !important;
}

nav a.btn-primary, .input-group-addon {
    background: #d9edf7;
    border-color: #d9edf7 !important;
    margin-top: 3px;
    padding: 5px 1em !important;
}

.btn:hover, .btn:active, .btn-primary:active, .btn-primary.active {
    background: lightsteelblue !important;
    background-color: lightsteelblue !important;
}

.dark .btn-primary, .dark .btn-secondary, .dark .navbar-inverse {
    background: #222 !important;
    border-color: #222 !important;
}

.dark .btn-inline {
    background: #182828 !important;
    border-color: darkslategray !important;
}

.dark .btn:hover, .dark .btn:active, .dark .btn-primary:active, .dark .btn-primary.active {
    background: darkslategray !important;
    background-color: darkslategray !important;
}


.dark .modal-footer .btn-primary, .dark .modal-footer .btn-secondary {
    border-color: #777 !important;
}

footer .btn-xs {
    margin: 5px 5px 10px;
}

.glyphicon {
    color: darkblue;
}

.btn-sm, .btn-lg, .btn-default {
    background-color: rgba(217,237,247,0) !important;
    border: transparent !important;
    /*color: whitesmoke !important;*/
    color: darkblue !important;
    font-weight: bold !important;
}

.btn {
    z-index:initial !important;
}

.btn-danger {
    background-color: lightyellow !important;
    color: darkred !important;
}

.dark .btn-danger {
    background-color: #250000 !important;
    color: gainsboro !important;
}

.btn-danger:hover {
    background-color: red !important;
    color: lightyellow !important;
}

.dark .btn-danger:hover {
    background-color: darkred !important;
    color: lightyellow !important;
}

.darkfooter {
    background: rgba(34,34,34,0.8) !important;
}

pre {
    font-weight: bold;
}

.dropdown-menu, .dropdown-menu a {
    background: rgba(255,255,255,0.7) !important;
}

    .dropdown-menu > li > a:hover, .dropdown-menu > li > a:focus {
        background-color: #337ab7 !important;
    }

.disclaimer {
    background-color: lightyellow;
    border-left: 6px solid gold;
    padding: 10px 5px 1px 10px;
}

.dark .disclaimer {
    background: #333300;
}

.update {
    background-color: lightcyan;
    border-left: 6px solid cyan;
    padding: 10px 5px 1px 10px;
}

.dark .update {
    background: black;
    border-left: 6px solid grey;
}

.darkfooter .glyphicon, .dark .glyphicon {
    color: lightblue;
}

.modal-title {
    color: black;
    font-weight: bold;
}

.dark .modal-title {
    color: lightgray !important;
}

.modal-content.dark {
    background: #222 !important;
}

.modal-content:not(.dark) {
    background: #fff !important;
}

.dark .modal-content:not(.dark) {
    background: #333 !important;
}

.dark {
    color: lightgray !important;
    background: black !important;
    border-color: darkgray;
}

.dark .panel {
    color: lightgray !important;
    background: #222 !important;
    border-color: darkgray;
}

.dark .panel-heading {
    color: lightgray !important;
    background: #12303b !important;
    border-color: darkgray;
}

    .dark .panel-warning .panel-heading {
        background: #333300 !important;
    }


    .dark .panel-danger .panel-heading {
        background: #330000 !important;
    }

.dropdown {
    width: 100%;
    max-width: 8em;
    margin-bottom: 10px;
}

.dark .dropdown {
    color: #222 !important;
    background-color: lightblue !important;
    border-color: lightgray !important;
}

.dark .dropdown option:focus, .dark .dropdown option:hover {
    color: lightblue !important;
    background: darkslategray !important;
}

.darkfooter .dropdown-menu, .darkfooter .dropdown-menu a {
    color: lightblue !important;
    background: rgba(34,34,34,0.6) !important;
    border-color: darkgray;
}

.darkfooter .dropdown-menu a:focus, .darkfooter .dropdown-menu a:hover {
    color: lightblue !important;
    background: darkslategray !important;
}

.dark .list-group-item, .modal .dark .close {
    color: lightblue !important;
    background-color: #222;
}

.dark a.list-group-item:hover, .dark a.list-group-item:focus, .dark nav a:hover, .dark nav a:focus, .dark nav .active {
    color: lightblue !important;
    background-color: darkslategray !important;
}

.dark .btn-default, .dark .input-group-addon, .dark pre {
    background: #222 !important;
    border-color: #222 !important;
    color: lightgray !important;
    text-shadow: none;
}

.dark a {
    color: lightblue !important;
}

.darkfooter .btn-default {
    background: rgba(34,34,34,0) !important;
    color: lightblue !important;
}

.modal-full {
    width: 94% !important;
    margin: 3% !important;
}

#alert-modal {
    margin-top: 15% !important;
    margin-bottom: 15% !important;
}

#dl-panel-body::before, #dl-panel-body::after {
    content: '' !important;
}

  /*********************************/
 /******* Custom checkboxes *******/
/*********************************/

/* Hide the browser's default checkbox */
.container input[type=checkbox], .container input[type=radio] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Create a custom checkbox */
.checkmark {
    position: absolute;
    top: 0;
    left: -25px;
    height: 20px;
    width: 20px;
    background-color: whitesmoke;
    border: 2px solid #0078d7;
}

/* Style the checkmark/indicator */
.container input:checked ~ .checkmark:after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid steelblue;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.container input:indeterminate ~ .checkmark:after {
    content: "";
    position: absolute;
    top: 30%;
    left: 30%;
    width: 40%;
    height: 40%;
    background: steelblue;
}

/* Create a custom radio button */
.radiobtn {
    position: absolute;
    top: 0;
    left: -25px;
    height: 20px;
    width: 20px;
    background-color: whitesmoke;
    border-radius: 50%;
    border: 2px solid #0078d7;
}

/* Style the indicator (dot/circle) */
.container input:checked ~ .radiobtn:after {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: steelblue;
}

.panel-warning .checkmark, .panel-warning .radiobtn, .panel-warning input:checked ~ .checkmark:after, .panel-warning input:indeterminate ~ .checkmark:after {
    border-color: #a0a090;
}

.panel-warning input:checked ~ .radiobtn::after {
    background: #a0a090;
}

.panel-danger .checkmark, .panel-danger .radiobtn, .panel-danger input:checked ~ .checkmark:after, .panel-danger input:indeterminate ~ .checkmark:after {
    border-color: #c37b7a;
}

.panel-danger input:checked ~ .radiobtn:after {
    background: #c37b7a;
}

.dark .checkmark, .dark .radiobtn {
    border-color: darkslategray;
}

.dark .panel-warning .checkmark, .dark .panel-warning .radiobtn, .dark .panel-warning input:checked ~ .checkmark:after, .dark .panel-warning input:indeterminate ~ .checkmark:after {
    border-color: #808000;
}

.dark .panel-danger .checkmark, .dark .panel-danger .radiobtn {
    border-color: #800000;
}

/* When the checkbox is checked, add a blue background 
.container input:checked ~ .checkmark, .container input:indeterminate ~ .checkmark, .container input:checked ~ .radiobtn {
    background-color: steelblue;
} */

.dark input ~ .checkmark, .dark input ~ .radiobtn, .dark input:checked ~ .checkmark, .dark input:indeterminate ~ .checkmark, .dark input:checked ~ .radiobtn {
    background-color: #12303b;
}

.dark .panel-warning input ~ .checkmark, .dark .panel-warning input ~ .radiobtn, .dark .panel-warning input:checked ~ .checkmark, .dark .panel-warning input:checked ~ .radiobtn {
    background-color: #4d4d00;
}

.dark .panel-danger input ~ .checkmark, .dark .panel-danger input ~ .radiobtn, .dark .panel-danger input:checked ~ .checkmark, .dark .panel-danger input:checked ~ .radiobtn {
    background-color: #4d0000;
}

/* On mouse-over, add a grey background color */
.checkbox:hover input ~ .checkmark, .checkbox:hover input:checked ~ .checkmark, .checkbox:hover input:indeterminate ~ .checkmark {
    background-color: #ccc;
}

/* On mouse-over, add a grey background color */
.radio:hover input ~ .radiobtn, .radio:hover input:checked ~ .checkmark {
    background-color: #ccc !important;
}


    @media (max-width: 768px) {
        /*Increase touchability of bottom buttons*/
        footer .btn-default {
            font-size: 120% !important;
        }

        /* Pour réduire la taille du menu en haut */
        /*.navbar {
            min-height: 20px !important;
            margin-bottom: 1px !important;
        }*/
        /*.navbar-brand, .navbar-nav a { /* GK added navbar-nav a*/
        /*padding-top: 2px !important;
        padding-bottom: 1px !important;
        height: 25px !important;
    }

    .navbar-nav a {
        padding-bottom: 15px !important;
    }*/

        /*.navbar-toggle {
            padding-top: 2px !important;
            padding-bottom: 2px !important;
            margin-top: 2px !important;
            margin-bottom: 0px !important;
            background-color: lightgray !important;
        }*/
        /* Pour réduire la taille des éléments et boutons dans l'aréa de navégation - GK
    .navbar-nav, .navbar-nav > li {
        padding-top: 2px !important;
        padding-bottom: 2px !important;
        margin-top: 2px !important;
        margin-bottom: 0px !important;
    } */
        .navbar-nav {
            margin-top: 0 !important;
            margin-bottom: 0 !important;
        }
            /*Make sure these align correctly rather than stacking at full width - GK*/
            .navbar-nav > li > a {
                /*float: left !important;*/
                /*Added this to prevent the buttons becoming so small*/
                padding-top: 15px !important;
            }

        /*.col-md-offset-1 {
        padding-left: 5px !important;
    }

    [role=region] > header {
        margin-bottom: 10px !important;
    }*/
        /* Pour supprimer l'espace entre la zone de recherche et l'iframe 
    .list-group {
        margin-bottom: 0 !important;
    } */
        /* Pour réduire la taille du champ de recherche 
    .form-control {
        height: 28px !important;
        padding-bottom: 5px !important;
    } */

        /*.dropdown-menu {
        font-size: 20px !important;
    }

     Pour réduire la taille des boutons en haut de l'écran 
    .btn-xs, .btn-sm, .btn-default, .btn-group-xs > .btn, .btn-group-sm > .btn {
        font-size: 10px !important;
    }*/
        /* Pour réduire la taille des boutons en bas de l'écran 
    .btn-lg, .btn-group-lg > .btn {
        padding-top: 1px !important;
        padding-bottom: 1px !important;
        font-size: 16px !important;
    }*/
    }

    @media (max-width: 440px) {
        /*.btn-primary {
        font-size: 12px !important;
    }
    .input-group-btn {
        display: inline !important;
    }
    #btnHome {
        float: left;
    }*/
    }