.bg-header { background-color: rgb(30, 58, 138); }
.bg-nav { background-color: rgb(30, 64, 175); }
.min-ch-100 { min-height: calc(100vh - 144px) !important; }
.min-lh-100 { min-height: calc(100vh - 202px) !important; }
.border-transparent { border-color: transparent !important; }
.border-nav-subtle { border-color: rgb(30, 64, 175) !important; }

/* Select2 Bootstrap 5 Integration */
.select2-container--bootstrap-5 .select2-selection {
	min-height: 38px;
	border-radius: 0.375rem;
	padding: 0.1rem .75rem;
	border: var(--bs-border-width) solid var(--bs-border-color);
}

/* Remove any border from the container itself - border should only be on selection */
.select2-container--bootstrap-5 {
	border: none !important;
}

.select2-container--bootstrap-5 .select2-selection--multiple {
	min-height: 38px;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered {
	display: inline !important;
	flex-wrap: wrap !important;
	align-items: center !important;
	width: 100% !important;
	line-height: normal !important;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice {
	margin: 0.125rem;
	flex-shrink: 0;
	display: inline-flex !important;
	float: none !important;
	background-color: var(--bs-light);
}

/* Fix inline search box wrapping issue - prevent it from wrapping to new line */
.select2-container--bootstrap-5 .select2-selection--multiple .select2-search--inline {
	flex: 0 1 auto !important;
	min-width: 100px !important;
	display: inline-block !important;
	width: auto !important;
	max-width: none !important;
	float: none !important;
	vertical-align: top !important;
	order: 999 !important; /* Ensure it comes after choices but stays inline */
	position: relative !important;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-search--inline .select2-search__field {
	width: 100% !important;
	min-width: 100px !important;
	border: none !important;
	outline: none !important;
	background: transparent !important;
	padding: 0 !important;
	margin: 0.125rem !important;
	height: auto !important;
	line-height: normal !important;
	box-sizing: border-box !important;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered .select2-selection__choice {
	margin-bottom: 0;
	margin-top: 0;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove {
	color: #fff;
	margin-right: 0.5rem;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove:hover {
	color: rgba(255, 255, 255, 0.75);
}

/* User role selection remove button styling */
#user-forms-container .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove {
	color: #6c757d;
	margin-right: 0.25rem;
	font-size: 0.75rem;
	padding: 0;
	line-height: 1;
}

#user-forms-container .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove:hover {
	color: #495057;
}

/* Hide search box in user role selection dropdowns - click to select only */
#user-forms-container .select2-container--bootstrap-5 .select2-search--inline {
	display: none !important;
}

.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection {
	border-color: #86b7fe;
	outline: 0;
	box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.select2-container--bootstrap-5 .select2-dropdown {
	border: 1px solid #ced4da;
	border-radius: 0.375rem;
}

.select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field {
	border: 1px solid #ced4da;
	border-radius: 0.375rem;
	padding: 0.375rem 0.75rem;
}

.select2-container--bootstrap-5 .select2-results__option--highlighted {
	background-color: #0d6efd;
	color: #fff;
}

/* Reports dropdown menu styling */
#reportsDropdown.dropdown-toggle::after {
	margin-left: 0.5rem;
}

.bg-nav .dropdown-menu {
	background-color: rgb(30, 64, 175);
	border-color: rgba(255, 255, 255, 0.1);
}

.bg-nav .dropdown-item {
	color: rgba(255, 255, 255, 0.9);
}

.bg-nav .dropdown-item:hover,
.bg-nav .dropdown-item:focus {
	background-color: rgba(255, 255, 255, 0.1);
	color: #fff;
}

/* Password field with toggle button - prevent icon overlap */
.password-field {
	padding-right: 45px !important;
}

/* When validation icons appear, we need more space - handled by JS */
.password-field.is-valid,
.password-field.is-invalid {
	background-position: right 45px center !important;
}

/* AJAX Search Input - ensure wrapper has relative positioning for dropdown */
.ajax-search-wrapper {
	position: relative !important;
}

/* MFA Code Input - Modern individual boxes */
.mfa-code-container {
	margin: 1rem 0;
}

.mfa-code-input {
	width: 3.5rem;
	height: 4rem;
	font-size: 2rem;
	font-weight: 700;
	text-align: center;
	border: 2px solid #dee2e6;
	border-radius: 0.5rem;
	background-color: #fff;
	transition: all 0.2s ease;
}

.mfa-code-input:focus {
	outline: none;
	border-color: #0d6efd;
	box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
	background-color: #f8f9fa;
}

.mfa-code-input:not(:placeholder-shown) {
	border-color: #198754;
	background-color: #f0f9f4;
}

@media (max-width: 576px) {
	.mfa-code-input {
		width: 2.75rem;
		height: 3.5rem;
		font-size: 1.75rem;
	}
	
	.mfa-code-container {
		gap: 0.5rem !important;
	}
}