/* non-mobile screens */
@media (min-width: 768px) {
	.container { width: 90% !important; }
	.tab-content { padding: 10px 20px; border: 1px solid var(--tab-content-border-color); border-top: none; }
	.container-fluid .main-content { padding-left: 4em; padding-right: 4em; }
}

@media print {
	a[href]:after { content: "" !important; }
	.container { width: 98% !important; }
}

.rtl { direction: rtl !important; }
.ltr { direction: ltr !important; }

.navbar-brand { text-transform: capitalize; }

table a, .table a { text-decoration: none !important; }

#children-tabs li a { display: block !important; }

.hidden { display: none !important; }

iframe { border: none; overflow: auto; }

#pc-loading { background: none repeat scroll 0 0 yellow; font-family: arial; left: 10px; margin-top: -10px; opacity: 0.85; position: absolute; top: 20px; width: 150px; }

.navbar-nav > a.btn, .navbar-nav > .btn-group { margin-left: 10px; margin-right: 10px; }

.view-on-click a.btn { max-width: 75px; }

/* prevent prototype conflicts */
li.dropdown { display: block !important; }

/* horizontal spacer */
.hspacer-xs { margin-left: 0.1em; margin-right: 0.1em; }
.hspacer-sm { margin-left: 0.2em; margin-right: 0.2em; }
.hspacer-md { margin-left: 0.4em; margin-right: 0.4em; }
.hspacer-lg { margin-left: 0.8em; margin-right: 0.8em; }

.container:not(.theme-rtl), .container-fluid:not(.theme-rtl) {
	/* right spacer in ltr context */
	.rspacer-xs { margin-right: 0.1em; }
	.rspacer-sm { margin-right: 0.2em; }
	.rspacer-md { margin-right: 0.4em; }
	.rspacer-lg { margin-right: 0.8em; }
	/* left spacer in ltr context */
	.lspacer-xs { margin-left: 0.1em; }
	.lspacer-sm { margin-left: 0.2em; }
	.lspacer-md { margin-left: 0.4em; }
	.lspacer-lg { margin-left: 0.8em; }

	/* prevent right-aligned fields in non-default TV layouts from being too wide */
	.dl-horizontal dd.text-right, .dl-horizontal dd > div.text-right { max-width: 8em; }

	#admin-tools-menu-button{ display: inline-block !important; margin: 0 1em 0 0; }
}

/* vertical spacer */
.vspacer-xs { margin-top: 0.1em; margin-bottom: 0.1em; }
.vspacer-sm { margin-top: 0.2em; margin-bottom: 0.2em; }
.vspacer-md { margin-top: 0.4em; margin-bottom: 0.4em; }
.vspacer-lg { margin-top: 0.8em; margin-bottom: 0.8em; }

/* top spacer */
.tspacer-xs { margin-top: 0.1em; }
.tspacer-sm { margin-top: 0.2em; }
.tspacer-md { margin-top: 0.4em; }
.tspacer-lg { margin-top: 0.8em; }

/* bottom spacer */
.bspacer-xs { margin-bottom: 0.1em; }
.bspacer-sm { margin-bottom: 0.2em; }
.bspacer-md { margin-bottom: 0.4em; }
.bspacer-lg { margin-bottom: 0.8em; }

div.datePicker { font-size: 1.3em; }
.always_shown { display: inline !important; }
.always-shown-block { display: block !important; }
.always-shown-inline { display: inline !important; }
.always-shown-inline-block { display: inline-block !important; }
.text-bold { font-weight: bold !important; }
.text-italic { font-style: italic !important; }

/* .form-control, .help-block .alert { width: 90% !important; } */
.input-group .form-control { width: 100% !important; }
.admin-area .form-inline .form-control { width: auto !important; }
.panel .btn, .xs-panel .btn { overflow: hidden; }

.select2-container .select2-choice { height: 2.4em; line-height: 2.2em; }
.select2-container .select2-choice .select2-arrow b { background-position: 0 -0.1em; }

.navbar ul.dropdown-menu { max-height: 90vh; overflow-y: auto; }

.date_combo { padding-right: 0.5em; }
/* .date_combo select { width: 100% !important; padding-left: 0; padding-right: 0; } */

img[src="blank.gif"] { max-height: 10px !important; }

/* fix for scrolling wide tables horizontally on iOS, https://stackoverflow.com/a/39073181/1945185 */
.table-responsive .table {
	max-width: none;
	-webkit-overflow-scrolling: touch !important;
}

/* fixes for glyph icons in some themes */
.glyphicon-camera:before { content: "\e046"; }
.glyphicon-lock:before { content: "\e033"; }
.glyphicon-eur:before { content: "\20ac"; }
.glyphicon-calendar:before { content: "\e109"; }
.glyphicon-bell:before { content: "\e123"; }
.glyphicon-wrench:before { content: "\e136"; }
.glyphicon-briefcase:before { content: "\e139"; }

.navbar-right:not(.navbar-text) {
	margin-right: 0 !important;
}
.navbar-right.navbar-text {
	margin-right: 1em !important;
}
.navbar-right > .navbar-btn {
	margin-right: .5em;
}

.no-caption .field-caption-tv {  display: none; }
.no-caption dd { margin-left: 0; margin-right: 0; }

.nav-tabs a img { margin: 0 0.25em; }

/* rotation classes */
.rotate90 { -ms-transform: rotate(90deg); -webkit-transform: rotate(90deg); transform: rotate(90deg); }
.rotate180 { -ms-transform: rotate(180deg); -webkit-transform: rotate(180deg); transform: rotate(180deg); }
.rotate270 { -ms-transform: rotate(270deg); -webkit-transform: rotate(270deg); transform: rotate(270deg); }

/* compacting mobile borders for DV */
.detail_view .form-group hr { margin: 0 0 0.5em 0; border-top-style: dashed; }

/* tv tools button widths */
.tv-tools .btn { width: 5em; }

#spm_notification { direction: ltr !important; }

/* file upload box formatting */
.upload-toolbox {
	overflow-x: hidden;
	font-size: 1.2rem;
	text-align: left;
	margin-bottom: 0;
	background-color: rgba(255, 255, 255, 0.5);
	box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.5);
	max-width: 25em;
	float: right;
}
.upload-toolbox input[type="file"] {
	display: inline-block;
}
.form-control-static.well {
	margin-bottom: 0;
}
.file-type-error, .file-size-error {
	margin-top: 1rem;
}
.clear-upload {
	cursor: pointer;
}

/* auto-complete matches */
.select2-result-selectable .select2-match, .select2-result-unselectable .select2-match {
	font-weight: bold;
	background-color: rgba(255, 255, 0, 0.5);
}

/* continuous rotation animation */
.loop-rotate, .spin {
	animation: spin 2s linear infinite;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

kbd {
	background-color: #eee;
	border-radius: 3px;
	border: 1px solid #b4b4b4;
	box-shadow: 0 1px 1px rgba(0, 0, 0, .2), 0 2px 0 0 rgba(255, 255, 255, .7) inset;
	color: #333;
	display: inline-block;
	font-size: .85em;
	font-weight: 700;
	line-height: 1;
	padding: 4px 8px;
	white-space: nowrap;
}

th:focus {
	outline: thin dotted;
}

.nav .dropdown-menu img {
	max-height: 1.25em;
}

.profile-menu li img {
	height: 1.5em !important;
	vertical-align: text-bottom;
	margin-left: -.4em;
}

/* web and email links in DV */
.detail_view a > .glyphicon-globe {
	vertical-align: top;
	font-size: x-large;
}
.detail_view a > .glyphicon-envelope {
	vertical-align: text-bottom;
	font-size: large;
}

.glyphicon-lg {
	font-size: 2em;
}

/* fix nicedit components' dimensions */
.has-nicedit > div { width: 100% !important; }
.has-nicedit .nicEdit-main { width: 99% !important; }
.nicEdit-main { min-height: 6em !important; /* overflow: auto !important; */ }

/* hide empty email links */
a[href="mailto:"] { display: none; }

/* flex layout for lookup drop-downs and dates */
.lookup-flex, .date-flex {
	display: flex;
	justify-content: space-between;
	gap: .5em;
}
.lookup-flex > .select2-container {
	flex-grow: 1;
	width: auto !important;
}
.lookup-flex > .view_parent,
.lookup-flex > .add_new_parent {
	flex-basis: 3em;
}
.date-flex > .month-select {
	flex-grow: 4;
}
.date-flex > .year-select {
	flex-grow: 2;
}
.date-flex > .day-select {
	flex-grow: 1;
}
.date-flex > .btn {
	flex-basis: 3em;
}
.date-flex > select.form-control {
	width: auto; display: unset;
}

/* Classes that can be added to .glyphicon to variate icons */
.flip-horizontal { transform: scaleX(-1); }
.flip-vertical { transform: scaleY(-1); }

/* profile menu icon */
.profile-menu-icon > .icon {
	border: solid 1px #ccc; border-radius: 50%; padding: 6px !important;
}

.theme-journal .profile-menu-icon > .icon { padding: 6px !important; }

.theme-paper .profile-menu-icon > .icon { padding: 6px !important; }

.theme-readable .profile-menu-icon > .icon { padding: 6px !important; }

.theme-sandstone .profile-menu-icon > .icon { padding: 6px !important; }
.profile-menu-text { margin: 0 .25em; display: none; }

/* child record info in tv */
.child-records-info > a {
	display: inline-block;
}
.child-records-info > a.children-count-link {
	text-align: right;
	width: calc(100% - 3em);
}
dd.child-records-info > a.children-count-link {
	max-width: 6em;
}
.child-records-info > a.new-child {
	text-align: center;
	width: 2.5em;
}
.update-children-count {
	height: .8em;
}

.sql-query-container {
	white-space: pre-wrap;
	word-break: break-word;
	direction: ltr;
	cursor: pointer;
	padding-top: 2em;
}
.sql-query-copier {
	position: absolute !important;
	top: 0 !important;
	right: 1em !important;
}
.theme-yeti {
	.bg-primary, .bg-primary a,
	.bg-primary.text-primary, .bg-primary .text-primary,
	.light-text {
		color: #fff;
	}

	.table-hover>tbody>tr.bg-primary:hover, .table-hover>tbody>tr:hover .bg-primary,
	.table-striped>tbody>tr.bg-primary:nth-of-type(2n+1), .table-striped>tbody>tr:nth-of-type(2n+1) .bg-primary,
	.dark-text {
		color: #222;
	}

	.table-hover>tbody>tr.bg-primary:hover a, .table-hover>tbody>tr:hover .bg-primary a,
	.table-striped>tbody>tr.bg-primary:nth-of-type(2n+1) a, .table-striped>tbody>tr:nth-of-type(2n+1) .bg-primary a,
	.dark-link {
		color: #008cba;
	}

	.progress{
		height: 2.5em;
	}

	.progress .progress-bar {
		line-height: 2;
		font-size: 1em;
	}

	.navbar-toggle > .glyphicon-menu-hamburger,
	.navbar-toggle > .glyphicon-remove {
		color: #ddd;
	}
}

.theme-united {
	.bg-primary, .bg-primary a,
	.bg-primary.text-primary, .bg-primary .text-primary,
	.light-text {
		color: #fff;
	}

	.table-hover>tbody>tr.bg-primary:hover, .table-hover>tbody>tr:hover .bg-primary,
	.table-striped>tbody>tr.bg-primary:nth-of-type(2n+1), .table-striped>tbody>tr:nth-of-type(2n+1) .bg-primary,
	.dark-text {
		color: #333;
	}

	.table-hover>tbody>tr.bg-primary:hover a, .table-hover>tbody>tr:hover .bg-primary a,
	.table-striped>tbody>tr.bg-primary:nth-of-type(2n+1) a, .table-striped>tbody>tr:nth-of-type(2n+1) .bg-primary a,
	.dark-link {
		color: #dd4814;
	}

}

.theme-superhero {
	.bg-info, .bg-info a,
	.bg-warning, .bg-warning a,
	.bg-danger, .bg-danger a,
	.bg-success, .bg-success a,
	.bg-primary, .bg-primary a,

	.bg-info.text-info, .bg-info .text-info,
	.bg-warning.text-warning, .bg-warning .text-warning,
	.bg-danger.text-danger, .bg-danger .text-danger,
	.bg-success.text-success, .bg-success .text-success,
	.bg-primary.text-primary, .bg-primary .text-primary,

	.light-text {
		color: #ebebeb;
	}

	.dark-text {
		color: #ebebeb;
	}

	.dark-link {
		color: #df691a;
	}

	.navbar-default {
		background-color: #414951;
	}
}

.theme-spacelab {
	.bg-primary, .bg-primary a,
	.light-text {
		color: #fff;
	}

	.table-hover>tbody>tr.bg-primary:hover, .table-hover>tbody>tr:hover .bg-primary,
	.table-striped>tbody>tr.bg-primary:nth-of-type(2n+1), .table-striped>tbody>tr:nth-of-type(2n+1) .bg-primary,
	.dark-text {
		color: #666;
	}

	.table-hover>tbody>tr.bg-primary:hover a, .table-hover>tbody>tr:hover .bg-primary a,
	.table-striped>tbody>tr.bg-primary:nth-of-type(2n+1) a, .table-striped>tbody>tr:nth-of-type(2n+1) .bg-primary a,
	.dark-link {
		color: #3399f3;
	}

}

.theme-slate {
	.bg-danger, .bg-danger a,
	.bg-primary, .bg-primary a,
	.light-text {
		color: #fff;
	}

	.dark-text {
		color: #c8c8c8;
	}

	.dark-link {
		color: #fff;
	}

}

.theme-simplex {
	.bg-primary, .bg-primary a,
	.light-text {
		color: #fff;
	}

	.table-hover>tbody>tr.bg-primary:hover, .table-hover>tbody>tr:hover .bg-primary,
	.table-striped>tbody>tr.bg-primary:nth-of-type(2n+1), .table-striped>tbody>tr:nth-of-type(2n+1) .bg-primary,
	.dark-text {
		color: #777;
	}

	.table-hover>tbody>tr.bg-primary:hover a, .table-hover>tbody>tr:hover .bg-primary a,
	.table-striped>tbody>tr.bg-primary:nth-of-type(2n+1) a, .table-striped>tbody>tr:nth-of-type(2n+1) .bg-primary a,
	.dark-link {
		color: #d9230f;
	}

}

.theme-sandstone {
	.bg-primary, .bg-primary a,
	.light-text {
		color: #fff;
	}

	.table-hover>tbody>tr.bg-primary:hover, .table-hover>tbody>tr:hover .bg-primary,
	.table-striped>tbody>tr.bg-primary:nth-of-type(2n+1), .table-striped>tbody>tr:nth-of-type(2n+1) .bg-primary,
	.dark-text {
		color: #3e3f3a;
	}

	.table-hover>tbody>tr.bg-primary:hover a, .table-hover>tbody>tr:hover .bg-primary a,
	.table-striped>tbody>tr.bg-primary:nth-of-type(2n+1) a, .table-striped>tbody>tr:nth-of-type(2n+1) .bg-primary a,
	.dark-link {
		color: #93c54b;
	}

	.navbar-toggle > .glyphicon-menu-hamburger,
	.navbar-toggle > .glyphicon-remove {
		color: #ddd;
	}
}

.theme-readable {
	.bg-primary, .bg-primary a,
	.light-text {
		color: #fff;
	}

	.table-hover>tbody>tr.bg-primary:hover, .table-hover>tbody>tr:hover .bg-primary,
	.table-striped>tbody>tr.bg-primary:nth-of-type(2n+1), .table-striped>tbody>tr:nth-of-type(2n+1) .bg-primary,
	.dark-text {
		color: #333;
	}

	.table-hover>tbody>tr.bg-primary:hover a, .table-hover>tbody>tr:hover .bg-primary a,
	.table-striped>tbody>tr.bg-primary:nth-of-type(2n+1) a, .table-striped>tbody>tr:nth-of-type(2n+1) .bg-primary a,
	.dark-link {
		color: #4582ec;
	}

}

.theme-paper {
	.bg-primary, .bg-primary a,
	.light-text {
		color: #fff;
	}

	.table-hover>tbody>tr.bg-primary:hover, .table-hover>tbody>tr:hover .bg-primary,
	.table-striped>tbody>tr.bg-primary:nth-of-type(2n+1), .table-striped>tbody>tr:nth-of-type(2n+1) .bg-primary,
	.dark-text {
		color: #666;
	}

	.table-hover>tbody>tr.bg-primary:hover a, .table-hover>tbody>tr:hover .bg-primary a,
	.table-striped>tbody>tr.bg-primary:nth-of-type(2n+1) a, .table-striped>tbody>tr:nth-of-type(2n+1) .bg-primary a,
	.dark-link {
		color: #2196f3;
	}

	.progress{
		height: 2em;
	}

	.progress .progress-bar {
		line-height: 2;
		font-size: 1em;
	}
}

.theme-journal {
	.bg-primary, .bg-primary a,
	.light-text {
		color: #fff;
	}

	.table-hover>tbody>tr.bg-primary:hover, .table-hover>tbody>tr:hover .bg-primary,
	.table-striped>tbody>tr.bg-primary:nth-of-type(2n+1), .table-striped>tbody>tr:nth-of-type(2n+1) .bg-primary,
	.dark-text {
		color: #777;
	}

	.table-hover>tbody>tr.bg-primary:hover a, .table-hover>tbody>tr:hover .bg-primary a,
	.table-striped>tbody>tr.bg-primary:nth-of-type(2n+1) a, .table-striped>tbody>tr:nth-of-type(2n+1) .bg-primary a,
	.dark-link {
		color: #eb6864;
	}

}

.theme-flatly {

	.bg-info, .bg-info a,
	.bg-warning, .bg-warning a,
	.bg-danger, .bg-danger a,
	.bg-success, .bg-success a,
	.bg-primary, .bg-primary a,

	.bg-info.text-info, .bg-info .text-info,
	.bg-warning.text-warning, .bg-warning .text-warning,
	.bg-danger.text-danger, .bg-danger .text-danger,
	.bg-success.text-success, .bg-success .text-success,
	.bg-primary.text-primary, .bg-primary .text-primary,

	.light-text {
		color: #fff;
	}

	.table-hover>tbody>tr.bg-primary:hover, .table-hover>tbody>tr:hover .bg-primary,
	.table-hover>tbody>tr.bg-success:hover, .table-hover>tbody>tr:hover .bg-success,
	.table-hover>tbody>tr.bg-warning:hover, .table-hover>tbody>tr:hover .bg-warning,
	.table-hover>tbody>tr.bg-info:hover, .table-hover>tbody>tr:hover .bg-info,
	.table-hover>tbody>tr.bg-danger:hover, .table-hover>tbody>tr:hover .bg-danger,

	.table-striped>tbody>tr.bg-primary:nth-of-type(2n+1), .table-striped>tbody>tr:nth-of-type(2n+1) .bg-primary,
	.table-striped>tbody>tr.bg-success:nth-of-type(2n+1), .table-striped>tbody>tr:nth-of-type(2n+1) .bg-success,
	.table-striped>tbody>tr.bg-warning:nth-of-type(2n+1), .table-striped>tbody>tr:nth-of-type(2n+1) .bg-warning,
	.table-striped>tbody>tr.bg-info:nth-of-type(2n+1), .table-striped>tbody>tr:nth-of-type(2n+1) .bg-info,
	.table-striped>tbody>tr.bg-danger:nth-of-type(2n+1), .table-striped>tbody>tr:nth-of-type(2n+1) .bg-danger,

	.dark-text {
		color: #3c3c3c;
	}

	.table-hover>tbody>tr.bg-primary:hover a, .table-hover>tbody>tr:hover .bg-primary a,
	.table-hover>tbody>tr.bg-success:hover a, .table-hover>tbody>tr:hover .bg-success a,
	.table-hover>tbody>tr.bg-warning:hover a, .table-hover>tbody>tr:hover .bg-warning a,
	.table-hover>tbody>tr.bg-info:hover a, .table-hover>tbody>tr:hover .bg-info a,
	.table-hover>tbody>tr.bg-danger:hover a, .table-hover>tbody>tr:hover .bg-danger a,

	.table-striped>tbody>tr.bg-primary:nth-of-type(2n+1) a, .table-striped>tbody>tr:nth-of-type(2n+1) .bg-primary a,
	.table-striped>tbody>tr.bg-success:nth-of-type(2n+1) a, .table-striped>tbody>tr:nth-of-type(2n+1) .bg-success a,
	.table-striped>tbody>tr.bg-warning:nth-of-type(2n+1) a, .table-striped>tbody>tr:nth-of-type(2n+1) .bg-warning a,
	.table-striped>tbody>tr.bg-info:nth-of-type(2n+1) a, .table-striped>tbody>tr:nth-of-type(2n+1) .bg-info a,
	.table-striped>tbody>tr.bg-danger:nth-of-type(2n+1) a, .table-striped>tbody>tr:nth-of-type(2n+1) .bg-danger a,

	.dark-link {
		color: #18bc9c;
	}

	.progress{
		height: 2em;
	}

	.progress .progress-bar {
		line-height: 2;
		font-size: 1em;
	}

	.navbar-toggle > .glyphicon-menu-hamburger,
	.navbar-toggle > .glyphicon-remove {
		color: #ddd;
	}
}

.theme-darkly {

	.bg-info, .bg-info a,
	.bg-warning, .bg-warning a,
	.bg-danger, .bg-danger a,
	.bg-success, .bg-success a,
	.bg-primary, .bg-primary a,

	.bg-info.text-info, .bg-info .text-info,
	.bg-warning.text-warning, .bg-warning .text-warning,
	.bg-danger.text-danger, .bg-danger .text-danger,
	.bg-success.text-success, .bg-success .text-success,
	.bg-primary.text-primary, .bg-primary .text-primary,

	.light-text {
		color: #fff;
	}

	.progress{
		height: 2em;
	}

	.progress .progress-bar {
		line-height: 2;
		font-size: 1em;
	}

}

.theme-cyborg {
	.bg-info, .bg-info a,
	.bg-warning, .bg-warning a,
	.bg-danger, .bg-danger a,
	.bg-success, .bg-success a,
	.bg-primary, .bg-primary a,

	.bg-info.text-info, .bg-info .text-info,
	.bg-warning.text-warning, .bg-warning .text-warning,
	.bg-danger.text-danger, .bg-danger .text-danger,
	.bg-success.text-success, .bg-success .text-success,
	.bg-primary.text-primary, .bg-primary .text-primary,

	.light-text {
		color: #fff;
	}

}

.theme-cosmo {
	.bg-info, .bg-info a,
	.bg-warning, .bg-warning a,
	.bg-danger, .bg-danger a,
	.bg-success, .bg-success a,
	.bg-primary, .bg-primary a,

	.bg-info.text-info, .bg-info .text-info,
	.bg-warning.text-warning, .bg-warning .text-warning,
	.bg-danger.text-danger, .bg-danger .text-danger,
	.bg-success.text-success, .bg-success .text-success,
	.bg-primary.text-primary, .bg-primary .text-primary,

	.light-text {
		color: #fff;
	}

	.table-hover>tbody>tr.bg-primary:hover, .table-hover>tbody>tr:hover .bg-primary,
	.table-hover>tbody>tr.bg-success:hover, .table-hover>tbody>tr:hover .bg-success,
	.table-hover>tbody>tr.bg-warning:hover, .table-hover>tbody>tr:hover .bg-warning,
	.table-hover>tbody>tr.bg-info:hover, .table-hover>tbody>tr:hover .bg-info,
	.table-hover>tbody>tr.bg-danger:hover, .table-hover>tbody>tr:hover .bg-danger,

	.table-striped>tbody>tr.bg-primary:nth-of-type(2n+1), .table-striped>tbody>tr:nth-of-type(2n+1) .bg-primary,
	.table-striped>tbody>tr.bg-success:nth-of-type(2n+1), .table-striped>tbody>tr:nth-of-type(2n+1) .bg-success,
	.table-striped>tbody>tr.bg-warning:nth-of-type(2n+1), .table-striped>tbody>tr:nth-of-type(2n+1) .bg-warning,
	.table-striped>tbody>tr.bg-info:nth-of-type(2n+1), .table-striped>tbody>tr:nth-of-type(2n+1) .bg-info,
	.table-striped>tbody>tr.bg-danger:nth-of-type(2n+1), .table-striped>tbody>tr:nth-of-type(2n+1) .bg-danger,

	.dark-text {
		color: #333;
	}

	.table-hover>tbody>tr.bg-primary:hover a, .table-hover>tbody>tr:hover .bg-primary a,
	.table-hover>tbody>tr.bg-success:hover a, .table-hover>tbody>tr:hover .bg-success a,
	.table-hover>tbody>tr.bg-warning:hover a, .table-hover>tbody>tr:hover .bg-warning a,
	.table-hover>tbody>tr.bg-info:hover a, .table-hover>tbody>tr:hover .bg-info a,
	.table-hover>tbody>tr.bg-danger:hover a, .table-hover>tbody>tr:hover .bg-danger a,

	.table-striped>tbody>tr.bg-primary:nth-of-type(2n+1) a, .table-striped>tbody>tr:nth-of-type(2n+1) .bg-primary a,
	.table-striped>tbody>tr.bg-success:nth-of-type(2n+1) a, .table-striped>tbody>tr:nth-of-type(2n+1) .bg-success a,
	.table-striped>tbody>tr.bg-warning:nth-of-type(2n+1) a, .table-striped>tbody>tr:nth-of-type(2n+1) .bg-warning a,
	.table-striped>tbody>tr.bg-info:nth-of-type(2n+1) a, .table-striped>tbody>tr:nth-of-type(2n+1) .bg-info a,
	.table-striped>tbody>tr.bg-danger:nth-of-type(2n+1) a, .table-striped>tbody>tr:nth-of-type(2n+1) .bg-danger a,

	.dark-link {
		color: #2780e3;
	}

	.progress{
		height: 2em;
	}

	.progress .progress-bar {
		line-height: 2;
		font-size: 1em;
	}

	.navbar-toggle > .glyphicon-menu-hamburger,
	.navbar-toggle > .glyphicon-remove {
		color: #ddd;
	}
	.navbar-default {
		background-color: #333;
	}
}

.theme-cerulean {
	.bg-primary, .bg-primary a,
	.bg-primary.text-primary, .bg-primary .text-primary,
	.light-text {
		color: #fff;
	}

	.table-hover>tbody>tr.bg-primary:hover, .table-hover>tbody>tr:hover .bg-primary,
	.table-hover>tbody>tr.bg-success:hover, .table-hover>tbody>tr:hover .bg-success,
	.table-hover>tbody>tr.bg-warning:hover, .table-hover>tbody>tr:hover .bg-warning,
	.table-hover>tbody>tr.bg-info:hover, .table-hover>tbody>tr:hover .bg-info,
	.table-hover>tbody>tr.bg-danger:hover, .table-hover>tbody>tr:hover .bg-danger,

	.table-striped>tbody>tr.bg-primary:nth-of-type(2n+1), .table-striped>tbody>tr:nth-of-type(2n+1) .bg-primary,
	.table-striped>tbody>tr.bg-success:nth-of-type(2n+1), .table-striped>tbody>tr:nth-of-type(2n+1) .bg-success,
	.table-striped>tbody>tr.bg-warning:nth-of-type(2n+1), .table-striped>tbody>tr:nth-of-type(2n+1) .bg-warning,
	.table-striped>tbody>tr.bg-info:nth-of-type(2n+1), .table-striped>tbody>tr:nth-of-type(2n+1) .bg-info,
	.table-striped>tbody>tr.bg-danger:nth-of-type(2n+1), .table-striped>tbody>tr:nth-of-type(2n+1) .bg-danger,

	.dark-text {
		color: #555;
	}

	.table-hover>tbody>tr.bg-primary:hover a, .table-hover>tbody>tr:hover .bg-primary a,
	.table-hover>tbody>tr.bg-success:hover a, .table-hover>tbody>tr:hover .bg-success a,
	.table-hover>tbody>tr.bg-warning:hover a, .table-hover>tbody>tr:hover .bg-warning a,
	.table-hover>tbody>tr.bg-info:hover a, .table-hover>tbody>tr:hover .bg-info a,
	.table-hover>tbody>tr.bg-danger:hover a, .table-hover>tbody>tr:hover .bg-danger a,

	.table-striped>tbody>tr.bg-primary:nth-of-type(2n+1) a, .table-striped>tbody>tr:nth-of-type(2n+1) .bg-primary a,
	.table-striped>tbody>tr.bg-success:nth-of-type(2n+1) a, .table-striped>tbody>tr:nth-of-type(2n+1) .bg-success a,
	.table-striped>tbody>tr.bg-warning:nth-of-type(2n+1) a, .table-striped>tbody>tr:nth-of-type(2n+1) .bg-warning a,
	.table-striped>tbody>tr.bg-info:nth-of-type(2n+1) a, .table-striped>tbody>tr:nth-of-type(2n+1) .bg-info a,
	.table-striped>tbody>tr.bg-danger:nth-of-type(2n+1) a, .table-striped>tbody>tr:nth-of-type(2n+1) .bg-danger a,

	.dark-link {
		color: #2fa4e7;
	}

}

.theme-bootstrap {
	.bg-primary, .bg-primary a,
	.bg-primary.text-primary, .bg-primary .text-primary,
	.light-text {
		color: #fff;
	}

	.table-hover>tbody>tr.bg-primary:hover, .table-hover>tbody>tr:hover .bg-primary,
	.table-striped>tbody>tr.bg-primary:nth-of-type(2n+1), .table-striped>tbody>tr:nth-of-type(2n+1) .bg-primary,
	.dark-text {
		color: #333;
	}

	.table-hover>tbody>tr.bg-primary:hover a, .table-hover>tbody>tr:hover .bg-primary a,
	.table-striped>tbody>tr.bg-primary:nth-of-type(2n+1) a, .table-striped>tbody>tr:nth-of-type(2n+1) .bg-primary a,
	.dark-link {
		color: #337ab7;
	}

}

/* fix date picker display in dark themes */
body:has(.theme-cyborg),
body:has(.theme-darkly),
body:has(.theme-slate),
body:has(.theme-superhero) {
	.datePicker td:not(.date-picker-highlight) {
		color: #222222;
	}
}

td.row .img-responsive {
	max-width: 100% !important;
}

.modal-top-spacer {
	height: 2rem;
}

/* Styling for detail view layout toobar and detail view columns */
.detail_view-layout {
	display: none;
	margin: 0 0 1em 0;
	text-align: right;
}
.detail_view-layout a {
	outline: none;
}
.switch-to-single-column-layout, .switch-to-double-column-layout, .switch-to-triple-column-layout {
	display: none;
}

@media (min-width: 900px) {
	.detail_view-layout {
		display: block;
	}
	.switch-to-single-column-layout, .switch-to-double-column-layout {
		display: inline-block;
	}
	.double-column-layout {
		width: 50%;
		float: left;
		padding: 0 1em 0 0;
	}
}

@media (min-width: 1550px) {
	.switch-to-triple-column-layout {
		display: inline-block;
	}
	.triple-column-layout {
		width: 33.33%;
		float: left;
		padding: 0 1em 0 0;
	}
}

.form-group > .col-lg-9:not(:has(.datetimepicker)) {
	overflow-x: auto;
}

/* pagination section */
.pagination-section {
	display: flex;
	justify-content: flex-start;
	align-items: center;
	gap: 1em;
	margin-bottom: 1em;
}
.pagination-section > div {
	flex-grow: 1;
}
.pagination-section > div:not(:last-child):not(:first-child) {
	text-align: center;
}
.pagination-section > div:last-child {
	text-align: right;
}

.table-title {
	text-decoration: none !important;
	color: inherit;
}

#admin-tools-menu .dl-horizontal dd, #admin-tools-menu .dl-horizontal dt{ padding: 1em 0; }
#admin-tools-menu {
	width: calc(100vw - 30px);
	max-width: 500px;
	padding: 1em 2em;
}

.block-flex {
	width: 100%;
	display: flex !important;
	align-items: stretch;
	margin: 0 auto;
}
.block-flex > :not(.auto-width) {
	flex: 1;
	margin: 0;
}
.block-flex > .auto-width {
	flex: auto;
}
.block-flex.flex-wrap {
	flex-wrap: wrap;
	justify-content: space-between;
}
.block-flex.flex-wrap > :not(.auto-width) {
	flex: 0 1 auto;
}

label.highlight-checked {
	border: 2px solid transparent;
	border-radius: 1em;
	padding: 1em;
	cursor: pointer;

	img {
		height: 4em;
		display: block;
		margin: .5em auto;
	}
}
label.highlight-checked:has(:checked) {
	border-color: rgba(64,64,64,.5);
	background-color: rgba(125,125,125,.125);
}

.modal-body:has(.lightbox-image), .modal-body .lightbox-carousel {
	overflow-y: auto;
}
/* niceditor styles */
.nicEdit-selectTxt { color: #333; }
body > [unselectable] { color: black; }

/* vertical navigation */
.vertical-nav {
	display: flex;
	flex-direction: column;
	position: sticky;

	.panel-group {
		flex: 1 1 auto;
		overflow-y: auto;
	}
	.panel-heading {
		padding: 0 !important;
		cursor: pointer;
		user-select: none;
	}
	.panel-title {
		margin: 0;
		.indicator {
			font-size: 18px;
			position: absolute;
			right: 15px;
			top: 50%;
			transform: translateY(-50%);
		}
		a {
			display: block;
			padding: 15px 18px;
			text-decoration: none;
			position: relative;
			outline: none;
			overflow-x: hidden;
		}
	}
	.vertical-nav-link {
		cursor: pointer;
		padding: 0 !important;
		a {
			display: block;
			width: 100%;
			height: 100%;
			color: inherit;
			text-decoration: none;
			outline: none;
			padding: 1em 1.5em;
			position: relative;
			overflow-x: hidden;
			&:hover, &.active, &:focus {
				background-color: rgba(0, 0, 0, 0.05);
			}
		}
	}
	&> .btn {
		overflow-x: hidden;
	}

}
.theme-compact .vertical-nav .panel-title a {
	padding: 8px 11px;
}
.btn-toggle-vertical-nav {
	position: absolute;
	left: 0;
	z-index: 1000;
	border-top-left-radius: 0;
	border-bottom-left-radius: 0;
}

.shortcut-keys {
	margin-bottom: 1em;
	white-space: nowrap;
	overflow: hidden;
}

.clipped{
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* compact theme styles, applicable only for non-mobile screens */
@media (min-width: 768px) {
	.container.theme-compact, .container-fluid.theme-compact { line-height: 1.6; font-size: 0.857em; }

	.theme-compact {
		.btn {
			font-size: 12px;
			padding: 4px 10px;
		}

		.btn-lg, .btn-group-lg > .btn {
			font-size: 15px;
			padding: 6px 15px;
		}

		.form-group {
			margin-bottom: 8px;
		}

		:not(.input-group-lg) > .form-control, :not(.input-group-lg) > .input-group-addon {
			font-size: 12px;
			height: auto;
			padding: 4px 6px;
		}

		.input-sm {
			border-radius: 3px;
			font-size: 12px;
			padding: 2px 6px;
		}

		select.input-sm {
			height: 25px;
			line-height: 25px;
		}

		.dropdown-menu {
			font-size: 12px;
		}

		.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
			padding: 4px;
		}

		h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
			line-height: 2;
		}

		h1, .h1 {
			font-size: 27px;
		}

		h2, .h2 {
			font-size: 24px;
		}

		h3, .h3 {
			font-size: 20px;
		}

		h4, .h4 {
			font-size: 16px;
		}

		.navbar {
			margin-bottom: 13px;
			min-height: 40px;
		}

		.navbar-fixed-bottom {
			margin-bottom: 0 !important;
		}

		.navbar-brand {
			font-size: 15px;
			height: 40px;
			padding: 12px;
		}

		.navbar-nav > li > a {
			padding-bottom: 9px;
			padding-top: 9px;
			line-height: 26px;
		}

		.navbar-text {
			margin-bottom: 6px;
			margin-top: 8px;
		}

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

		.navbar-nav > li > a { margin-top: 0; margin-bottom: 0; }

		.panel-heading, .xs-panel-heading, .panel-footer {
			padding: 6px;
		}

		.panel-title, .xs-panel-title {
			font-size: 14px;
		}

		#quick-search {
			margin: .5em 0;
		}

		.profile-menu-icon > .icon { padding: 6px !important; }
	}

	/* theme-specific compact adjustments */
	.theme-sandstone .theme-compact .btn {
		padding: 2.5px 10px;
	}
	.theme-compact.theme-journal .profile-menu-icon > .icon { padding: 6px !important; }
	.theme-compact.theme-paper .profile-menu-icon > .icon { padding: 6px !important; }
	.theme-compact.theme-readable .profile-menu-icon > .icon { padding: 6px !important; }
	.theme-compact.theme-sandstone .profile-menu-icon > .icon { padding: 6px !important; }
}

/* styles for mobile devices (xs) */
@media (max-width: 767px) {
	.users-area:not(:has(.table_view)) .detail_view { padding: 0; }
	.users-area:has(.table_view) .detail_view > .xs-panel::before {
		/* line before */
		content: '';
		display: block;
		width: 100%;
		height: 1px;
		background-color: #ccc;
		margin: 1em 0;
	}
	.tab-content { padding: 10px 0; border: none; }
	.xs-center-block {
		width: fit-content;
		display: block;
		margin-right: auto;
		margin-left: auto;
	}
	
	nav:has(> .navbar-collapse.in) {
		height: 100vh;
		overflow-y: auto;
	}
	.navbar-collapse.in, .navbar-collapse.collapsing {
		max-height: 100%;
		overflow-y: auto;
	}

	.btn-group-block {
		width: 100%;
	}
	.btn-group-block > .btn:first-child:not(:last-child):not(.dropdown-toggle) {
		width: calc(100% - 3em);
	}
	.btn-group-block > .dropdown-toggle:not(:first-child) {
		width: 3em;
	}
	.btn-group-block > .dropdown-menu {
		width: 100%;
	}
	.btn-group-block > .dropdown-menu > li {
		margin: .5em;
	}
	.btn-group-block > .dropdown-menu > li > .btn {
		width: 100%;
	}
	.navbar-sub-brand {
		vertical-align: text-top;
		display: inline-block;
		float: none;

		img {
			height: 1em;
			margin-right: .25em;
			display: inline !important;
		}
	}
	.navbar-collapse li.dropdown, .navbar-collapse .dropdown-menu > li {
		font-size: x-large;
	}
	.table_view th, .detail_view th {
		white-space: revert !important;
	}
	.page-header #addNew {
		display: none;
	}
	form:has(.detail_view) > .page-header:has(.table-title.hidden) {
		display: none;
	}
	.btn-group:has(.signed-in-as) {
		.btn.signed-in-as { width: calc(88vw - 3em); }
		.btn:not(.signed-in-as) { width: 3em; }
	}
	.xs-panel-heading {
		margin-bottom: 2em;
	}
	.children-links {
		margin-bottom: 2em;
	}

	#admin-tools-menu-button { margin: 0 !important; }

	.children-tabs .nav-tabs {
		display: flex; /* Use flexbox for layout */
		flex-wrap: nowrap; /* Prevent wrapping to multiple rows */
		overflow-x: auto; /* Allow horizontal scrolling if content overflows */
		white-space: nowrap; /* Prevent text wrapping within the tabs */
	}

	.children-tabs .nav-tabs > li {
		flex: 0 0 auto; /* Ensure each item remains its natural size */
		&.active {
			border-bottom: 3px solid rgba(0, 0, 0, 0.25);
		}
		&:not(.active) {
			border-bottom: 3px solid transparent;
			.child-tab-text { display: none; }
		}
	}

	.dv-action-buttons, .filter-action-buttons {
		> .btn-group {
			width: calc(100% - 10px);
			display: flex;
			align-items: stretch;
			margin: 0 auto;
		}
		> .btn-group > .btn {
			flex: 1;
			margin: 0;
		}
		> .btn-group > #deselect, > .btn-group > #insert, > .btn-group > .auto-width {
			flex: auto;
		}
	}
	.filter-action-buttons > .btn-group {
		width: 100%;
	}

	.dropdown-menu {
		width: 100%;
	}
	.dropdown-menu > li {
		font-size: larger;
	}
	.filter-links {
		max-width: 100% !important;
	}
}

/* styles for rtl */
.theme-rtl {
	direction: rtl;

	/* right spacer in rtl context */
	.rspacer-xs { margin-left: 0.1em; }
	.rspacer-sm { margin-left: 0.2em; }
	.rspacer-md { margin-left: 0.4em; }
	.rspacer-lg { margin-left: 0.8em; }
	/* left spacer in rtl context */
	.lspacer-xs { margin-right: 0.1em; }
	.lspacer-sm { margin-right: 0.2em; }
	.lspacer-md { margin-right: 0.4em; }
	.lspacer-lg { margin-right: 0.8em; }

	/* Add `rtl-mirror` class to an element to horizontally flip it in rtl (e.g. arrow glyphs, ... etc) */
	.rtl-mirror { transform: scale(-1, 1); }

	.upload-toolbox { text-align: right; float: left !important; }

	/* fix multi-choice layout in rtl */
	.select2-search-choice { direction: ltr; }
	.select2-container-multi .select2-choices li {
		float: right;
		margin-right: 5px;
		margin-left: 0;
	}

	.dl-horizontal dd.text-left, .dl-horizontal dd > div.text-left {
		max-width: 8em;
	}

	.child-records-info {
		direction: ltr;
		text-align: right;
	}

	.detail_view-layout { text-align: left;    }

	.navbar-sub-brand img {
		margin-left: 0.25em;
		margin-right: 0;
	}

	#admin-tools-menu-button{ display: inline-block !important; margin: 0 0 0 1em; }

	/* vertical navigation */
	.vertical-nav .panel-title .indicator.glyphicon-chevron-right {
		/* rotate 180 degrees for rtl, and translate y as well */
		transform: rotate(180deg) translateY(50%);
	}
	.btn-toggle-vertical-nav {
		left: auto !important;
		right: 0;
		border-top-left-radius: inherit;
		border-bottom-left-radius: inherit;
		border-top-right-radius: 0;
		border-bottom-right-radius: 0;
	}
	.btn#Next { margin-left: unset !important; margin-right: auto !important; }
	pre {
		direction: ltr !important;
	}
}

@media (min-width: 900px) {
	.theme-rtl .double-column-layout {
		float: right;
		padding: 0 0 0 1em;
	}
}
@media (min-width: 1550px) {
	.theme-rtl .triple-column-layout {
		float: right;
		padding: 0 0 0 1em;
	}
}

/* hidden-browser: hide elements if in browser rather than standalone mode */
@media not all and (display-mode: standalone) {
	.hidden-browser {
		display: none !important;
	}
}
/* hidden-standalone, hidden-pwa, hidden-app: hide elements if not in browser mode */
@media (display-mode: standalone) {
	.hidden-standalone, .hidden-pwa, .hidden-app {
		display: none !important;
	}
}

/* theme-specific css variables */
/* light themes */
body:has(.theme-bootstrap) {
	--navbar-border-color: #e7e7e7;
	--tab-content-border-color: rgba(0, 0, 0, 0.1);
}
body:has(.theme-cerulean) {
	--navbar-border-color: #178acc;
	--tab-content-border-color: rgba(0, 0, 0, 0.1);
}
body:has(.theme-cosmo) {
	--navbar-border-color: #121212;
	--tab-content-border-color: rgba(0, 0, 0, 0.1);
}
body:has(.theme-flatly) {
	--navbar-border-color: #2c3e50;
	--tab-content-border-color: rgba(0, 0, 0, 0.1);
}
body:has(.theme-journal) {
	--navbar-border-color: #eee;
	--tab-content-border-color: rgba(0, 0, 0, 0.1);
}
body:has(.theme-paper) {
	--navbar-border-color: #c9c9c9;
	--tab-content-border-color: rgba(0, 0, 0, 0.1);
}
body:has(.theme-readable) {
	--navbar-border-color: #ddd;
	--tab-content-border-color: rgba(0, 0, 0, 0.1);
}
body:has(.theme-sandstone) {
	--navbar-border-color: #3e3f3a;
	--tab-content-border-color: rgba(0, 0, 0, 0.1);
}
body:has(.theme-simplex) {
	--navbar-border-color: #eee;
	--tab-content-border-color: rgba(0, 0, 0, 0.1);
}
body:has(.theme-spacelab) {
	--navbar-border-color: #d5d5d5;
	--tab-content-border-color: rgba(0, 0, 0, 0.1);
}
body:has(.theme-united) {
	--navbar-border-color: #bf3e11;
	--tab-content-border-color: rgba(0, 0, 0, 0.1);
}
body:has(.theme-yeti) {
	--navbar-border-color: #333;
	--tab-content-border-color: rgba(0, 0, 0, 0.1);
}
/* dark themes */
body:has(.theme-cyborg) {
	--navbar-border-color: #282828;
	--tab-content-border-color: rgba(100, 100, 100, 0.5);
}
body:has(.theme-darkly) {
	--navbar-border-color: #375a7f;
	--tab-content-border-color: rgba(100, 100, 100, 0.5);
}
body:has(.theme-slate) {
	--navbar-border-color: #17191b;
	--tab-content-border-color: #1c1e22;
}
body:has(.theme-superhero) {
	--navbar-border-color: #414951;
	--tab-content-border-color: #4e5d6c;
}
.panel-close {
	font-size: x-large;
	text-decoration: none;
	margin-top: -.5em;
}
.panel-close:hover {
	text-shadow: 0 0 2px #999;
	text-decoration: none;
}

.btn[disabled] {
	cursor: not-allowed;
	pointer-events: all !important;
}

.filter-links {
	max-width: 5em;
}

