/* */
/* Copyright 2016,2017 JS Foundation and other contributors, https://js.foundation/ */
/* Copyright 2016 IBM Corp.                                                 */
/* Copyright 2015 Andrei Tatar                                              */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License");          */
/* you may not use this file except in compliance with the License.         */
/* You may obtain a copy of the License at                                  */
/* */
/* http://www.apache.org/licenses/LICENSE-2.0                               */
/* */
/* Unless required by applicable law or agreed to in writing, software      */
/* distributed under the License is distributed on an "AS IS" BASIS,        */
/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
/* See the License for the specific language governing permissions and      */
/* limitations under the License. */
/* */
md-sidenav,
md-sidenav.md-locked-open,
md-sidenav.md-closed.md-locked-open-add-active {
	min-width: 200px !important;
	width: 200px !important;
	max-width: 200px !important;
}
md-sidenav ng-md-icon {
    padding-right: 4px;
}
md-sidenav i {
    padding-right: 4px;
}

md-toast .md-toast-content {
	height: auto;
}
md-toast .md-toast-error {
	color: rgba(255, 64, 41, 0.84);
    font-weight: 500;
    font-size: large;
}

md-card {
    box-shadow: none;
}

.node-red-ui--inline-link {
	width: 100%;
	height: 100%;
	position: absolute;
}
.node-red-ui--inline-link iframe {
	width: 100%;
	height: 100%;
}

.ie9 img[src$=".svg"] {
      width: 100%;
}

@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
      img[src$=".svg"] {
          width: 100%;
      }
}

@supports (-ms-overflow-style: none) {
    overflow: auto !important;
}

/*
	ALL COMPONENTS/CONTENT
*/
@baseFont: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;
@baseColor: #fff;
@pageBackgroundColor: #eee;
@pageTitlebarBackgroundColor: #0094CE;
@pageSidebarBackgroundColor: #fff;
@groupBackgroundColor: #fff;
@groupTextColor: #00A4DE;
@groupBorderColor: #fff;
@widgetTextColor: #000;
@widgetBackgroundColor: #4FBAE4;
@widgetBorderColor: #fff;

.nr-dashboard-disabled {
    opacity: 0.4 !important;
    pointer-events: none !important;
}

body.nr-dashboard-theme {
	background-color: @pageBackgroundColor;
    font-family: @baseFont;
}

body.nr-dashboard-theme md-content {
	color: @groupTextColor;
    background: transparent;
    height: 100%;
}

body.nr-dashboard-theme md-select-menu md-content {
    height: initial;
}

body.nr-dashboard-theme md-content md-card {
	background-color: @widgetBorderColor;
	color: @widgetTextColor;
}

/* Some colour classes */
body.nr-dashboard-theme .nr-dashboard-color { color: @groupTextColor; }
body.nr-dashboard-theme .nr-dashboard-error { color: #ff2929; }
body.nr-dashboard-theme .nr-dashboard-warning { color: #eaf42f; }
body.nr-dashboard-theme .nr-dashboard-ok { color: #49db3c; }
body.nr-dashboard-theme .nr-dashboard-dim { opacity: 0.5 !important; }


/*
	DASHBOARD HEADER
*/
body.nr-dashboard-theme md-toolbar {
	background-color: @pageTitlebarBackgroundColor;
}

/*
	DASHBOARD SIDEBAR
*/
body.nr-dashboard-theme md-sidenav {
	background-color: @pageSidebarBackgroundColor;
}

/*
	GROUP SPECIFIC
*/
.nr-dashboard-theme ui-card-panel {
	background-color: @groupBackgroundColor;
	border: 1px solid @groupBorderColor;
}

/*
	COMPONENT-SPECIFIC
*/

/* Button */
.nr-dashboard-theme .nr-dashboard-button .md-button {
	background-color: @widgetBackgroundColor;
	color: white;
}
.nr-dashboard-theme .nr-dashboard-button .md-button:hover {
	background-color: lighten(@widgetBackgroundColor, 5);
}

/* Date picker */
.nr-dashboard-theme .nr-dashboard-date-picker md-input-container .md-input {
    color: @widgetTextColor;
    border-bottom-color: @widgetBackgroundColor;
}
.nr-dashboard-theme .nr-dashboard-date-picker md-input-container .md-input::-webkit-input-placeholder {
    color: @widgetTextColor;
}
.nr-dashboard-theme .nr-dashboard-date-picker .md-button.md-icon-button {
    /* background-color: @widgetBackgroundColor; */
}
.nr-dashboard-theme .nr-dashboard-date-picker .md-button.md-icon-button md-icon {
    color: @widgetBackgroundColor;
}
.nr-dashboard-theme .nr-dashboard-date-picker .md-datepicker-triangle-button .md-datepicker-expand-triangle {
    border-top-color: @widgetTextColor;
}

/* Chart */
.nr-dashboard-theme .nr-dashboard-chart-title  {
}
.nr-dashboard-theme .nr-dashboard-chart-titlel  {
    font-size: larger;
    font-weight: 500 !important;
}

/* Colour Picker */
.nr-dashboard-theme .color-picker-panel {
	background-color: @groupBackgroundColor;
    border-color: @groupBorderColor;
    box-shadow: 0 0 1px rgba(255,255,255,.5);
}
.nr-dashboard-theme .color-picker-input-wrapper > input {
    color:#fff;
    background-color: #444;
}

/* Dropdown */
.nr-dashboard-theme .nr-dashboard-dropdown md-select .md-select-value,
.nr-dashboard-theme .nr-dashboard-dropdown md-select .md-select-value.md-select-placeholder {
	color: @widgetTextColor;
	border-color: @widgetTextColor;
    border-bottom-width: 2px;
    padding: 2px 2px 0px;
}
.nr-dashboard-theme .nr-dashboard-dropdown .md-select-icon {
	color: @widgetTextColor;
}
.nr-dashboard-theme md-select-menu {
	margin-left: -2px;
}
.nr-dashboard-theme md-select-menu md-content {
	border: 1px solid #4F4F4F;
	padding: 0px;
}
.nr-dashboard-theme md-select-menu, .nr-dashboard-theme md-select-menu md-option {
	background-color: @groupBackgroundColor;
	color: @widgetTextColor;
}
.nr-dashboard-theme md-select-menu md-option[selected] {
	color: @groupTextColor !important;
	background-color: @groupBackgroundColor !important;
}
.nr-dashboard-theme md-select-menu.md-default-theme md-option:focus:not([disabled]):not([selected]),
md-select-menu md-option:focus:not([disabled]):not([selected]) {
	background-color: @groupBackgroundColor;
}
.nr-dashboard-theme md-select-menu md-option:hover {
	background-color: lighten(@widgetBackgroundColor, 5) !important;
}

/* Gauge */
.nr-dashboard-theme .nr-dashboard-gauge {}
.nr-dashboard-theme .nr-dashboard-gauge text {
	fill: @widgetTextColor;
    margin: 8px;
}
.nr-dashboard-theme .nr-dashboard-gauge-title  {
    margin: 8px 0px 16px 0px;
    z-index: 1;
}
.nr-dashboard-theme .nr-dashboard-gauge-titlel  {
    font-size: larger;
    font-weight: 500 !important;
}
.nr-dashboard-theme .nr-dashboard-gauge-titles  {
    font-size: 11px;
    padding-bottom: 16px;
}

/* Numeric */
.nr-dashboard-theme .nr-dashboard-numeric {}

/* Slider */
.nr-dashboard-theme .nr-dashboard-slider {}
.nr-dashboard-theme .nr-dashboard-slider .md-track {
	background-color: rgba(111, 111, 111, 0.5);
}
.nr-dashboard-theme .nr-dashboard-slider .md-track-fill {
	background-color: @widgetBackgroundColor;
}
.nr-dashboard-theme .nr-dashboard-slider .md-thumb:after {
	background-color: @widgetBackgroundColor;
	border-color: @widgetBackgroundColor;
}
.nr-dashboard-theme .nr-dashboard-slider .md-focus-ring {
	background-color: @widgetBackgroundColor;
}

/* Switch */
.nr-dashboard-theme .nr-dashboard-switch {}
.nr-dashboard-theme .nr-dashboard-switch md-switch .md-bar {
	background-color: rgba(111, 111, 111, 0.5);
}
.nr-dashboard-theme .nr-dashboard-switch md-switch.md-checked .md-bar {
	background-color: rgba(red(@widgetBackgroundColor), green(@widgetBackgroundColor), blue(@widgetBackgroundColor), 0.5);
}
.nr-dashboard-theme .nr-dashboard-switch md-switch .md-thumb {
	background-color: rgb(148, 148, 148);
}
.nr-dashboard-theme .nr-dashboard-switch md-switch.md-checked .md-thumb {
	background-color: rgba(red(@widgetBackgroundColor), green(@widgetBackgroundColor), blue(@widgetBackgroundColor), 1);
}

/* Template */
.nr-dashboard-theme .nr-dashboard-template .md-button {
	background: @widgetBackgroundColor;
	color: white;
    margin: 0px 6px;
    padding: 0px 12px;
    min-height: 26px;
    min-width: unset;
    line-height: unset;
}

.nr-dashboard-theme .nr-dashboard-template .md-button:hover {
	background-color: lighten(@widgetBackgroundColor, 5);
}
.nr-dashboard-theme .nr-dashboard-template {
    ::-webkit-scrollbar {
        height: 12px;
        width: 12px;
        background: @widgetBackgroundColor;
    }
    ::-webkit-scrollbar-thumb {
        background: @baseColor;
        -webkit-border-radius: 1ex;
        -webkit-box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.75);
    }
}

/* Text-Input */
.nr-dashboard-theme .nr-dashboard-textinput {}
.nr-dashboard-theme .nr-dashboard-textinput label {
	color: @widgetTextColor;
}
.nr-dashboard-theme .nr-dashboard-textinput md-input-container.md-input-has-value label {
	color: @widgetTextColor;
}
.nr-dashboard-theme .nr-dashboard-textinput md-input-container.md-input-focused label {
	color: @groupTextColor;
}
.nr-dashboard-theme .nr-dashboard-textinput md-input-container.md-input-focused input {
	border-color: @groupTextColor
}
.nr-dashboard-theme .nr-dashboard-textinput md-input-container .md-input:invalid {
	color: #DA5252;
}
.nr-dashboard-theme .nr-dashboard-textinput input {
	border-color: @widgetTextColor;
	color: @widgetTextColor;
    border-bottom-width: 2px;
}

/* Text */
.nr-dashboard-theme .nr-dashboard-text {}

/* Dialog */
.nr-dashboard-theme md-dialog {
    color: @widgetTextColor;
    background-color: @groupBackgroundColor;
    border: 1px solid @groupBorderColor;
}
.nr-dashboard-theme .md-dialog-content {
    padding: 24px;
}
.nr-dashboard-theme .md-button.md-primary {
	color: @widgetBackgroundColor !important;
}

/* Form */
.nr-dashboard-theme .nr-dashboard-form-button {
    background-color:  @widgetBackgroundColor;
    color: white;
}
.nr-dashboard-theme .nr-dashboard-form-button:hover {
    background-color:  lighten(@widgetBackgroundColor, 10) !important;
}
.nr-dashboard-theme .nr-dashboard-form-button:focus {
    background-color:  lighten(@widgetBackgroundColor, 10) !important;
}
.nr-dashboard-theme .nr-dashboard-form {
	color: @widgetTextColor;
}
.nr-dashboard-theme .nr-dashboard-form form md-input-container input {
	border-color: @widgetTextColor;
	color: @widgetTextColor;
}
.nr-dashboard-theme .nr-dashboard-form form md-input-container label{
	color: @widgetTextColor;;
}
.nr-dashboard-theme .nr-dashboard-form form md-input-container.md-input-has-value:not(.md-input-invalid) label{
		color: @widgetTextColor;;
}
.nr-dashboard-theme .nr-dashboard-form form md-input-container:not(.md-input-invalid).md-input-focused input{
	border-color: @groupTextColor ;
}
.nr-dashboard-theme .nr-dashboard-form form md-input-container:not(.md-input-invalid).md-input-focused label{
	color: @groupTextColor ;
}
.nr-dashboard-theme .nr-dashboard-form form .md-input-invalid input{
	border-color: #d00 !important;
}
.nr-dashboard-theme md-content .nr-dashboard-form form .md-input-invalid label{
	color: #d00 !important;
}
.nr-dashboard-theme md-content .nr-dashboard-form form md-input-container md-checkbox.md-checked .md-icon {
    background-color: lighten(@widgetBackgroundColor, 10);
}
.nr-dashboard-theme md-content .nr-dashboard-form form md-input-container md-checkbox .md-icon{
    border-color: @widgetTextColor;;
}
.nr-dashboard-theme md-content .nr-dashboard-form form md-input-container md-switch .md-bar{
	background-color: rgba(111, 111, 111, 0.5);
}
.nr-dashboard-theme md-content .nr-dashboard-form form md-input-container md-switch .md-thumb  {
	background-color: rgb(148, 148, 148);
}
.nr-dashboard-theme md-content .nr-dashboard-form form md-input-container md-switch.md-checked .md-bar{
	background-color: lighten(@widgetBackgroundColor, 10);
}
.nr-dashboard-theme md-content .nr-dashboard-form form md-input-container md-switch.md-checked .md-thumb  {
	background-color: @widgetBackgroundColor;
}
.nr-dashboard-theme md-content .nr-dashboard-form form md-datepicker  {
	background-color: inherit;
}
.nr-dashboard-theme md-content .nr-dashboard-form form  .md-datepicker-calendar-icon   {
	fill: @groupTextColor;
}
.nr-dashboard-theme md-content .nr-dashboard-form form .md-datepicker-open .md-datepicker-calendar-icon   {
	fill: @widgetBackgroundColor ;
}
.nr-dashboard-theme md-content .nr-dashboard-form form .md-datepicker-input {
	color: @widgetTextColor;
}
.nr-dashboard-theme md-content .nr-dashboard-form form .md-datepicker-input-container {
	border-color: @widgetTextColor;;
}
.nr-dashboard-theme  md-content .nr-dashboard-form form .md-datepicker-expand-triangle{
    border-top-color: @widgetBackgroundColor ;
}
