:root {
	--navbar-background-color: #f8f8f8;
	--sticky-background-color: #bbb;
	--navbar-border-color: #e7e7e7;
	--navbar-background-color-dark: #272727;
	--sticky-background-color-dark: #222;
	--navbar-border-color-dark: #333333;
	--WebUI-setting-color: #00009b;
	--WebUI-setting-color-dark: #68a0ff;
	--sticky-border-color: #888;	
	--sticky-border-color-dark: #888;	
	--WebUI-value-color: #555;
	--WebUI-value-background-color: #e4e4e4;
	--WebUI-link-color: #4b4a4b;
	--WebUI-link-background-color: #f8f8f8;
	--WebUI-subSetting-color: black;
	--WebUI-subSetting-background-color: #bbb;
	--WebUI-subSetting-background-color-dark: #555;
	--WebUI-subSettingNote-background-color: #cce;
	--dark-text: #aaaaaa;
	--dark-text-reversed: #eeeeee;
	--rowSeparator: #e3e3e3;
	--rowSeparator-dark: #404040;
	--btn-hover-color: black;
	--btn-dark-color: #bfbfbf;
	--panel-heading-color: #6b6b6b;
	--select-background-color: #e4e4e4;
	--select-color: #555555;
    --color-border-muted: hsla(210,18%,87%,1);
}

.page-header {
	margin: 20px 0 20px;
}

.page-header .logo {
	margin-right: 5px;
}

.center-text {
	text-align: center;
}
.center-div {
	margin: auto;
}
.valign-center {
	display: flex;
	align-items: center;
}
.navbar-header, .navbar-brand {
	height: 100%;
}
.navbar-header .navbar-brand {
	padding-left: 5px;
}
.navbar-brand img { 
	height: 50px;
	display:inline-block;
	margin-right: 15px;
}
.version-title {
	margin-left: 10px;
	display: inline-block;
	font-size: 80%;
	opacity: 0.7;
}
.version-title-color {
	color: #777;
}
.dark .version-title-color {
	color: var(--dark-text);
}

.navbar-toggle { float: left; margin-left: 10px; }
@media (min-width: 796px) {
	.sidebar { width: 210px; }
	.navbar-title { display: inline-block; }
	#page-wrapper { margin-left: 210px; }
	.navbar-collapse { display: block; visibility: visible; }
}
@media (max-width: 795px) {
	.navbar-default.sidebar { width: 100%; margin: 0px 0px 20px 0px; }
	.navbar-header { float: none; }
	.navbar-title { display: none; }
	.navbar-toggle { display: block; }
	#page-wrapper { margin: 0; }
	.navbar-collapse { display: none; }
	.navbar-brand { float: none; line-height: 18px; }
	.version-title { margin-left: 0; }
}
@media (max-width: 465px) {
	.version-title { font-size: 65%; }
	.navbar-brand { line-height: 15px; }
}

.right-panel .panel:first-of-type {
	margin: 10px 0;
}

hr.panel-primary {
	border-top-width: 10px;
}
.panel-primary {
	border-color: var(--panel-heading-color);
}

.panel-primary>.panel-heading {
	border-color: var(--panel-heading-color);
	background-color: var(--panel-heading-color);
}

.panel-footer {
	background-color: #f2f1f0;
	margin-bottom: 1em;
}


.settingInput { /* Input field in Allsky Settings page */
	width: 120px;
}
.settingInputSelect {
	padding: 0px 3px 0px 3px;
	text-align: right;
}
.settingInputTextNumber {
	padding: 0px 3px 0px 0px;
	text-align: right;
}
.settingInputWidetext {
	padding: 6px 5px;
}
.settingInputBoolean {
	margin-bottom: -3px !important;
	border-radius: 4px;
}

.info-item {
	width: 140px;
	float: left;
}

.switch-title {
	margin-bottom: 6px;
}

.switch-field {
	font-family: "Lucida Grande", Tahoma, Verdana, sans-serif;
	/* old values: margin: 3px 2px -15px 0; */
	margin: 2px 0 -2px 0;
	display: inline-block;
	overflow: hidden;
	border-radius: 4px;
}

.switch-field input {
	position: absolute !important;
	clip: rect(0, 0, 0, 0);
	height: 1px;
	width: 1px;
	border: 0;
	overflow: hidden;
}

.switch-field label {
	float: left;
	display: inline-block;
	width: 60px;
	background-color: #e4e4e4;
	color: rgba(0, 0, 0, 0.6);
	font-size: 14px;
	font-weight: normal;
	text-align: center;
	text-shadow: none;
	padding: 6px 14px;
	border: 1px solid rgba(0, 0, 0, 0.2);
	-webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px rgba(255, 255, 255, 0.1);
	box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px rgba(255, 255, 255, 0.1);
}

.switch-field label:hover {
	cursor: pointer;
}

.switch-field input:checked + label {
	background-color: #3a9e55;
	color: white;
	font-weight: bold;
	-webkit-box-shadow: none;
	box-shadow: none;
}

.switch-field label:first-of-type {
	border-radius: 4px 0 0 4px;
}

.switch-field label:last-of-type {
	border-radius: 0 4px 4px 0;
}

h2 {
	margin-top:0;
}

.nav>li>span {
	position: relative;
	display: block;
	padding: 10px 15px;
	color: #4b4a4b;
	cursor: pointer;
}

body.dark {
	background-color: #222222;
	color: var(--dark-text);
}

.dark #page-wrapper {
	background-color: #171717;
	border-left: #333333;
}

.dark .navbar-default {
	background-color: var(--navbar-background-color-dark);
	border: 1px solid var(--navbar-border-color-dark);
}

.dark .navbar-brand {
	color: var(--dark-text);
}

.dark .sidebar ul li {
	border-bottom: 1px solid #333333;
}

.dark .sidebar ul li a,
.dark .sidebar ul li span {
	color: var(--dark-text);
}

.dark .sidebar ul li a.active {
	background-color: #171717;
}

.dark .nav>li>a:hover {
	background-color: #1D1D1D;
}

.dark .panel {
	background-color: #272727;
}

.dark .panel-default,
.dark .panel-primary {
	border-color: #333333;
}

.dark .panel-heading,
.dark .panel-footer {
	color: var(--dark-text);
	border-color: #333333;
	background-color: #171717;
}

.highlightedBox {
	border: 2px dashed red;
	margin-top: 30px;
	margin-bottom: 30px;
	padding: 10px 5px 10px 5px;
}
.bullet {
	font-weight: bold;
	font-size: 125%;
	display: inline;
	vertical-align: top;
}

.noChanges {
	font-weight: bold;
	font-size: 110%;
	padding: 5px 0 5px 2px;
}

.alert {
	padding: 5px;
	margin-bottom: 3px;
	border-width: 3px;
}
button.close {
	opacity: 0.8;
	color: inherit;
	margin-top: -2px;
}
.alert td {
	padding: 0 5px 0 5px;
}
.alert td .important {
	font-weight: bold;
	font-size: 150%;
	padding-top: 1em;
	padding-bottom: 1em;
	padding-left: 1em;
}
table .alert-dismissable button {
	font-size: 175%;
}
table .alert-dismissable {
	text-align: center;
	padding-right: 4px;
}
.alert-dismissable .close {
	right: 0px;
	opacity: .6;
	top: -1px;
}
.alert-message {
	color: #31708f;
	background-color: #d9edf7;
	border-color: #92b5bd;
}
.dark .alert-message {
	color: #23485a;
	border-color: #99ccdd;
	background-color: #8b989f;
}
.alert-info {
	color: #31708f;
	background-color: #effaff;
	border-color: #92b5bd;
}
.dark .alert-info {	/* TODO: change from .alert-info */
	color: #23485a;
	border-color: #99ccdd;
	background-color: #8b989f;
}
.alert-debug {
	color: #db8300;
	background-color: white;
	border-color: #db8300;
}
.dark .alert-debug {
	color: #e9a846;
	background-color: black;
	border-color: #e9a846#db8300;
}
.dark .alert-success {
	color: #95bb85;
	border-color: #8f9d84;
	border-color: #d2e2c4;
	background-color: #044a05;
}
.dark .alert-warning, .dark .alert-warning a {
	color: #c0bba0;
	border-color: #c0bba0;
	background-color: #8a6b3b;
}
.dark .alert-danger, .dark .alert-danger a {
	color: #f1b1b1;
	border-color: #f1b1b1;
	background-color: #a94442;
}

.dark .form-control,
.dark input[type="text"],
.dark input[type="number"],
.dark select {
	background-color: #171717;
	color: var(--dark-text);
	border-color: #555555;
}

input[type="text"].has-error {
	border-color: #d41c0f !important;
}

.text-danger {
	color: #d41c0f !important;
}

.dark .progress {
	background-color: #171717;
}
.progress-bar {
	color: black;
}
.dark .progress-bar {
	color: #ccc;
}
.dark .progress-bar-success {
	background-color: #276b27;
}
.dark .progress-bar-info {
	background-color: #2a5f6f;
}
.dark .progress-bar-warning {
	background-color: #a7742d;
}

/* used in system.php */
.progress-bar-animated {
	animation-name: progress_bar;
	animation-duration: 0.6s;
	animation-timing-function: ease;
}
@keyframes progress_bar { from { width: 0px } }
.progress-bar-not-animated {
	animation: none !important;
}

.dark .table-striped>tbody>tr:nth-of-type(odd) {
	background-color: #171717;
}

.dark .table>tbody>tr>td,
.dark .table>tbody>tr>th,
.dark .table>tfoot>tr>td,
.dark .table>tfoot>tr>th,
.dark .table>thead>tr>td,
.dark .table>thead>tr>th {
	border-color: transparent;
}

.dark .navbar-default .navbar-collapse {
	border-color: transparent;
}

.dark .switch-field label { 
	background-color: #171717;
	color: var(--dark-text);
}

.dark .switch-field input:checked + label {
	background-color: #1d5f2f;
	color: #171717;
}

/* Buttons */
@media (max-width: 465px) {
	.settings-buttons .btn { padding: 1px 5px; }
	.settings-buttons.container-fluid { padding: 0; }
}

.btn-primary {
	border: 2px solid #00527c;
}
.btn-primary:hover {
	color: black;
	background-color: #73baf7;
}
.dark .btn-primary {
	color: #bfbfbf;
	border-color: #1475a7;
	background-color: #1d5a79;
}

.btn-success {
	border: 2px solid #3e743e;
}
.btn-success:hover {
	color: black;
	background-color: #6cd76c;
}
.dark .btn-success {
	color: #bfbfbf;
	border-color: #5ea853;
	background-color: #338833;
}

.btn-warning {
	border: 2px solid #ac5b09;
	background-color: #e48d12;
}
.btn-warning:hover {
	color: black;
	background-color: #ffa019;
}
.dark .btn-warning {
	color: #bfbfbf;
	background-color: #c46d0d;
	border-color: #e48d2d;
}

.btn-danger {
	color: white;
	border: 2px solid #bf0b06;
	background-color: #f13636;
}
.btn-danger:hover {
	color: black;
	background-color: #f96f6f;
}
.dark .btn-danger {
	color: #bfbfbf;
	background-color: #8d3431;
	border-color: #ad5451;
}

.btn-delete {
	color: white;
	border: 1px solid #d42f3a;
	background-color: #d9534f;
}
.btn-delete:hover {
	color: black;
	background-color: #f96f6f;
}
.dark .btn-delete {
	color: black;
}
.btn-fake {		/* Looks like a button but isn't one - used in documentation */
	pointer-events: none;
	font-size: 80%;
	padding: 3px 6px;
}


.btn.focus.navbar-btn,
.btn:focus.navbar-btn,
.btn:hover.navbar-btn
{
	color: var(--dark-text);
	border: 1px solid var(--dark-text);
}
.dark .btn.focus.navbar-btn,
.dark .btn:focus.navbar-btn,
.dark .btn:hover.navbar-btn,
.dark .help-block
{
	color: var(--dark-text-reversed);
}
.advanced, .btn-advanced { /* "advanced" options are highlighted in same color as button */
	background-color: #fffcc0;
}
.dark .advanced, .dark .btn-advanced {
	color: #bfbfbf;
	border-color: #bdb173;
	background-color: #837a2f;
}
.advanced-nocolor {
	background-color: inherit;
}

.dark .btn-primary:hover,
.dark .btn-success:hover,
.dark .btn-warning:hover,
.dark .btn-danger:hover
{
	color: #efefef;
	border-color: #d6d6d6;
}


@media screen and (max-width: 795px) {
	.dark .table-responsive {
		border-color: transparent;
	}

	.navbar {
		height: 60px;
	}

	.navbar-brand img {
		height: 29px;
	}

	.switch-field {
		display: block;
	}
	
	form thead {
		display: none;
	}
}
.dropdown code {
	line-height: 3;
	padding: .4em .8em;
	margin: 0 .5em;
	font-size: inherit;
	color: var(--select-color);
	background-color: var(--select-background-color);
	border: 1px solid var(--color-border-muted);
	font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
	border-radius: 3px;
}

/* Headers in Allsky settings */
.settingsHeader {
	background-color: #ddd;
	text-align: center;
	font-weight: bold;
	font-size: 1.25em;
	padding: 3px 3px 3px 3px;
}
.markdown-body .settingsHeader {
	font-size: 1em;
	border-radius: 4px;
}
.dark .settingsHeader {
	background-color: #333;
}
.settingsHeaderNote {
	background-color: #ccc;
	font-weight: normal;
	font-size: 0.95em;
}
.dark .settingsHeaderNote {
	background-color: #777;
}
td:has(.subSettingsHeader) {
	padding: 1px 0px 0px 0px;
}
.subSettingsHeader {
	color: var(--WebUI-subSetting-color);
	background-color: var(--WebUI-subSetting-background-color);
	text-align: center;
	font-weight: bold;
	padding: 1px 3px 1px 3px;
}
div.subSettingsHeader {
	font-size: 1.05em;
	margin: 0 3em 0 3em;
	padding: 3px 0px;
}
.dark .subSettingsHeader {
	background-color: var(--WebUI-subSetting-background-color-dark);
	color: var(--dark-text);
}
.subSettingsHeaderNote {
	background-color: var(--WebUI-subSettingNote-background-color);
	font-weight: normal;
	font-size: 0.95em;
}

.headingRow {
	font-size: 110%;
	border-top: 10px solid transparent;
	border-bottom: 5px solid transparent;
}
.headingRowPadding {
	border-top: 3px solid transparent;
	border-bottom: 3px solid transparent;
}
.columnHeader {
	background-color: #aac;
	text-align: center;
	font-weight: bold;
	font-size: 1.05em;
	padding: 0;
}
.dark .columnHeader {
	background-color: #339
}

.headingToggle {
	cursor: pointer;
	padding-left: 0.5em;
}
.headingTitle {
	width: 100%;
	text-align: left;
	padding-left: 20px;
}

.boxShadow {
	-webkit-box-shadow: 2px 3px rgb(0,0,0,15%);
	box-shadow: 2px 3px rgb(0,0,0,15%);
}

/* separate table rows */
.rowSeparator {
	border-bottom: 1px solid var(--rowSeparator);
}
.dark .rowSeparator {
	border-bottom-color: var(--rowSeparator-dark);
}

.form-control,
input[type="text"],
input[type="number"],
input[type="select"],
select {
	background-color: var(--select-background-color);
	color: var(--select-color);
}

/* Colors for user-supplied buttons.
 * In dark theme the border colors become darker.
 * On hover the background and border colors switch.
*/
.btn-red		{ background-color: #cc3030; border-color: #ff6060; color: white; }
.btn-red:hover	{ background-color: #ff6060; border-color: #000000; color: black; }
.dark .btn-red	{ border-color: #ffffff; }

.btn-green		 { background-color: #30cc30; border-color: #60ff60; color: black; }
.btn-green:hover { background-color: #90ff90; border-color: #000000; color: black; }
.dark .btn-green { border-color: #ffffff; }

.btn-blue		{ background-color: #0080ff; border-color: #60bbff; color: white; }
.btn-blue:hover { background-color: #0030dd; border-color: #000000; color: white; }
.dark .btn-blue { border-color: #ffffff; }

.btn-yellow		  { background-color: #ffff00; border-color: #dddd00; color: black; }
.btn-yellow:hover { background-color: #dddd00; border-color: #000000; color: black; }
.dark .btn-yellow { border-color: #ffffff; }

.btn-cyan		{ background-color: #00ffff; border-color: #00dddd; color: black; }
.btn-cyan:hover { background-color: #00dddd; border-color: #000000; color: black; }
.dark .btn-cyan { border-color: #ffffff; }

.btn-white		 { background-color: #f6f6f6; border-color: #bbbbbb; color: black; }
.btn-white:hover { background-color: #bbbbbb; border-color: #000000; color: black; }
.dark .btn-white { border-color: #ffffff; }

.btn-black		 { background-color: #333333; border-color: #777777; color: white; }
.btn-black:hover { background-color: var(--dark-text); border-color: #000000; color: white; }
.dark .btn-black { border-color: #ffffff; }

/* Error messages */
.errorMsg, .errorMsgBig { color: red; }
.errorMsgBig { font-size: 200%; }
.errorMsgBox { border: 2px solid red; padding-left: 5px; padding-right: 5px}

.EXPIRED { color: red; font-weight: bold; }
.systemPageAdditionsLineType {
	font-weight: bold;
	font-family: monospace;
	color: green;
}

.thumb { width: 100px; margin: 0 1px 1px 0; }
.thumbBorder { border: 1px solid transparent; }
.dark .thumbBorder { border: 1px solid gray; }
.left { float: left; }

.notConfigured {
	border: 3px dashed red;
	padding: 15px;
	font-weight: bold;
	font-size: 150%;
	margin: 10px 0 0 0;
	text-align: center;
}
.system-message {
	border: 3px solid red;
	padding: 5px;
}
.system-message .title {
	font-weight: bold;
	font-size: 120%;
	margin: 3px 0 5px 0;
	text-align: center;
}
.system-message .message-button {
	margin-top: 10px;
	margin-bottom: 5px;
	display: flex;
	justify-content: center;
}
.row .row .col-lg-12 {
	padding: 0px 0px;
}
.panel-body .row {
	margin: 0;
}
.nowrap {
	white-space: nowrap;
}
.WebUILink {	/* link on the WebUI to one of its pages */
	font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
	padding: 0 .2em;
	color: var(--WebUI-link-color);
	background-color: var(--WebUI-link-background-color);
	border-top: 2px solid var(--navbar-border-color);
	border-bottom: 2px solid var(--navbar-border-color);
}
.WebUISetting {	/* Matches what's in the WebUI */
	font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
	color: var(--WebUI-setting-color);
	font-weight: bold;
}
.dark .WebUISetting {
	color: var(--WebUI-setting-color-dark);
}
.WebUIValue {
	padding: 0 3px 0 3px;
	font-size: 14px;
	font-family: inherit;
	color: var(--WebUI-value-color);
	background-color: var(--WebUI-value-background-color);
	border: 1px solid #ccc;
	border-radius: 4px;
}

.viewer-toolbar {
	background-color: black !important;
}
.viewer-navbar {
	background-color: black !important;
}
.viewer-list>li {
	border: 2px solid white !important;
	margin-left: 4px !important;
	width: fit-content !important;
}
.viewer-close:before {
	font-size: 4em !important;
	background-image: none !important;
}

.cursorPointer {
	cursor: pointer;
}
.live_container {
	background-color: black;
}
.current {
	width: 100%;
}

div.sticky {
	position: -webkit-sticky;
	position: sticky;
	top: 5px;
	margin-top: 10px;
	padding: 10px 0 10px 0;
	background: rgba(187,187,187, 1);
	border: 2px solid var(--sticky-border-color);
}
.dark div.sticky {
	background: rgba(34,34,34, 0.9);
	border-color: var(--sticky-border-color-dark);
}
#backToTopBtn {
	display: none; /* Hidden by default */
	position: fixed; /* Fixed/sticky position */
	bottom: 20px; /* Place the button at the bottom of the page */
	right: 30px; /* Place the button 30px from the right */
	z-index: 99; /* Make sure it does not overlap */
	border: none; /* Remove borders */
	outline: none; /* Remove outline */
	background-color: #555; /* Set a background color */
	color: white; /* Text color */
	cursor: pointer; /* Add a mouse pointer on hover */
	padding: 15px; /* Some padding */
	border-radius: 10px; /* Rounded corners */
	font-size: 18px; /* Increase font size */
}

#backToTopBtn:hover {
	background-color: #888; /* Add a lighter-grey background on hover */
}


.middleVerticalAlign {
	vertical-align: middle;
}
.centerImg {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.externalSmall {	/* the icon indicated a new web page */
	font-size: 90%;
}

.executeAction {
	color: red;
}
.removeMessage {
	color: red;
	font-weight: bold;
	font-size: 150%;
	margin-top: 10px;
	margin-bottom: 10px;
}
.dark .removeMessage {
	color: white;
}

/* Classes specific to WebUI pages */
.editorForm {
	display: inline-block;
	width: auto;
	margin-right: 15px;
	margin-bottom: 5px;
}
.editorSaveChanges {
	margin-bottom: 5px;
}
.editorBottomSection {
	margin-top: 15px;
}
.functionsListFileType {
	float: left;
	width: 100%;
	margin-bottom: 2px;
}
.functionsListTypeImg {
	margin-left: 10px;
	max-width: 50%;
	max-height:100px;
}
.imagesSortOrder {
	font-size: 60%;
}
.as-nav-toggle {
	float: left !important;
	margin-left: 5px;
}

/* Settings Navigation */


/* Boostrap 5 emulation (Assumes $spacer as 1rem) */
.mt-0 {
	margin-top: 0 !important;
}
.mt-1 {
	margin-top: 0.25rem !important;
}
.mt-2 {
	margin-top: 0.5rem !important;
}
.mt-3 {
	margin-top: 1rem !important;
}
.mt-4 {
	margin-top: 1.5rem !important;
}
.mt-5 {
	margin-top: 3rem !important;
}

.ml-0 {
	margin-left: 0 !important;
}
.ml-1 {
	margin-left: 0.25rem !important;
}
.ml-2 {
	margin-left: 0.5rem !important;
}
.ml-3 {
	margin-left: 1rem !important;
}
.ml-4 {
	margin-left: 1.5rem !important;
}
.ml-5 {
	margin-left: 3rem !important;
}

/* Code Editor */

.cm-string.highlight {
    background-color: lightgreen;
    color: black !important;
}

#as-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5); 
    z-index: 2; 
    cursor: pointer;
}

#as-overlay.big {
    height: 80vh;
}

#as-overlay .center {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 25%;
    font-size: 2em;
}

#as-overlay .center-full {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    font-size: 2em;
}

#as-overlay .center,.center-full .center-paragraph {
    text-align: center;
    border: 3px solid green;
    background-color: rgba(0,0,0,0.3);
    padding: 15px;    
}

#as-overlay small {
    font-size: 50% !important;
}

#as-overlay p {
    margin: 0px !important;
}

#as-overlay h1 {
    margin-top: 10px !important;
    margin-bottom: 10px !important;
}
