/*
    Mango - Open Source M2M - http://mango.serotoninsoftware.com
    Copyright (C) 2006-2011 Serotonin Software Technologies Inc.
    @author Matthew Lohbihler

    This program 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.

    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 General Public License for more details.

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

/* LAYOUT STYLES */
*, *::before, *::after {
	box-sizing: border-box;
}

html, body {
	margin: 0px;
	padding: 0px;
	width: 100%;
	max-width: 100vw;
	overflow-x: hidden;
}
a, a:visited, a:link, .link {
	text-decoration: underline;
}
a.titleLink, a.titleLink:visited, a.titleLink:link {
	font-weight: bold;
}
.titlePadding {
	padding:1px 1px 0px 1px;
}
.ptr {
	cursor: pointer;
}

/* --- Headers --- */
#mainHeader {
	display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 6px 12px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
#mainHeader .logo-section {
	display: flex;
	flex-direction: column;
	max-width: 100%;
}
#mainHeader .logo-section--title,
#mainHeader .logo-section--details {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
}
#mainHeader .logo-section #logo {
	max-height: 32px;
}
#mainHeader .logo-section #company-container {
	align-self: end;
    padding: 5px;
}
#mainHeader .logo-section #company-name {
	font-size: 1.6em;
	font-weight: bold;
	color: #ffffff;
}
#mainHeader .logo-section--details {
	padding-bottom: 3px;
	color: rgba(255, 255, 255, 0.85);
}

#mainHeader .logo-section--details > * {
	padding: 0 5px;
}
#mainHeader #powered-by {
	font-weight: 600;
	color: #ffffff !important;
}
#mainHeader #scada-details--version{
	color: #ffffff;
}
#mainHeader #scada-details--github {
	font-style: italic;
	color: rgba(255, 255, 255, 0.75);
	opacity: 85%;
}
#mainHeader #scada-details--os {
	color: rgba(255, 255, 255, 0.75);
	opacity: 85%;
	font-weight: bold;
}
#instanceDescriptionHeader {
	max-width: 100%;
	word-break: break-word;
}
#instanceDescriptionHeader a {
	color: rgba(255, 255, 255, 0.85) !important;
	text-decoration: none;
}
#instanceDescriptionHeader a:hover {
	color: #ffffff !important;
	text-decoration: underline;
}

#eventsRow {
	align-self: center;
}
#subHeader {
	display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
}
#subHeader > div {
	max-width: 100%;
}
#subHeader nav.flex-default {
	flex-wrap: wrap;
	row-gap: 4px;
	max-width: 100%;
}
#subHeader .flex-default {
	flex-wrap: wrap;
	gap: 4px;
}
#navbarUserInfo {
	margin-right: 12px;
	white-space: nowrap;
}

#navbarUserProperties .navbar-dropdown--hidden {
	visibility:hidden;
	left:0px;
	top:15px;
}

#sltsContent {
	width: 100%;
	max-width: 100%;
	padding: 8px 12px 24px 12px;
	box-sizing: border-box;
	overflow-x: auto;
}

#sltsContent > table {
	width: 100%;
	max-width: 100%;
	border-collapse: collapse;
}

.borderDiv, .borderDivPadded {
	box-sizing: border-box;
	max-width: 100%;
}

#splitContainer, #chartContainer {
	box-sizing: border-box;
	max-width: 100%;
}

/* --- Tables --- */
.rowHeader td, .smRowHeader td {
	text-align: center;
    white-space: nowrap;
}

.rowHeader td {
	padding: 3px 10px 3px 10px;
}
.smRowHeader td {
	padding: 2px 3px 2px 3px;
}
a.rowHeaderLink, a.rowHeaderLink:visited, a.rowHeaderLink:link, a.rowHeaderLink:hover {
	text-decoration: underline;
}

.marR {
	margin-right: 5px;
}
.marB {
	margin-bottom: 5px;
}

/* --- Form styles --- */
.formLabel, .formLabelRequired {
	white-space: nowrap;
	vertical-align: top;
}
.formLabelRequired, .formError {
	font-weight: bold;
}
.formVeryShort {
	width: 30px;
}
.formShort {
	width: 50px;
}
.formMediumFieldSizing {
	min-width: 150px;
	max-width: 250px;
	field-sizing: content;
}
.formLong {
	width: 250px;
}
.formLongFieldSizing {
	min-width: 250px;
	max-width: 650px;
    field-sizing: content;
}
input[type="submit"], input[type="button"] {
	overflow: visible;
}
/* --- View Styles --- */
.controlsDiv {
    position: absolute;
    visibility: hidden;
    left: 0;
    top: -1px;
    z-index: 1;
    margin: 1px 0px 1px 0px;
    padding: 0;
}
.controlsDiv table {
    list-style: none;
    margin: 0;
    padding: 0;
}
.controlsDiv td {
    list-style: none;
    margin: 1px;
    padding: 0;
    width: 16px;
    height: 16px;
}
.controlsDiv td div, .controlContent {
    padding: 1px 5px 1px 5px;
    margin: 0px;
    white-space: nowrap;
    text-align: left;
	font-weight: normal;
    position: absolute;
    visibility:hidden;
    left: 15px;
    top: 0px;
}

.labelDiv, .windowDiv {
    position:absolute;
    padding:1px 5px 1px 5px;
    margin:0px;
    white-space:nowrap;
    text-align:left;
	font-weight: normal;
	z-index: 20;
}
.imageDiv {
    z-index:10;
    left:18px;
    position:absolute;
    padding:0px;
    margin:0px;
    white-space:nowrap;
}

#viewContent {
	position:relative;
	margin: 0px;
	padding: 0px;
	overflow-x: auto;
	max-width: 100%;
}
#viewContent img {
	display: block;
	margin: 0px;
	padding: 0px;
}
.componentMin {
    top:0px;
    left:0px;
    margin:0px;
    padding:0px;
    width:16px;
    height:16px;
}

.simpleRenderer, .simpleRenderer2 {
    white-space:nowrap;
    text-align:left;
	font-weight: normal;
}

.simpleRenderer {
	line-height:16px;
}

/* Absmiddle workaround */
span.absmiddle img {
	padding: 0;
	margin: 0;
	vertical-align: middle;
	display: inline;
}


/* ==========================================================================
   Modern Documentation & FloatingPane Styles (ISA-101 / Scada-LTZ Theme)
   ========================================================================== */

/* Outer Window Frame */
html > body .dojoFloatingPane,
.dojoFloatingPane {
    border: 1px solid rgba(26, 82, 118, 0.25) !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25), 0 4px 14px rgba(0, 0, 0, 0.1) !important;
    overflow: hidden !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    z-index: 1050 !important;
}

/* Remove Dojo's legacy drop-shadow divs if generated */
.dojoDropShadow {
    display: none !important;
}

/* Title Bar */
html > body .dojoFloatingPaneTitleBar,
.dojoFloatingPaneTitleBar {
    background: linear-gradient(135deg, #1a5276 0%, #2471a3 100%) !important;
    border: none !important;
    margin: 0 !important;
    padding: 10px 16px !important;
    height: 42px !important;
    box-sizing: border-box !important;
    border-radius: 11px 11px 0 0 !important;
    display: flex !important;
    align-items: center !important;
    cursor: move !important;
    position: relative !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15) !important;
}

/* Title Bar Icon */
html > body .dojoFloatingPaneTitleBarIcon,
.dojoFloatingPaneTitleBarIcon {
    margin: 0 8px 0 0 !important;
    padding: 0 !important;
    height: 18px !important;
    width: 18px !important;
    vertical-align: middle !important;
    filter: brightness(0) invert(1) !important;
}

/* Title Bar Text */
html > body .dojoFloatingPaneTitleText,
.dojoFloatingPaneTitleText {
    color: #ffffff !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    letter-spacing: 0.3px !important;
    padding: 0 !important;
    float: none !important;
    line-height: 22px !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25) !important;
    white-space: nowrap !important;
}

/* Close Icon Button */
html > body .dojoFloatingPaneCloseIcon,
.dojoFloatingPaneCloseIcon {
    position: absolute !important;
    right: 10px !important;
    top: 9px !important;
    width: 24px !important;
    height: 24px !important;
    background-image: none !important;
    background-color: rgba(255, 255, 255, 0.2) !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    z-index: 1060 !important;
}

.dojoFloatingPaneCloseIcon::before {
    content: "✕" !important;
    color: #ffffff !important;
    font-size: 13px !important;
    font-weight: bold !important;
    line-height: 24px !important;
    text-align: center !important;
    display: block !important;
}

.dojoFloatingPaneCloseIcon:hover {
    background-color: #ef4444 !important;
    transform: scale(1.08) !important;
}

/* Client Area Container */
html > body .dojoFloatingPaneClient,
.dojoFloatingPaneClient {
    border: none !important;
    margin: 0 !important;
    padding: 16px 20px 20px 20px !important;
    background-color: #ffffff !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-size: 13px !important;
    line-height: 1.6 !important;
    color: #1e293b !important;
    border-radius: 0 0 11px 11px !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
}

.dojoFloatingPaneClient::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.dojoFloatingPaneClient::-webkit-scrollbar-track {
    background: #f8fafc;
}
.dojoFloatingPaneClient::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
.dojoFloatingPaneClient::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Resize Bar (hidden for cleaner modal look) */
html > body .dojoFloatingPaneResizebar,
.dojoFloatingPaneResizebar {
    display: none !important;
}

html > body .dojoFloatingPaneClient p, #help p {
	padding: 0px;
	margin: 0px 0px 10px 0px;
}
#help h1 {
	color: #1a5276;
	padding: 0px;
	margin: 15px 0px 10px 0px;
}
html > body .dojoFloatingPaneClient h1, #help h2 {
	color: #1a5276;
	padding: 0px;
	margin: 0px 0px 10px 0px;
}
html > body .dojoFloatingPaneClient img, #help img {
	vertical-align: bottom;
}

/* --- Styles for weekly 15 minute interval schedules. --- */
.qoff {
    background-color: #FF4000;
}
.qon {
    background-color: #B4CE96;
}
.qreg {
    border: 1px solid #699D2E;
}
.qhlt {
    border: 1px solid #FF9D2E;
}

.hreg {
    border: 1px solid #FFFFFF;
}
.hhlt {
    border: 1px solid #FF9D2E;
}

.selectItem {
	width:100%;
}

.windowDiv .selectDiv {
	display:none;
	max-height:100px;
	overflow:auto;
}

/**
 * Enhanced image chart
 */
.enhancedImageChart {
	background-color: white;
}
.enhancedImageChartLegend {
	position:static !important;
	background-color: white;
	padding: 5px;
	display: inline-block;
}
.enhancedImageChartLegend > div {
	margin-top: 2px;
}
.enhancedImageChartConfig {
	position: absolute !important;
	top: 0px !important;
	left: 100% !important;
	float: right;
	padding-left: 5px;
	display: block;
	background-color: white;
	width: 240px;
	border: 1px outset #39B54A;
	z-index: 1;
}

.enhancedImageChartConfig > div {
	width: 100%;
	display: inline-block;
}
.enhancedImageChartConfig div.margin1{
	margin-top: 15px;
}
.enhancedImageChartConfig div.margin2{
	margin: 5px 0px;
}
.enhancedImageChartConfig label.margin{
	margin: 0px 5px;
}
.enhancedImageChartConfig span{
	font-weight: bold;
	margin: 5px 0;
}

/* To fix new css changees */
.form-box {
    width: 20px;
}
.login-button {
    width: 165px;
}

img[src$="blue.png"], img[src$="accept.png"], img[src$="theme.png"], img[src^="images/"]:not(#viewBackground){
	height: 16px;
	width: 16px;
}

/* *** Main *** */
#instanceDescription {
	padding:5px;
	white-space: nowrap;
}

/* Login form */
.login-container {
	margin: 90px auto 20px auto;
	background: #2471a3;
	background: linear-gradient(135deg, #2471a3 0%, #1a5276 100%);
	width: 330px;
	border-radius: 12px;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.28);
	color: #ffffff;
	padding-bottom: 5px;
}
.login-browser {
	text-align: center;
	padding: 14px 12px 6px 12px;
	color: #e0f2fe;
	font-size: 12px;
}
.login-browser #browser {
	font-weight: bold;
	color: #ffffff;
}
.login-browser #browserImg {
	height: 12px;
	width: auto;
	vertical-align: middle;
	margin: 0 4px;
}
.login-browser #okMsg {
	color: #86efac;
	font-weight: 500;
}
.login-browser #warnMsg {
	color: #fde047;
	font-weight: 500;
}

.login-box > form {
	margin: 0 auto;
	width: 250px;
	padding-bottom: 15px;
}

.login-box .form-box {
	margin-bottom: 12px;
	width: 100%;
}

.login-box .formLabelRequired {
	color: #ffffff !important;
	font-weight: 600 !important;
	margin-top: 10px !important;
	margin-bottom: 4px !important;
	font-size: 13px !important;
	text-align: left !important;
	display: block !important;
	padding: 0 !important;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.login-box .formField {
	width: 100% !important;
	display: block !important;
	padding: 0 !important;
}

.login-box input#username,
.login-box input#password,
.login-box .formField input {
	width: 100% !important;
	height: 34px !important;
	border-radius: 6px !important;
	border: 1px solid rgba(255, 255, 255, 0.4) !important;
	background: #ffffff !important;
	color: #1e293b !important;
	padding: 6px 12px !important;
	font-size: 14px !important;
	box-sizing: border-box !important;
	display: block !important;
	transition: all 0.2s ease;
}

.login-box input#username:focus,
.login-box input#password:focus,
.login-box .formField input:focus {
	outline: none !important;
	background: #ffffff !important;
	border-color: #38bdf8 !important;
	box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.4) !important;
}

.login-box .login-button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin-top: 18px;
}

.login-box .login-button > input {
	padding: 7px 26px;
	margin: 0;
	background: #ffffff;
	color: #2471a3;
	font-weight: bold;
	font-size: 13px;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
	transition: all 0.2s ease;
}

.login-box .login-button > input:hover {
	background: #f0f9ff;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
	transform: translateY(-1px);
}

/* Fixed styles */
/* Main Header */


.userName {
	font-weight: bold;
}

.flex-default {
	display: flex;
	align-items: center;
}

.datasource-row {
    padding:0px 0px 0px 30px;
}

#pointDetails {
	position:fixed;
	bottom:0;
	width:38%;
}

form.view-edit-form {
    max-width: 100vw;
    overflow-x: auto;
}

.notification-alert--reset {
	  position: fixed;
    top: 0;
    right: 0;
    padding: 10px;
	  margin: 15px;
    border: 1px solid var(--slts-color-primary);
	  animation: slideIn 0.4s;
    animation-timing-function: cubic-bezier(0, 0, 0.36, 1.38);
    animation-delay: 0.5s;
    animation-fill-mode: both;
    z-index: 99;
}
.notification-alert--reset > .clickable {
    cursor: pointer;
}
textarea#cssEditor {
    white-space: pre-wrap !important;
}

#viewContent input[type='button'] {
    text-align: center;
    vertical-align: middle;
}