@import url('fonts.css');

:root {
    --logo-sm-light: url('../images/logo-sm-light.svg');
    --logo-sm-dark: url('../images/logo-sm-dark.svg');
    --logo-lg-light: url('../images/logo-lg-light.svg');
    --logo-lg-dark: url('../images/logo-lg-dark.svg');
    --logo-full-light: url('../images/logo-full-light.svg');
    --logo-full-dark: url('../images/logo-full-dark.svg');

    --chart-grid-color-dark: rgba(255, 255, 255, 0.1);
    --chart-tick-color-dark: #999999;
    --chart-grid-color-light: rgba(0, 0, 0, 0.1);
    --chart-tick-color-light: #666666;

    --analytics-main-color: #3399FF;
    --analytics-compare-color: #FF9900;
    --analytics-neutral-color: #999999;

    --analytics-neutral-map-color: rgba(255, 255, 255, 0);
}

[data-bs-theme="dark"] {
    --chart-grid-color: var(--chart-grid-color-dark);
    --chart-tick-color: var(--chart-tick-color-dark);

    --logo-sm: var(--logo-sm-dark);
    --logo-lg: var(--logo-lg-dark);
    --logo-full: var(--logo-full-dark);
}

[data-bs-theme="light"] {
    --chart-grid-color: var(--chart-grid-color-light);
    --chart-tick-color: var(--chart-tick-color-light);

    --logo-sm: var(--logo-sm-light);
    --logo-lg: var(--logo-lg-light);
    --logo-full: var(--logo-full-light);
}

html, body {
    height: 100vh;
    min-width: 320px;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.logo-full {
    content: var(--logo-full);
    max-width: 350px;
}

.logo-lg {
    content: var(--logo-lg);
    max-height: 50px;
}

.logo-sm {
    content: var(--logo-sm);
    max-height: 50px;
}

.hidden {
	display: none !important;
}

.centered {
    display: flex;
	flex-grow: 1;
	align-items: center;
	justify-content: center;
}

.side-content {
    display: flex;
    flex-direction: column;
    width: 80px;
    min-width: 80px;
}

.main-content {
    display: flex;
    flex-grow: 1;
}

@media (min-width: 1200px) /* XL */ {
    .side-content {
        width: 230px;
        min-width: 230px;
    }
}

header {
    display: flex;
    flex-direction: row;
}

main {
    overflow-y: hidden;
    border-top-left-radius: .75rem;
}

aside {
    height: 100%;
    overflow-y: auto;
}

aside .module-nav-item .module-icon svg {
    width: 30px;
}

[data-bs-theme="dark"] aside .module-icon svg {
    --highlight: #fff;
}

[data-bs-theme="light"] aside .module-nav-item .module-label {
    color: #434343;
}

aside .module-nav-item:not(:has(.active)):hover {
    background-color: color-mix(in srgb, var(--bs-body-bg) 30%, transparent);
    cursor: pointer;
}

aside .module-nav-item:not(:has(.active)) .module-label:hover {
    cursor: pointer;
}

aside #moduleNav .active {
    margin-left: .75rem;
    padding-right: .75rem !important;
    background-color: var(--bs-body-bg);
    border-radius: .5rem 0 0 .5rem;
}

@media (min-width: 1200px) {
    aside #moduleNav .active {
        margin-left: 0;
        padding-left: .75rem !important;
    }

    aside .module-nav-item:not(:has(.active)):hover {
        background: none;
    }

    aside .module-nav-item:not(:has(> .active)) {
        animation: icon-pan-left .15s ease-out;
        animation-fill-mode: forwards;
    }
    
    aside .module-nav-item:not(:has(> .active)):hover {
        animation: icon-pan-right .15s ease-out;
        animation-fill-mode: forwards;
    }
    
    @keyframes icon-pan-left {
        from { padding-left: .75rem; }
        to { padding-left: 0; }
    }
    
    @keyframes icon-pan-right {
        from { padding-left: 0; }
        to { padding-left: .75rem; }
    }
}

.module-loader {
    display: flex;
    flex-grow: 1;
    height: 100%;
    width: 100%;
    overflow-y: auto;
}

/* Hide module component until ready */
.module:not(:defined) {
	display: none !important;
}

.module {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
    width: 100%;
}

#loginForm fieldset > *:not(:last-child) {
    padding-bottom: 1rem;
}

.version-box {
    display: block;
    font-size: .75rem;
    text-align: center;
    line-height: 1;
}

.server-host,
.server-name {
    word-break: break-all;
}

.server-name-block:has(.server-name:empty) {
    display: none !important;
}

.controls-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem .75rem;
}

label.config-form-separator-label {
	display: block;
	color: var(--bs-secondary-text-emphasis);
	white-space: pre-wrap;
}

label.client-only {
	color: var(--bs-secondary);
}

.sticky-top-position,
.sticky-bottom-position {
    position: sticky;
    z-index: 2;
}

.sticky-top-position {
    top: 0;
}

.sticky-bottom-position {
    bottom: 0;
}

.blurred {
    background-color: rgba(var(--bs-body-bg-rgb), .8);
    backdrop-filter: blur(2px);
}

.console,
.k-grid.console-rows .k-grid-content tr td {
    font-family: 'Free Mono', monospace;
    white-space: pre-wrap;
}

.help-tooltip {
	text-align: left;
	white-space: pre-wrap;
}

.message-badge {
    line-height: 1;
    padding: .125rem !important;
    font-size: x-small;
    font-weight: bold;
}

/* COMPONENTS STYLES */

view-stack {
	display: flex;
    flex-direction: column;
    flex-grow: 1;
    width: 100%;
}

/* Hide ViewStack component until ready */
view-stack:not(:defined) {
	display: none !important;
}

view-stack > * {
	display: flex;
	flex-direction: row;
	flex-grow: 1;
    height: 100%;
}

#offcanvasControls,
#offcanvasChat {
    border-top-left-radius: .75rem;
    border-bottom-left-radius: .75rem;
}

.btn-zl-toggle {
    width: 1em;
    transition: transform .35s ease;
    transform-origin: .5em 50%;
}

.btn-zl-toggle[aria-expanded="true"] {
    transform: rotate(90deg);
}

.dual-list-left-col {
	width: calc(50% + 24px);
    margin-right: .5rem;
}

.dual-list-right-col {
	width: calc(50% - 24px);
}

.dual-list-left-col.no-interact {
	width: calc(50% - .25rem);
	margin-right: .25rem;
}

.dual-list-right-col.no-interact {
	width: calc(50% - .25rem);
	margin-left: .25rem;
}

.dual-list-label {
    font-size: smaller;
}

.short-4 {
	width: 4rem !important;
}

.accordion.grow {
	display: flex;
	flex-grow: 1;
	flex-direction: column;
    min-height: 400px;
}

.accordion.grow .accordion-item {
	display: flex;
	flex-direction: column;
	flex-grow: 0;
}

.accordion.grow .accordion-collapse {
    display: flex;
    flex-grow: 0;
    overflow-y: hidden;
    height: 0;
}

.accordion.grow .accordion-item:has(.accordion-button[aria-expanded="true"]) {
	flex-grow: 1;
}

.accordion.grow .accordion-item:has(.accordion-button[aria-expanded="true"]) .accordion-collapse {
    flex-grow: 1;
}

.accordion.grow .accordion-body {
	overflow-y: auto;
	flex-grow: 1;
}

/*
 THE FOLLOWING RULES FIX AN ISSUE IN SAFARI FOR IOS
 WHERE THE BACKDROP IS DISPLAYED ABOVE THE MODAL
 IF THE MODAL HTML IS NESTED INSIDE OTHER TAGS
 (INSTEAD OF BEING A SIBLING OF THE BACKDROP ELEMENT)

 ALSO, THIS MAKES THE BACKDROP OF A NESTED MODAL TO BE
 DISPLAYED ABOVE THE PARENT MODAL, INSTEAD OF BELOW
*/

.modal-backdrop {
  display: none;
}

.modal {
  background: rgba(0,0,0,0.5);
}

.dashboard-box {
	flex-grow: 1;
	font-size: 2rem;
    font-weight: bold;
	text-align: center;
	align-items: center;
    line-height: 1em;
}

.dashboard-box .inner-label {
	font-size: .725rem;
	font-weight: normal;
	opacity: .5;
    line-height: 1rem;
}

.dashboard-detail-label {
    font-size: smaller;
}

.dashboard-chart-container {
    position: relative;
    height: 240px;
}

.chart-nav button.active {
    color: var(--bs-black);
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.small-num-stepper {
    width: 80px;
}

.vertical-label {
    writing-mode: sideways-lr;
}

.custom-pills .nav-link {
    border-radius: 12px;
}

.custom-pills .nav-link:not(.active) {
    color: var(--bs-secondary-color);
}

.custom-pills .nav-link:not(.active):hover {
    color: var(--bs-link-hover-colorcolor);
}

.custom-pills .nav-link:not(.active).disabled {
    opacity: 50%;
}

.custom-pills .nav-link.active {
    color: #000;
}

/* KENDO OVERRIDES */

#k-license-banner {
    display: none !important;
}

.k-checkbox-wrap:has(*:disabled) + .k-checkbox-label {
    cursor: default; /* Fixes behavior of Kendo CheckBox not resetting cursor when disabled */
}

.k-tooltip {
	max-width: 230px;
	font-size: 80% !important;
}

.k-dialog {
	width: 100%;
	max-width: 450px;
}

.k-dialog.large-dialog {
	max-width: 900px;
}

.k-dialog .k-dialog-title {
	color: var(--bs-primary);
}

.k-dialog.is-warning .k-dialog-title {
	color: var(--bs-danger) !important;
}

.k-dialog.is-info .k-dialog-title {
	color: var(--bs-primary) !important;
}

.k-grid-norecords {
	padding: 0 .5rem;
	font-style: italic;
    color: var(--bs-secondary);
}

/* Use custom class .no-iteract to remove hover effect, when grid is not editable */
/* Hover effect is also removed when grid set to disabled */
.k-grid.no-interact tr:not(.k-selected):hover,
.k-grid[disabled="disabled"] tr:not(.k-selected):hover {
    background: none;
    color: inherit;
}

.k-grid.no-interact tr.k-alt:not(.k-selected):hover,
.k-grid[disabled="disabled"] tr.k-alt:not(.k-selected):hover {
    background-color: color-mix(in srgb, var(--kendo-color-on-app-surface, #212529) 5%, transparent);
}

/* Reset mouse pointer on header */
.k-grid .k-header .k-cell-inner .k-link {
    cursor: default;
}

.k-grid.limited-height .k-grid-content {
   max-height: 9rem;
}

.k-grid.limited-height-2x .k-grid-content {
   max-height: 18rem;
}

.k-grid.force-adaptive-height .k-grid-content {
   max-height: none !important;
}

.k-animation-container:has(.k-dropdownlist-popup) {
    max-width: 100%;
}

.k-dropdownlist .k-input-value-text {
    color: var(--bs-body-color);
}

.k-dropdownlist-popup .k-list {
	background: none;
}

.k-dropdownlist-popup .k-list .k-list-item:first-child {
    border-top-left-radius: var(--kendo-border-radius-md);
    border-top-right-radius: var(--kendo-border-radius-md);
}

.k-dropdownlist-popup .k-list .k-list-item:last-child {
    border-bottom-left-radius: var(--kendo-border-radius-md);
    border-bottom-right-radius: var(--kendo-border-radius-md);
}

.k-list .k-list-item.k-focus {
    box-shadow: none;
}

.k-panelbar > .k-panelbar-header > .k-link.k-selected.k-focus {
    box-shadow: none;
}

.k-context-menu,
.k-context-menu .k-menu-link {
    border-radius: var(--kendo-border-radius-md);
}

.k-context-menu .k-menu-item.k-focus .k-menu-link {
    box-shadow: none !important;
}

.accordion-list {
	width: 100%;
    height: 100%;
}

.accordion-list .k-list-scroller {
    border: 0;
}

.k-chart text {
    fill: var(--bs-body-color); /* This fixes the issue of charts not switching from light to dark mode */
}

.k-chart-tooltip {
    color: var(--bs-dark);
}

.k-switch.show-label .k-switch-label-on,
.k-switch.show-label .k-switch-label-off {
    display: block;
    font-size: x-small;
    width: 100%;
    padding: 0 .5rem;
}

.k-switch.show-label .k-switch-label-off {
    text-align: right;
}

.k-treelist td[role='gridcell']:first-child {
	display: flex;
	align-items: center;
    min-height: 1.95rem;
	flex-wrap: nowrap;
}