/**
 * Bootstrap 5 with the measures and colours of Bootstrap 3, which the site was designed with.
 * Loaded right after bootstrap.min.css by the three layouts, before the theme's stylesheet:
 * the themes keep overriding what they already overrode (fonts, colours of the public site).
 * See openspec/changes/upgrade-libraries-latest/design.md (D3).
 */

:root {
	--bs-body-font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
	--bs-body-font-size: 14px;
	--bs-body-line-height: 1.42857143;
	--bs-body-color: #333;
	--bs-body-color-rgb: 51, 51, 51;
	--bs-border-radius: 4px;
	--bs-border-radius-sm: 3px;
	--bs-border-radius-lg: 6px;
	--bs-border-color: #ddd;
	--bs-link-color: #337ab7;
	--bs-link-color-rgb: 51, 122, 183;
	--bs-link-hover-color: #23527c;
	--bs-link-hover-color-rgb: 35, 82, 124;
	--bs-primary: #337ab7;
	--bs-primary-rgb: 51, 122, 183;
	--bs-success: #5cb85c;
	--bs-success-rgb: 92, 184, 92;
	--bs-info: #5bc0de;
	--bs-info-rgb: 91, 192, 222;
	--bs-warning: #f0ad4e;
	--bs-warning-rgb: 240, 173, 78;
	--bs-danger: #d9534f;
	--bs-danger-rgb: 217, 83, 79;
	--bs-secondary: #777;
	--bs-secondary-rgb: 119, 119, 119;
	--bs-secondary-color: #777;
	--bs-secondary-color-rgb: 119, 119, 119;
	--bs-primary-text-emphasis: #31708f;
	--bs-success-text-emphasis: #3c763d;
	--bs-info-text-emphasis: #31708f;
	--bs-warning-text-emphasis: #8a6d3b;
	--bs-danger-text-emphasis: #a94442;
	--bs-primary-bg-subtle: #d9edf7;
	--bs-success-bg-subtle: #dff0d8;
	--bs-info-bg-subtle: #d9edf7;
	--bs-warning-bg-subtle: #fcf8e3;
	--bs-danger-bg-subtle: #f2dede;
	--bs-primary-border-subtle: #bce8f1;
	--bs-success-border-subtle: #d6e9c6;
	--bs-info-border-subtle: #bce8f1;
	--bs-warning-border-subtle: #faebcc;
	--bs-danger-border-subtle: #ebccd1;
}

/* Links: underlined on hover only */
a {
	text-decoration: none;
}

a:hover,
a:focus {
	text-decoration: underline;
}

.btn:hover,
.btn:focus,
.nav-link:hover,
.nav-link:focus,
.navbar-brand:hover,
.dropdown-item:hover,
.dropdown-item:focus,
.page-link:hover,
.list-group-item:hover {
	text-decoration: none;
}

/* Text */
p {
	margin: 0 0 10px;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
	line-height: 1.1;
	margin-bottom: 10px;
}

h1, h2, h3, .h1, .h2, .h3 {
	margin-top: 20px;
}

h4, h5, h6, .h4, .h5, .h6 {
	margin-top: 10px;
}

h1, .h1 { font-size: 36px; }
h2, .h2 { font-size: 30px; }
h3, .h3 { font-size: 24px; }
h4, .h4 { font-size: 18px; }
h5, .h5 { font-size: 14px; }
h6, .h6 { font-size: 12px; }

label {
	display: inline-block;
	max-width: 100%;
	margin-bottom: 5px;
	font-weight: 700;
}

.form-check-label {
	font-weight: 400;
	margin-bottom: 0;
}

/* Former .checkbox and .radio: the input stays inside its label */
.form-check {
	position: relative;
	padding-left: 20px;
	margin-top: 10px;
	margin-bottom: 10px;
	min-height: 20px;
}

.form-check > label > input[type="checkbox"],
.form-check > label > input[type="radio"] {
	position: absolute;
	margin: 4px 0 0 -20px;
}

.form-check-inline {
	display: inline-block;
	margin-top: 0;
	margin-right: 10px;
}

hr {
	margin: 20px 0;
	border-top-color: #eee;
	opacity: 1;
}

small,
.small {
	font-size: 85%;
}

/* Container widths of Bootstrap 3: full width below 768 px, then 750, 970 and 1170 px */
.container,
.container-fluid,
.row {
	--bs-gutter-x: 30px;
}

@media (min-width: 576px) {
	.container {
		max-width: none;
	}
}

@media (min-width: 768px) {
	.container {
		max-width: 750px;
	}
}

@media (min-width: 992px) {
	.container {
		max-width: 970px;
	}
}

@media (min-width: 1200px) {
	.container {
		max-width: 1170px;
	}
}

/* Buttons */
.btn {
	--bs-btn-padding-x: 12px;
	--bs-btn-padding-y: 6px;
	--bs-btn-font-size: 14px;
	--bs-btn-line-height: 1.42857143;
	--bs-btn-border-radius: 4px;
}

.btn-sm,
.btn-group-sm > .btn {
	--bs-btn-padding-x: 10px;
	--bs-btn-padding-y: 5px;
	--bs-btn-font-size: 12px;
	--bs-btn-line-height: 1.5;
	--bs-btn-border-radius: 3px;
}

.btn-lg,
.btn-group-lg > .btn {
	--bs-btn-padding-x: 16px;
	--bs-btn-padding-y: 10px;
	--bs-btn-font-size: 18px;
	--bs-btn-line-height: 1.3333333;
	--bs-btn-border-radius: 6px;
}

/* Former btn-default */
.btn-outline-secondary {
	--bs-btn-color: #333;
	--bs-btn-bg: #fff;
	--bs-btn-border-color: #ccc;
	--bs-btn-hover-color: #333;
	--bs-btn-hover-bg: #e6e6e6;
	--bs-btn-hover-border-color: #adadad;
	--bs-btn-active-color: #333;
	--bs-btn-active-bg: #e6e6e6;
	--bs-btn-active-border-color: #adadad;
	--bs-btn-disabled-color: #333;
	--bs-btn-disabled-bg: #fff;
	--bs-btn-disabled-border-color: #ccc;
	--bs-btn-focus-shadow-rgb: 204, 204, 204;
}

.btn-primary {
	--bs-btn-bg: #337ab7;
	--bs-btn-border-color: #2e6da4;
	--bs-btn-hover-bg: #286090;
	--bs-btn-hover-border-color: #204d74;
	--bs-btn-active-bg: #204d74;
	--bs-btn-active-border-color: #122b40;
	--bs-btn-disabled-bg: #337ab7;
	--bs-btn-disabled-border-color: #2e6da4;
	--bs-btn-focus-shadow-rgb: 51, 122, 183;
}

.btn-success {
	--bs-btn-bg: #5cb85c;
	--bs-btn-border-color: #4cae4c;
	--bs-btn-hover-bg: #449d44;
	--bs-btn-hover-border-color: #398439;
	--bs-btn-active-bg: #398439;
	--bs-btn-active-border-color: #255625;
	--bs-btn-disabled-bg: #5cb85c;
	--bs-btn-disabled-border-color: #4cae4c;
	--bs-btn-focus-shadow-rgb: 92, 184, 92;
}

.btn-info {
	--bs-btn-color: #fff;
	--bs-btn-bg: #5bc0de;
	--bs-btn-border-color: #46b8da;
	--bs-btn-hover-color: #fff;
	--bs-btn-hover-bg: #31b0d5;
	--bs-btn-hover-border-color: #269abc;
	--bs-btn-active-color: #fff;
	--bs-btn-active-bg: #269abc;
	--bs-btn-active-border-color: #1b6d85;
	--bs-btn-disabled-color: #fff;
	--bs-btn-disabled-bg: #5bc0de;
	--bs-btn-disabled-border-color: #46b8da;
	--bs-btn-focus-shadow-rgb: 91, 192, 222;
}

.btn-warning {
	--bs-btn-color: #fff;
	--bs-btn-bg: #f0ad4e;
	--bs-btn-border-color: #eea236;
	--bs-btn-hover-color: #fff;
	--bs-btn-hover-bg: #ec971f;
	--bs-btn-hover-border-color: #d58512;
	--bs-btn-active-color: #fff;
	--bs-btn-active-bg: #d58512;
	--bs-btn-active-border-color: #985f0d;
	--bs-btn-disabled-color: #fff;
	--bs-btn-disabled-bg: #f0ad4e;
	--bs-btn-disabled-border-color: #eea236;
	--bs-btn-focus-shadow-rgb: 240, 173, 78;
}

.btn-danger {
	--bs-btn-bg: #d9534f;
	--bs-btn-border-color: #d43f3a;
	--bs-btn-hover-bg: #c9302c;
	--bs-btn-hover-border-color: #ac2925;
	--bs-btn-active-bg: #ac2925;
	--bs-btn-active-border-color: #761c19;
	--bs-btn-disabled-bg: #d9534f;
	--bs-btn-disabled-border-color: #d43f3a;
	--bs-btn-focus-shadow-rgb: 217, 83, 79;
}

/* Former btn-link: no underline until hover */
.btn-link {
	--bs-btn-color: #337ab7;
	--bs-btn-hover-color: #23527c;
	text-decoration: none;
}

.btn-link:hover {
	text-decoration: underline;
}

/* Former btn-block: stacked buttons */
.btn.w-100 + .btn.w-100 {
	margin-top: 5px;
}

/* Fields */
.form-control,
.form-select {
	padding: 6px 12px;
	font-size: 14px;
	line-height: 1.42857143;
	border-color: #ccc;
	border-radius: 4px;
}

.form-select {
	padding-right: 36px;
}

.form-control-sm,
.form-select-sm {
	padding: 5px 10px;
	font-size: 12px;
	line-height: 1.5;
	border-radius: 3px;
}

.form-text {
	font-size: inherit;
	margin-top: 5px;
	margin-bottom: 10px;
	color: #737373;
}

.input-group-text {
	font-size: 14px;
	padding: 6px 12px;
	background-color: #eee;
	border-color: #ccc;
}

/* Horizontal forms: labels on the right of their column from 768 px, as in Bootstrap 3 */
.col-form-label {
	padding-top: 0;
	padding-bottom: 0;
	margin-bottom: 5px;
	font-size: inherit;
}

@media (min-width: 768px) {
	.col-form-label {
		padding-top: 7px;
		margin-bottom: 0;
	}

	.form-horizontal .col-form-label {
		text-align: right;
	}
}

/* Components */
.card {
	--bs-card-border-color: #ddd;
	--bs-card-cap-bg: #f5f5f5;
	--bs-card-spacer-y: 15px;
	--bs-card-spacer-x: 15px;
	--bs-card-cap-padding-y: 10px;
	--bs-card-cap-padding-x: 15px;
	margin-bottom: 20px;
}

.dropdown-menu {
	--bs-dropdown-font-size: 14px;
	--bs-dropdown-link-color: #333;
	--bs-dropdown-item-padding-x: 20px;
	--bs-dropdown-item-padding-y: 3px;
	--bs-dropdown-link-active-bg: #337ab7;
}

.nav {
	--bs-nav-link-padding-x: 15px;
	--bs-nav-link-padding-y: 10px;
	--bs-nav-link-color: #337ab7;
	--bs-nav-link-hover-color: #23527c;
}

.nav-pills {
	--bs-nav-pills-link-active-bg: #337ab7;
}

.nav-tabs {
	--bs-nav-tabs-link-active-color: #555;
}

.list-group {
	--bs-list-group-active-bg: #337ab7;
	--bs-list-group-active-border-color: #337ab7;
}

.form-check-input:checked {
	background-color: #337ab7;
	border-color: #337ab7;
}

.form-control:focus,
.form-select:focus {
	border-color: #66afe9;
	box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6);
}

.nav-tabs {
	margin-bottom: 0;
}

.pagination {
	--bs-pagination-font-size: 14px;
	--bs-pagination-padding-x: 12px;
	--bs-pagination-padding-y: 6px;
	--bs-pagination-color: #337ab7;
	--bs-pagination-active-bg: #337ab7;
	--bs-pagination-active-border-color: #337ab7;
	--bs-pagination-border-color: #ddd;
	margin: 20px 0;
}

.badge {
	--bs-badge-font-size: 12px;
	--bs-badge-padding-x: 7px;
	--bs-badge-padding-y: 3px;
}

.table {
	--bs-table-border-color: #ddd;
	margin-bottom: 20px;
}

.table > :not(caption) > * > * {
	padding: 8px;
}

.table-sm > :not(caption) > * > * {
	padding: 5px;
}

.table > thead > tr > th {
	vertical-align: bottom;
	border-bottom-width: 2px;
}

.alert {
	--bs-alert-padding-x: 15px;
	--bs-alert-padding-y: 15px;
	--bs-alert-margin-bottom: 20px;
}

.modal {
	--bs-modal-header-padding: 15px;
	--bs-modal-padding: 15px;
	--bs-modal-footer-gap: 5px;
	--bs-modal-border-radius: 6px;
	--bs-modal-margin: 10px;
}

@media (min-width: 768px) {
	.modal {
		--bs-modal-width: 600px;
		--bs-modal-margin: 30px;
	}
}

/* Close button of the size of the Bootstrap 3 cross, so that titles keep their width */
.modal-header .btn-close {
	font-size: 12px;
	padding: 0;
	margin: 0 0 0 auto;
}

.modal-title {
	font-size: 18px;
	line-height: 1.42857143;
	margin: 0;
}

.popover {
	--bs-popover-font-size: 14px;
	--bs-popover-max-width: 276px;
}

.tooltip {
	--bs-tooltip-font-size: 12px;
}

/* Bootstrap Icons, aligned like the glyphicons they replace */
.bi::before {
	vertical-align: -0.125em;
}
