/*
//===================================================================================
// Copyright (c) Calnex Solutions Ltd.  All rights reserved.
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
// LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
// FITNESS FOR A PARTICULAR PURPOSE.
//===================================================================================
// The contents of this file should not be copied or distributed
// without permission being granted by Calnex Solutions Ltd.
//===================================================================================
*/

/* We are using the bootstrap fixed position navbar which is arround 50 pixels tall so we must */
/* pad out the body so that it sits below it. */
body {
    width: 100%;
    height: 100%;
    position: absolute;
    background-color: black;
}

/* Suppress the user select to avoid accidental blue back ground selection when clicking various areas of the form */
.suppress_user_select {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.allow_text_selection {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* We want the default behaviour for ng-click usage to show the 'hand' icon when the mouse pointer is over a clickable */
/* area so we will apply it here and it can be overridden locally if necessary. */
[ng-click] {
    cursor: pointer;
}

/* There is an open issue in angular 1.5.8 (#14015) that causes our use of ng-show/hide to incorrectly show what should */
/* be hidden, it is momentary but noticeable under IE11, we currently don't use the animate hooks so this suggested */
/* workaround is preferable to adding ng-class 'cx-cloak' everywhere we use ng-show/hide (there are a lot!), when a fix */
/* is pushed we can remove this. */
/*.ng-hide.ng-hide-animate {
    display: none !important;
}*/

/* Some browsers still process clicks on disabled buttons which means that disabled buttons still style like they are being clicked */
/* the following prevents the related event propagation */
button[disabled] {
    pointer-events: none;
}

/* The following overrides the bootstrap list-group classes that we use for the side bar */
/* navigation to resemble the mockup design */
.list-group-item {
    border-top: 1px solid #000;
    border-bottom: 1px solid #000;
    border-left: none;
    border-right: none;
}

a.list-group-item {
    font-weight: bold;
    outline: 0 !important;

    background-size: 100% 100%;
    background-repeat: no-repeat;

    height: 4em;
}

a.list-group-item .list-group-item-text {
    height: 100%;

    display: -ms-flexbox;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;

    align-items: center;
    justify-content: center;
}


/* overriding the bootstrap 'primary' button class, we should define our own ultimately as this */
/* particular class is one of a range styled similarly (for example btn-warning renders as yellow ) */
.btn-primary,
.btn-primary:hover,
.btn-primary:focus {
    background-color: #0000ff;
    border-color: #fff;
}

/* The following empty class definitions are required for window resizing (see appController in ngUtils.Controllers) */
.equalHeightSource {}

.equalHeightTarget {}

.company-logo {
    min-height: 50px;
    max-height: 50px;
    overflow: hidden;
}

.company-logo img {
    display: block;
    margin: auto;
}

/* Simple fade in/out animation on view change */
.view-animation.ng-enter {
    -webkit-animation: enter_fade_animation .75s;
    animation: enter_fade_animation .75s;

    opacity: 0;
}

.view-animation.ng-leave {
    -webkit-animation: leave_fade_animation .2s;
    animation: leave_fade_animation .2s;

    opacity: 100;
}

/* Key frame definitions for our fade animation */
@keyframes enter_fade_animation {
    from {
        opacity: 0;
    }

    to {
        opacity: 100;
    }
}

@-webkit-keyframes enter_fade_animation {
    from {
        opacity: 0;
    }

    to {
        opacity: 100;
    }
}

@keyframes leave_fade_animation {
    from {
        opacity: 100;
    }

    to {
        opacity: 0;
    }
}

@-webkit-keyframes leave_fade_animation {
    from {
        opacity: 100;
    }

    to {
        opacity: 0;
    }
}

.generic-flex {
    -ms-flex: 1 0 auto;
    -webkit-box-flex: 1;
    -webkit-flex: 1 0 auto;
    flex: 1 0 auto;

    display: -ms-flexbox;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
}


.body-text {
    color: #C8C8C8 !important;
}


select,
input {
    border: 1px inset;
}

select[disabled],
input[disabled] {
    border: 1px inset #c5c5c5;
    background-color: #c5c5c5;
    color: #666;
}

input {
    padding-left: 0.2em;
}

/* Background colour for controls during editing */
input.editing[type="text"],
input.editing[type="password"],
input.editing[type="time"],
input.editing[type="number"],
textarea.editing,
select.editing {
    background-color: yellow;
}

select.editing option {
    background-color: Window;
    /* Don't want the dropped-down bit to change colour */
}

div.editing {
    background-color: yellow;
    color: #424242;
}

/* Background colour for text with validation failure */
input.invalidInput[type="text"],
input.invalidInput[type="password"],
input.invalidInput[type="time"],
input.invalidInput[type="number"] {
    background-color: red;
}

.sidebar-panel-header {
    font-weight: bold;
    padding: .2em 0;
}

.sidebar-panel-header-LED {
    width: 16px;
    height: 14px;
    margin-right: 0.25em;
}

.sidebar-panel-header-quick-help-spacer {
    -ms-flex: 0.5 0 0;
    -webkit-flex: 0.5 0 0;
    flex: 0.5 0 0;
}

.sidebar-panel-header-quick-help-title {
    padding-top: 0.2em;
}

/* Spinning glyph icon */
.glyphicon.spinning {
    animation: spin 1s infinite linear;
    -webkit-animation: spin2 3s infinite linear;
}

@keyframes spin {
    from {
        transform: scale() rotate(0deg);
    }

    to {
        transform: scale(1) rotate(360deg);
    }
}

@-webkit-keyframes spin2 {
    from {
        -webkit-transform: rotate(0deg);
    }

    to {
        -webkit-transform: rotate(360deg);
    }
}

/* Overriding vendor styles eg:Bootstrap */
.modal-dialog {
    margin: 0 !important;
    padding-top: 10px;
}

@media screen and (min-width: 768px) {
    .modal-dialog {
        margin: 0 auto !important;
        padding-top: 30px;
    }
}

/* Scroll styles */
/* Firefox */
@-moz-document url-prefix() {
    .scrollable {
        scrollbar-width: thin;
        scrollbar-color: #c7c7c7 black;
    }
}

/* Non WebKit-based browsers and not Firefox */
@media not all and (-webkit-min-device-pixel-ratio: 0) {
    .scrollable {
        scrollbar-width: thin;
        scrollbar-color: #c7c7c7 black;
    }
}

/* Chrome and other WebKit-based browsers */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    .scrollable::-webkit-scrollbar {
        width: 10px;
        height: 14px;
    }

    .scrollable::-webkit-scrollbar-track {
        background: black;
    }

    .scrollable::-webkit-scrollbar-thumb {
        border-radius: 5px;
    }

    .scrollable::-webkit-scrollbar-thumb:horizontal {
        background-image: linear-gradient(to bottom, #c7c7c7 0, #424242 100%);
    }

    .scrollable::-webkit-scrollbar-thumb:vertical {
        background-image: linear-gradient(to right, #c7c7c7 0, #424242 100%);
    }

    .scrollable::-webkit-scrollbar-corner {
        background: black;
    }
}

/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
input[type=number] {
    -moz-appearance: textfield;
}
