:root {
	--striped-bg-odd: #def3fc;
	--striped-bg-even: #fbfcde;
	--cell-bg: #def3fc;
}

body.modal-open
{
	overflow:hidden;
}

div.modal .modal-title {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.modal.show
{
	display: block;
	position: absolute;
}

div.modal-dialog
{
	margin-left: auto;
	margin-right: auto;
}

/* Container padding */
div.modal.fullHeightModal {
	padding: 10px 0 !important;
	box-sizing: border-box;
}

/* Constrain dialog to viewport height minus top & bottom padding */
.fullHeightModal .modal-dialog {
	position: relative;
	height: calc(100vh - 20px) !important; /* 100vh minus 10px top + 10px bottom */
	margin-top: 0 !important;
	margin-bottom: 0 !important;
	max-height: calc(100vh - 20px) !important;
}

/* Ensure content card fills dialog height perfectly */
.fullHeightModal .modal-content {
	height: 100% !important;
	display: flex !important;
	flex-direction: column !important;
}

/* Allow body to scroll internally if content overflows */
.fullHeightModal .modal-body {
	flex: 1 1 auto;
	overflow-y: auto;
}

.modal-body {
	overflow-y: auto;
	font-size: 10pt;
}

.modal-header
{
	/*border-bottom: none;*/
	padding-bottom: 0;
}

.modal-subheader /* Replaces .modal-header.bottom */ 
{
	border-bottom: 1px solid #a5d8ff;
	overflow: clip;
	text-overflow: ellipsis;
	white-space: nowrap;
	padding: 0.3em 1rem;
}

.modal-validation {
	flex-shrink:0;
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows 0.3s ease-out, margin-bottom 0.3s ease-out;
	overflow: hidden;
	margin-top: .25rem; 
	margin-bottom: .25rem;
	padding: 0 1rem;
}

.modal-validation .validation-messages 
{
	grid-template-columns: max-content 1fr;
	row-gap: 0.25rem;
	column-gap: 0.4em;
	font-size: 0.85em;
}

.modal-validation .alert {
	margin: 0.4rem 0;
}

.modal .invalid
{
	position:relative;
}

.modal .invalid::after {
	content: '';
	border-left: solid 6px var(--bs-danger);
	position: absolute;
	top: 4px;
	left: 0;
	right: 0;
	bottom: 4px;
	pointer-events: none;
	z-index: 1;
}


.modal .invalid2::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	border: 2px solid var(--bs-danger);
	box-shadow: inset 0 0 10px rgba(220, 53, 69, 0.15);
	pointer-events: none;
	z-index: 1;
	border-radius: inherit;
}



div.modal.showValidation .modal-validation {
	grid-template-rows: 1fr;
}

.modal-validation .modal-validation-inner {
	min-height: 0;
}

[data-id="dropdown-navigator"] 
{
	border: none;
	padding: 0 0.5em;
}

[data-id="dropdown-navigator"] select {
	border-radius: 0;
	border-top: none;
	border-left: 0;
	border-right: 0;
	cursor: pointer;
}

[data-id="dropdown-navigator"] select:focus {
	outline: 0;
	box-shadow: none;
	border-color: #ced4da;
}

div.modal.showValidation [data-id="dropdown-navigator"] select 
{
	border-top: solid 1px rgb(206, 212, 218)
}

/*div.modal.showValidation [data-id="dropdown-navigator"] select
{
	border-bottom:none;
}*/


.modal-footer {
	padding-top: 0.2em;
	padding-bottom: 0.2em;
}

.modal-footer button
{
    margin: 0.3em 0;
}

table.table
{
	--bs-table-striped-bg: var(--striped-bg-odd);
}

.table-striped > tbody > tr:nth-of-type(even) > *
{
	--bs-table-accent-bg: var(--striped-bg-even);
}


.modal-content section.show, .modal-content div.section.show {
	display: contents;
}

.modal-content section, .modal-content div.section {
	display: none;
}

/*div.fieldStatus
{
	font-size: 9pt;
	color: red;
	font-weight: 500;
	display: none;
}

div.fieldStatus.show
{
	display: block;
}*/

.controlBlock
{
	padding: 1em 1em 1em 0.5em;
	background: #fff;
}

.controlBlock .control > *
{
	width: 100%;
}

.controlBlock:nth-child(odd)
{
	background: var(--striped-bg-odd);
}

.controlBlock:nth-child(even)
{
	background: var(--striped-bg-even);
}

label
{
	cursor: pointer;
	font-weight: bold;
	/*white-space:nowrap;*/
}

input[type="checkbox"], input[type="radio"]
{
	cursor: pointer;
}

table.table thead tr th
{
	text-align: center;
	background: white;
	white-space: nowrap;
}

table.table td.centered
{
	vertical-align: middle;
	text-align: center;
}

table.table td.nowrap
{
	white-space: nowrap;
}

/*table.table input[type="checkbox"], table.table input[type="radio"]
{
	transform: scale(2.0);
}
*/

table.table thead tr
{
	border-top-width: 0px; /* Having this border sometimes allows the showing of the scrolling table above */
}

td.fullCell /*Makes the contained control "take up" the whole cell with regard to hover and click */
{
	position: relative;
}

td.fullCell label
{
	position: absolute;
	left: 0;
	top: 0;
	right: 0;
	bottom: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

#emergencyContacts span.name, #staff span.name
{
	font-weight: bold;
}

.item .fa-caret-down
{
	display:inline-block;
}

.item.collapsed .fa-caret-down
{
	transform: rotate(-90deg);
}

label.compulsory:after
{
	content: "*";
}

h6.title {
	border-bottom: solid 1px #dee2e6;
	padding-bottom: 0.2em;
	margin-bottom: 0.2em;
}

h6.title:not(:first-child) {
	padding-top: 1em;
}

.modal-body ul.bulleted {
	margin: 0;
	padding: 0 1em 0em 1em;
	list-style-type: disc;
	list-style-position: outside;
	list-style-image: none;
}

.modal-body ul.bulleted li {
	list-style-type: disc;
	margin-left: 1em;
}

.modal-body .row .cell {
	background: var(--cell-bg);
	display: grid;
	grid-template-rows: 1fr auto; /* Assumes 2 rows label at top*/
	height: 100%;
}

.modal-body .row .cell.control-at-top /* For when we have adjacent controls that are large, the control is too far from the label*/
{
	grid-template-rows: auto auto 1fr; /* Assumes 2 rows label at top, 1fr pushes both up*/
}

.modal .modal-body 
{
	padding-left: 0 !important;
	padding-right: 0 !important;
}

.modal .modal-body.restoreMargins {
	padding: 0 0.5rem !important;
	margin: 0;
}

/*.riskAssessment .modal-body {
	padding-left: 0 !important;
	padding-right: 0 !important;
}

.riskAssessment .modal-body.restoreMargins 
{
	padding: 0 0.5rem !important;
	margin: 0;
}
*/

.riskAssessment p
{
	font-size:unset;
	color:black;
}



.modal-content section .busy {
	display: none;
	align-items: center;
	justify-content: center;
	position: absolute;
	z-index: 1000;
	left: 0;
	right: 0;
	bottom: 0;
	top: 0;
	background: white;
	opacity: 0.8;
	border-radius: var(--bs-modal-inner-border-radius);
}

.modal-content section .busy.active {
	display: flex;
}

.modal-content section .busy .status {
	padding-left: 0.5em;
	font-weight: bold;
}

.modal-body .controls 
{
	border-top: none;
	padding-top: 0;
}

div.modal-dialog .loading {
	position: absolute;
	left: 1px;
	right: 1px;
	top: calc(40px + 1px);
	bottom: 1px;
	background: white;
	z-index: 10;
	border-bottom-left-radius: 8px;
	border-bottom-right-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
}

div.modal-dialog .loading .text {
	padding-right: 0.4em;
}

div.modal:not(.modeless) .modal-header {
	padding-right: 1rem !important;
}