/* Base Layout */

html { height: 100%; }
body {
	height: 100%;
	overflow: hidden;
}

#header {
	flex: 0 0 auto;
	padding: 3px 0;
	box-shadow: rgba(0,0,0,.2) 0 1px 3px;
	background-color: #dfdfdf;
}

	#header .separator {
		margin-top: 5px;
		margin-bottom: 5px;
	}


/* Navigation */

#navigation, #navigation ul {
	list-style: none;
	padding: 0;
}

#navigation li {
	position: relative;
	font-size: 16px;
	padding: 0 12px;
	overflow: hidden;
	white-space: nowrap;
}

#navigation li a {
	display: block;
	white-space: nowrap;
}

#navigation li.active > a  {
	font-weight: bold;
}

#navigation li.nav-item a {
	padding: 8px 0 6px 12px;
}

#navigation li.nav-section {
	background: white;
	color: inherit;
	border-bottom: 2px solid #ebedee;
}

#navigation li.nav-section.active {
	background-color: var(--primary);
	color: white;
	cursor: pointer;
}

#navigation li.nav-section.active a {
	color: white;
}

#navigation li.nav-section ul {
	margin-right: -10px;
}

#navigation li.nav-item:not(:last-child) {
	border-bottom: 2px solid #ebedee;
}

#navigation img {
	width: 28px;
	padding: 6px 0;
	margin-right: 3px;
}

#navigation ul li.nav-item {
	background-color: var(--light);
}

#navigation > li.nav-item a {
	padding: 0;
}


/* Decorations */

.line {
	border-bottom: 1px solid #4D87C7;
}

.form-group > label {
	font-weight: bold;
}

.filters {
	margin-bottom: 12px;
}

.filters .card-body {
	background-color: rgba(0, 0 ,0 , 0.05);
}

.actions {
	padding: .75rem;
	border-bottom: 1px solid rgba(0,0,0,0.125);
}

.actions button > img {
	height: 20px; width: 20px;
	margin-right: 3px;
}


/* UTILS */

.btn-unstyled {
	height: inherit;
	background: none;
	border: none;
	vertical-align: middle;
	line-height: 1;
	opacity: 1 !important;
	-webkit-appearance: initial;
	-moz-appearance: initial;
}

.btn-unstyled:focus {
	outline: none;
}

.invert { filter: invert(100%); }


/* OVERLAYS */

.overlay, .overlay-wrap {
	width: 100%;
	height: 100%;
	margin: 0 !important;
}

.overlay {
	position: fixed;
	left: 0; top: 0;
	overflow: hidden;
	z-index: 1008;
}

.overlay-wrap {
	background-color: rgba(210, 210, 210, .9);
	overflow: auto;
	padding: 48px;
}

.overlay .loading {
	width: 100%;
	top: 0;
	left: 0;
	text-align: center;
	z-index:1002;
}

.overlay-content {
	position: relative;
	margin: auto;
	padding: 6px;
	border: 1px solid #d6d6d6;
	border-radius: 6px;
	background-color: white;
	width: 60%;
	-moz-box-shadow: 6px 6px 12px 0 rgba(0,0,0,0.25);
	box-shadow: 6px 6px 12px 0 rgba(0,0,0,0.25);
}


/* OVERLAYS (CRM specific) */

.overlay-title {
	text-shadow: -1px -1px 1px rgba(255,255,255,.1), 1px 1px 1px rgba(0,0,0,.6);
}

.overlay-head, .overlay .tab-head {
	background-color: #f6f6f6;
	border-left: 1px solid rgba(0,0,0,0.125);
	border-right: 1px solid rgba(0,0,0,0.125);
	padding: 0 0.75rem;
}

/* POPUPS */

.popup {
	position: absolute;
	top: 50%; left: 50%;
	width: fit-content;
	width: -moz-fit-content;
	padding: 6px;
	border: 1px solid #d6d6d6;
	border-radius: 6px;
	background-color: white;

	-moz-box-shadow: 6px 6px 12px 0 rgba(0,0,0,0.25);
	box-shadow: 6px 6px 12px 0 rgba(0,0,0,0.25);

	transform: translate(-50%, -55%);
	-ms-transform: translate(-50%, -55%);
}

.popup header {
	padding: 8px 20px 3px 20px;
	border-bottom: 1px solid #ccc;
}

.popup section {
	margin: 10px 15px;
}

.popup footer {
	padding-top: 10px;
	border-top: 1px solid #ccc;
}


/* Tune Bootstraps Forms */

.form-condensed .form-group,
.form-condensed h4 {
	margin-bottom: .25rem;
}

.form-condensed h4 {
	padding: 0.25rem 0.5rem;
	background-color: rgba(0,0,0,0.03);
	border: 1px solid rgba(0,0,0,0.125);
	border-radius: 0.25rem;
}

.form-condensed h4:not(:first-child) {
	margin-top: 1.5rem;
}

.form-condensed .form-group.row {
	padding-left: 1rem;
}

.form-condensed .btn.btn-sm {
	padding: 0.05rem 0.4rem;
}


.form-check-label {
	margin-bottom: -3px;
}

.form-block {
	padding: 0.5rem 0.5rem 0 0.5rem;
	margin-bottom: .75rem;
	background-color: #eee;
}

.labels-140px .form-group > label {
	flex: 0 0 140px;
	max-width: 140px;
}

.labels-160px .form-group > label {
	flex: 0 0 160px;
	max-width: 160px;
}

.labels-220px .form-group > label {
	flex: 0 0 220px;
	max-width: 220px;
}

.labels-230px .form-group > label {
	flex: 0 0 230px;
	max-width: 230px;
}