/* Styles to make sure the body always fills the screen. Otherwise the footer isnt sticky to the bottom */
body {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

footer {
	margin-top: auto;
}

.static-top.navbar {
	min-height: 60px;
	padding: 0px;
}

.logo-image {
	width: 100%;
	height: auto;
	/* margin-right: 10px; */
}

.container-link {
	margin: 0px;
	padding: 0px;
	text-decoration: none;
}

.banner {
	margin: 0px;
	padding: 0px;
	background-color: lightblue;
}

.progress {
	margin-top: 20px;
	height: 10px;
	border-radius: 5px;
	margin-bottom: 20px;
}

.progress-bar {
	background-color: #0066cc;
}

button.next-step,
button.previous-step {
	background-color: #004080;
	color: white;
	border: none;
	padding: 10px 15px;
	border-radius: 5px;
	cursor: pointer;
}

button.next-step:hover,
button.previous-step:hover {
	background-color: #003366;
}

/* Styling for page alerts */

.page-alerts {
	margin: 12px 0px;
	display: flex;
	flex-direction: column;
	width: 100%;
}

.page-alert {
	border-radius: 10px;
	padding-right: 1rem !important;
	padding-left: 1rem !important;
	padding-top: 1rem !important;
	padding-bottom: 1rem !important;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.page-alert-title {
	padding-top: 0px !important;
	margin: 0px !important;
	color: inherit;
}

.page-alert-content-wrapper {
	display: flex;
	gap: 12px;
	align-items: center;
}

.page-alert-content-icon {
	display: flex;
}

.page-alert-content-icon div {
	color: inherit;
	height: 20px;
	width: 20px;
}

.page-alert-content {
	font-size: 16px;
	padding: 0px !important;
	margin: 0px !important;
	color: inherit;
}

/* Remove. Breaks native alert layout. */
/* .alert { */
/* display: flex;
	flex-direction: column;
	gap: 8px;
	--bs-alert-margin-bottom: 0.5rem; */
/* } */

/* Override bootstrap alerts */

.alert-info {
	--bs-alert-color: #173ca4;
	--bs-alert-bg: #ebf5ff;
	--bs-alert-border-color: #a4cafe;
}

.alert-success {
	--bs-alert-color: #06523e;
	--bs-alert-bg: #f3faf7;
	--bs-alert-border-color: #84e1bc;
}

.alert-error,
.alert-danger {
	--bs-alert-color: #842029;
	--bs-alert-bg: #f8d7da;
	--bs-alert-border-color: #f5c2c7;
	/* Extra because seems to click with portal preform.css */
	background-color: var(--bs-alert-bg);
	color: var(--bs-alert-color);
	border-color: var(--bs-alert-border-color);
}

/* Override alert link color */
a.alert-link {
	text-decoration: underline !important;
	--bs-link-color: #173ca4;
	color: var(--bs-alert-color) !important;
}

/* Picklist */

.picklist.horizontal {
	display: flex;
	flex-wrap: wrap;
	column-gap: 5px;
}

.picklist input[type=radio] {
	margin: 0px !important;
}

/* Boolean radio */

.boolean-radio {
	display: flex;
	column-gap: 5px;
}

/* .boolean-radio input {
	margin: 0px !important;
} */

/* MODALS */
/* ------ */

.agd-subgrid-modal .modal-title {
	margin-top: 0px;
}

#content-container.container.wrapper-body {
	max-width: 100%;
}

/* Dont do this. It breaks other forms. */
/* #EntityFormPanel {
	height: 99vh;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
} */

/* Width of wrapper of forms in modals */
#content-container.container.wrapper-body {
	max-width: unset;
}

/* Subgrid styling */
/* --------------- */

.view-grid {
	background: white;
	border: 1px solid lightgray;
	border-bottom: none;
}

.view-grid table {
	margin-bottom: 0px;
}

/* Align contents of table cells vertically */
.view-grid td {
	vertical-align: middle;
}

/* Make table column headers bold */
.view-grid th a {
	font-weight: bold;
}

/* Show error styles on all inputs that are childs of an invalid control */
.agd-was-validated input[is-invalid="true"]:not([type="checkbox"]),
.agd-was-validated textarea[is-invalid="true"],
.agd-was-validated select[is-invalid="true"] {
	border-color: #dc3545;
	padding-right: calc(1.5em + .75rem);
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
	background-repeat: no-repeat;
	background-position: right calc(.375em + .1875rem) center;
	background-size: calc(.75em + .375rem) calc(.75em + .375rem);
}

.agd-was-validated input[type="checkbox"][is-invalid="true"] {
	appearance: none;
	border: 1px solid #dc3545;
	background-color: #fff;
	border-radius: 0.25em;
}

.agd-was-validated input[is-invalid="true"]:focus,
.agd-was-validated textarea[is-invalid="true"]:focus,
.agd-was-validated select[is-invalid="true"]:focus {
	box-shadow: 0 0 0 .25rem rgba(220, 53, 69, .25);
}

/* Show errors that are a child of an invalid control */
.agd-was-validated .control[aria-invalid="true"] .invalid-feedback {
	display: flex;
}

/* Override datepicker widget bg */
div.bootstrap-datetimepicker-widget {
	background-color: white;
}

/* Hide ticks in tabs for previously form steps in multistep forms */
.list-group-item-success span {
	display: none;
}

/* Underline for form progress bar */
.progress.list-group.top {
	border-bottom: 1px solid #dedede;
}

/* Override pagination colors */
ul.pagination {
	--bs-pagination-color: #000000;
}

/* Styles to override view grid action menu styles */
/* ... */


/* Override the styling of descriptions on controls */
.custom-description, .control~.description {
	color: #727272;
	font-size: 0.95rem;
	padding: 0px 0.25rem;
}

/* Override bootstrap to make Open Sans the default font */
:root {
	--bs-body-font-family: "Open Sans", sans-serif;
}

/* Input placeholder text styling */
input::placeholder,
textarea::placeholder,
select::placeholder {
	color: #949494 !important;
}

/* Modal title style change */
h1.modal-title {
	margin-top: 0;
}

/* Larger checkbox */
input.big-checkbox {
	width: 30px;
	height: 30px;
}

/* Fix the incorrect spinner spacing on modals */
.modal-body .form-loading {
	top: 0 !important;
	left: 0 !important;
	width: calc(100% - (var(--bs-modal-padding) * 2));
	height: 100%;
	position: absolute;
	display: flex;
	justify-content: center;
	align-items: center;
}

/* Make button font size 1rem */
/* button.btn {
	font-size: var(--bs-btn-font-size);
} */

/* remove black line underneath selected nav item ::before psuedo */
a.nav-link:hover::before {
	margin-bottom: -1px;
}

/* Breadcrumb Overrides */
breadcumb-item {
	font-size: 16px;
}

/* Customised label for the description labels */
.description.above {
	font-style: italic !important;
	font-size: 10px !important;
	font-weight: 400 !important;
}

.field-label {
	line-height: 2;
}

div.table-info.required>label.field-label::after {
	content: none !important;
}

/* add optional in italics to field-labels that don't have a required class and also don't have readonly property */
/* NOTE: Added an extra class here so we can do it manually too if necessary */
div.table-info:not(.required):not(:has([readonly]))>label.field-label::after,
.optional-text::after {
	content: " optional";
	font-style: italic;
	font-weight: 400;
	font-size: 12px;
}

/* Make the button next to table search input the same size */
.query.form-control~.input-group-btn button {
	font-size: 13px;
}

/* Fix the width of the metadata filters */
/* WCAG issue: default filter component will cutoff text if the text settings are large. Change the control to have auto width to resolve this */
.entitylist-filter-option-text {
	width: 240px;
	width: auto;
}

/* Place metadata filter apply button (Filter) next to select */

/* Class to manually hide forms */
.entity-form.hide-entity-form {
	display: none;
}

div.text-muted {
	display: none;
}


/* Default button padding has hardcoded px from Microsoft which causes buttons to overflow the table when the screen has 320px width.  */
@media (max-width: 767px) {
	table.table-fluid td button {
		padding: revert;
	}
}

/* Override bootstrap error colour to meet WCAG contrast requirements */
.invalid-feedback {
	color: #C84752;
}

/* Override OOTB action dropdown colour when action is expanded on cards to achieve WCAG contrast */
.card-action.btn-secondary.dropdown-toggle.show {
	color: var(--portalThemeColor9);
	background-color: #e6e6e6;
	border-color: var(--portalThemeColor9);
}


/* Override hardcoded bootstrap border */
.crmEntityFormView,
.entitylist,
.modal-content,
.popover-content {
	border: 1px solid var(--portalThemeColor1) !important;
}


/* Overrides from portalbasictheme.css that need to be updated to be more specific */

input.form-control:disabled {
	background-color: #e7e7e7 !important;
	color: #000000;
}

select.form-control:disabled {
	background-color: #e7e7e7 !important;
	color: #000000;
}

.form-control {
	background-color: white !important;
	color: #000000;
}

.form-close:hover,
.form-close:focus,
.form-close.focus,
.form-close:focus-visible{
	color: #ffffff;
	background-color: #2F383c;
	border-color: #2F383c;
}

.file-input-hidden{
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0px;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}


/* 52872 Calendar is too wide */
.bootstrap-datetimepicker-widget{
	font-size: 0.875rem;
}
/* Width of parent input group on <= med screens */
@media(max-width: 768px){
	.bootstrap-datetimepicker-widget{
		font-size: 0.617rem;
	}
}

/* We need to apply the same bootstrap border styling to labels of inputs, 
so hidden file inputs display validation errors on the labels instead */
input[type="file"].is-valid + label,
input[type="file"].validation-error + label,
input[type="file"].input-validation-error + label{
	border-color: #dc3545;
	color: #dc3545
}


/* Prevent the modal form close button from moving down from center by 3%*/
button.form-close{
	top: auto !important;
}

/* Override the portal basic theme form controls which sets their background to the same colour as the document background so they are not easy to see */
body .form-control {
	background-color: white !important;
}


/* .static-top.navbar-dark .navbar-brand a {
  color: #ffffff; } */

/* fix touch target size of list items to >24px */
.dropdown-item{
	line-height: 1.6;
}
/* Override portal dropdown stylying with bootstrap styling */
.dropdown-menu>li>a:hover,
.dropdown-menu>li>a:focus {
	text-decoration: none;
	display: block;
	width: auto;
	color: var(--bs-dropdown-link-hover-color) !important;
	background-color: var(--bs-dropdown-link-hover-bg) !important;
}

.button2,
.btn-secondary,
.btn-default {
	color: #214763;
	border-radius: 2px;
	font-family: "Open Sans", sans-serif;
	font-weight: 600;
	/* font-size: 14px; */
	border-color: #214763;
	padding: 6px 20px;
	width: fit-content;
	border-style: solid;
	border-width: 1.6px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background-color: transparent;
}

.button2:hover,
.btn-secondary:hover,
.btn-default:hover {
	color: #ffffff;
	background-color: #2F383c;
	border-color: #2F383c;
}

.button2:active,
.button2.active,
.btn-secondary:active,
.btn-secondary.active,
.btn-default:active,
.btn-default.active {
	color: #ffffff !important;
	background-color: #2F383c !important;
	border-color: #2F383c !important;
}

.button2:focus,
.button2.focus,
.button2:focus-visible,
.btn-secondary:focus,
.btn-secondary.focus,
.btn-secondary:focus-visible,
.btn-default:focus,
.btn-default.focus,
.btn-default:focus-visible {
	color: #ffffff;
	background-color: #2F383c;
	border-color: #2F383c;
}

.btn-close:hover,
.btn-close:focus,
.btn-close.focus,
.btn-close:focus-visible{
	color: #ffffff;
	background-color: #2F383c;
	border-color: #2F383c;
}

/* Override some of the bootstrap5 table-fluid stlying
Default stylying has a partially responsive table but doesn't stack TDs properly
*/
@media (max-width: 767px) {
    .table-fluid td:before {
        content: attr(data-th);
        font-weight: 700;
        width: 12rem;
         margin-left: 0;
        float: none;
        padding-right: 1rem;
        word-break: normal;
        display: block;
    }
}

@media (max-width: 767px) {
    html[dir=ltr] .table-fluid td {
         padding-left: 0.5rem !important; 
    }
}

/* Ensure that actions are visible. Otherwise when zoomed in, clicked actions may show under the next row depending on the view */
@media (max-width: 767px) {
    .table-fluid tr {
        overflow: visible;
    }
}

@media (max-width: 767px) {
    .table-fluid td {
        word-break: break-word;
    }
}