/*
 * Copyright (c) 2019, CRS4
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy of
 * this software and associated documentation files (the "Software"), to deal in
 * the Software without restriction, including without limitation the rights to
 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
 * the Software, and to permit persons to whom the Software is furnished to do so,
 * subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */

div.prm-valign {
    display: inline-block;
    vertical-align: middle;
    float: none;
}

div.prm-viewer_frame {
    background-color: white;
}

div.prm-ome_viewer_simple {
    height: 400px;
}

div.prm-annotated_viewer_container {
    position: relative;
    padding: 0;
}

.prm-annotated_viewer_element {
    width: 100%;
    height: 1px;
    position: absolute;
    padding: inherit;
    margin: inherit;
    border: inherit;
}

.prm-viewer-navi {
    width: 120px;
    height: 120px;
    background: white;
}

button.prm-btn-sm {
    width: 100px;
}

.prm-worklist-btn {
    margin-right: 15px;
}

#nav_worklist, #nav_send_report, #nav_user_guide, #nav_logout, #nav_login, #nav_change_passwd, #nav_shared_dsets {
    padding: 7px;
    margin-left: 10px;
    width: 100px;
}

a.prm-dataset-btn {
    width: 165px;
    margin-top: 5px;
    margin-bottom: 5px;
}

i.prm-warning-icon {
    color: #d9534f;
}

i.prm-confirm-icon {
    color: #5b975bde;
}

h3.prm-dialog-container {
    margin-top: 5px; !important;
}

.prm-no-margin-top {
    margin-top: 0;
}

.prm-ngdialog-buttons {
    padding-top: 20px;
}

.prm-tree-well {
    background-color: white;
    padding-top:10px;
    padding-left: 7px;
    padding-right: 7px;
}

.prm-tree-item {
    margin: 0;
    border: 0;
    padding: 5px 0 5px 5px;
}

.prm-tree-item a:visited,
.prm-tree-item a:link,
.prm-tree-item a:active {
    color: darkgray;
    text-decoration: none;
}

.prm-tree-item a:hover {
    color: black;
    text-decoration: none;
}

.prm-tree-item-neg-margin {
    margin-bottom: -25px !important;
}

.prm-tree-el-disabled {
    cursor: no-drop;
    color: darkgray;
}

.prm-tree-el-disabled:hover {
    color: darkgray !important;
}

.prm-form-header {
    padding-bottom: 1px;
    margin: 10px 0 20px;
    border-bottom: 2px solid #eee;
}

.prm-control-row {
    margin-top:30px;
    text-align: center;
}

.prm-control-btn {
    width: 90px;
    height: 35px;
}

.prm-control-btn-lg {
    width: 200px;
    height: 35px;
    margin-bottom:15px;
    margin-left: 20px;
    margin-right: 20px;
}

.prm-label-elem {
    padding-left: 10px;
    padding-right: 5px;
}

.prm-form-elem {
    padding-left: 5px;
    padding-right: 10px;
}

.prm-icon-btn {
    font-size: 17px;
    padding: 0;
    width: 30px;
    height: 30px;
}

.prm-icon-btn-ruler {
    margin-left: 4px !important;
    border-radius: 4px !important;
}

.prm-text-input {
    padding-left: 5px;
    padding-right: 5px;
    height: 30px;
}

.prm-readonly-text {
    background-color: #FFFFFF !important;
    font-weight: bold;
    font-size: 120%;
    text-align: center;
}

.prm-range-sel-text-input {
    padding: 5px 2px 5px 2px;
    width: 40px !important;
    height: 30px;
}

.prm-row-elem {
    padding-left: 10px;
    padding-right: 10px;
}

.prm-addon {
    padding:2px;
}

.prm-checkbox {
    margin: 0;
}

.prm-rotate-90{
    display: inline-block;
    transform: rotate(90deg);
}

.prm-caret{
    margin-left: 3px;
    font-size: 13px;
}

.prm-legend {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 5px;
    padding-bottom: 3px;
    font-variant: small-caps;
}

.prm-lateral_margin {
    margin-left: 20px;
    margin-right: 20px;
}

.prm-left_margin_mini {
    margin-left: 5px;
}

.prm-right_margin_mini {
    margin-right: 5px !important;
}

.prm-selectpicker {
    height: 30px;
    margin-left: 0 !important;
    margin-right: 4px;
    border-left: 0;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-right: 1px solid #ccc !important;
    border-top-right-radius: 4px !important;
    border-bottom-right-radius: 4px !important;
}

.prm-selectpicker:hover {
    border-color: #adadad !important;
}

.prm-pale-icon {
    color: #bbbbbb;
}

.prm-imq-header {
    border-top: 1px solid #eee;
    padding-top: 10px;
    margin-top: 20px;
}

.prm-not-available-label {
    color: darkgray;
    font-weight: bold;
}

.prm-slides-set-label {
    font-weight: bold;
    color: #555;
}

.prm-staining-label {
    color: darkblue;
    font-weight: bold;
}

.prm-qc-passed-label {
    color: green;
    font-weight: bold;
}

.prm-qc-not-passed-label {
    color: red;
    font-weight: bold;
}

.prm-y-mirror {
    -webkit-transform: scale(-1, 1);
    -moz-transform: scale(-1, 1);
    -ms-transform: scale(-1, 1);
    -o-transform: scale(-1, 1);
    transform: scale(-1, 1);
}

/* Hidden placeholder */
select option[disabled]:first-child {
    display: none;
}

/* Remove browser spin control for input type number */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

@keyframes fullrotation {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.prm-rotating-spinner {
    display: inline-block;
    animation: fullrotation 1s linear infinite;
}

.prm-label {
    margin-right: 10px;
    font-size: medium;
}

.prm-slides-list-btn,
.prm-slides-list-btn:focus {
    margin-bottom: 5px;
    background-color: #fff;
    min-width: 85px;
}

.prm-slides-list-btn:hover {
    background-color: #5bc0de1a;
}

.prm-slides-list-btn-active,
.prm-slides-list-btn-active:hover,
.prm-slides-list-btn-active:focus {
    border: 4px solid #337ab7;
}

.prm-slides-list-btn-notactive,
.prm-slides-list-btn-notactive:hover,
.prm-slides-list-btn-notactive:focus {
    border: 4px solid #5bc0de;
}

.prm-question-text {
    margin: 0 10px 5px;
    font-size: medium;
    color: #777;
}

.prm-choice-label {
    font-size: medium;
    color: #999;
}

.prm-checkbox:checked + .prm-choice-label {
    color: #444444;
}

.prm-range-selector {
    margin: 0 auto;
    max-width: 350px;
    min-width: 250px;
}

.prm-input-text-error {
    border: 2px solid red !important;
    background-color: #ff000025;
}

.prm-input-text-match {
    border: 2px solid green !important;
    background-color: #00ff0025;;
}

/* Input range style
   Thanks to https://www.cssportal.com/style-input-range/
   */

input[type=range] {
    height: 21px;
    -webkit-appearance: none;
    margin: 10px 0;
    width: 100%;
}
input[type=range]:focus {
    outline: none;
}
input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 5px;
    cursor: pointer;
    animate: 0.2s;
    box-shadow: 0px 0px 0px #000000;
    background: #E2E1E3;
    border-radius: 15px;
    border: 0px solid #000000;
}
input[type=range]::-webkit-slider-thumb {
    box-shadow: 0px 0px 0px #000000;
    border: 0px solid #8088FF;
    height: 15px;
    width: 15px;
    border-radius: 50px;
    background: #337ab7;
    cursor: pointer;
    -webkit-appearance: none;
    margin-top: -5px;
}
input[type=range]:focus::-webkit-slider-runnable-track {
    background: #E2E1E3;
}
input[type=range]::-moz-range-track {
    width: 100%;
    height: 5px;
    cursor: pointer;
    animate: 0.2s;
    box-shadow: 0px 0px 0px #000000;
    background: #E2E1E3;
    border-radius: 15px;
    border: 0px solid #000000;
}
input[type=range]::-moz-range-thumb {
    box-shadow: 0px 0px 0px #000000;
    border: 0px solid #8088FF;
    height: 15px;
    width: 15px;
    border-radius: 50px;
    background: #9C9C9C;
    cursor: pointer;
}
input[type=range]::-ms-track {
    width: 100%;
    height: 5px;
    cursor: pointer;
    animate: 0.2s;
    background: transparent;
    border-color: transparent;
    color: transparent;
}
input[type=range]::-ms-fill-lower {
    background: #E2E1E3;
    border: 0px solid #000000;
    border-radius: 30px;
    box-shadow: 0px 0px 0px #000000;
}
input[type=range]::-ms-fill-upper {
    background: #E2E1E3;
    border: 0px solid #000000;
    border-radius: 30px;
    box-shadow: 0px 0px 0px #000000;
}
input[type=range]::-ms-thumb {
    margin-top: 1px;
    box-shadow: 0px 0px 0px #000000;
    border: 0px solid #8088FF;
    height: 15px;
    width: 15px;
    border-radius: 50px;
    background: #9C9C9C;
    cursor: pointer;
}
input[type=range]:focus::-ms-fill-lower {
    background: #E2E1E3;
}
input[type=range]:focus::-ms-fill-upper {
    background: #E2E1E3;
}

/* Input range labels: overwrite input group parameters */
.prm-range-label {
    border: 0px !important;
    background-color: #FFFFFF !important;
    font-weight: bold !important;
    font-size: 125% !important;
}


/* ON/OFF switch toggle
   Thanks to https://bootsnipp.com/snippets/xp0QM
   */

.material-switch > input[type="checkbox"] {
    display: none;
}

.material-switch > label {
    cursor: pointer;
    height: 0px;
    position: relative;
    width: 40px;
}

.material-switch > label::before {
    background: rgb(0, 0, 0);
    box-shadow: inset 0px 0px 10px rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    content: '';
    height: 16px;
    margin-top: -8px;
    position:absolute;
    opacity: 0.3;
    transition: all 0.4s ease-in-out;
    width: 40px;
}
.material-switch > label::after {
    background: rgb(255, 255, 255);
    border-radius: 16px;
    box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3);
    content: '';
    height: 24px;
    left: -4px;
    margin-top: -8px;
    position: absolute;
    top: -4px;
    transition: all 0.3s ease-in-out;
    width: 24px;
}
.material-switch > input[type="checkbox"]:checked + label::before {
    background: inherit;
    opacity: 0.5;
}
.material-switch > input[type="checkbox"]:checked + label::after {
    background: inherit;
    left: 20px;
}