/*
 * RECO accessibility styles (WCAG 2.1 AA).
 * Loaded last, after reco2026.css. Keeps the existing look; adds focus states, button resets
 * for controls that used to be <a>/<span>/<div>, and small-screen reflow fixes.
 */

/* ---------- Skip link and main ---------- */
.reco-skip-link {
	position: fixed;
	top: -100px;
	left: 10px;
	z-index: 10001;
	padding: 12px 20px;
	background-color: #fdf9ed;
	color: #012811;
	border: 3px solid #012811;
	border-radius: 0 0 8px 8px;
	font-weight: 700;
	text-decoration: underline;
}

.reco-skip-link:focus {
	top: 0;
	color: #012811;
	outline: 3px solid #bd4f2e;
	outline-offset: 2px;
}

#main-content {
	scroll-margin-top: 180px;
}

#main-content:focus {
	outline: none;
}

/* <body> is a flex container: before <main> existed, #app was a flex item and its margins did not collapse. */
#main-content > #app {
	display: flow-root;
}

/* ---------- Header: logo focus ---------- */
/* The link itself has no box (the logo is absolutely positioned), so draw the ring on the logo. */
header .main_nav_container .main_logo a:focus {
	outline: none;
}

header .main_nav_container .main_logo a:focus-visible .logo {
	outline: 3px solid #fdf9ed;
	outline-offset: 4px;
}

/* ---------- Header: language list ---------- */
.reco-lang-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

/* ---------- Header: search ---------- */
#btnSiteSearch,
#btnMobileSiteSearch {
	-webkit-appearance: none;
	appearance: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	line-height: inherit;
	cursor: pointer;
}

#btnSiteSearch {
	color: #fdf9ed;
	font-size: 17px;
	font-family: "Figtree-Regular", serif;
}

#btnSiteSearch:hover {
	color: #1aba8a;
}

header .main_nav_container .topbar .top_nav .search_bar input:focus {
	outline: 2px solid #bd4f2e;
	outline-offset: 0;
}

header .main_nav_container .topbar .top_nav .search_bar:focus-within input {
	opacity: 1;
}

#btnSiteSearch:focus-visible,
.reco-nav-toggle:focus-visible {
	outline: 2px solid #fdf9ed;
	outline-offset: 2px;
}

/* ---------- Header: desktop dropdown toggles ---------- */
/* Out of sight until reached by keyboard, so the menu bar looks the same to mouse users. */
.reco-nav-toggle {
	position: absolute;
	top: 50%;
	right: calc(1.5vw - 24px);
	width: 22px;
	height: 24px;
	margin: -12px 0 0;
	padding: 0;
	border: 0;
	border-radius: 3px;
	background: #214c3b;
	color: #fdf9ed;
	opacity: 0;
	pointer-events: none;
}

header .main_nav_container .menu_container .nav_items .link:last-child .reco-nav-toggle {
	right: -24px;
}

.reco-nav-toggle::after {
	content: "";
	display: block;
	width: 8px;
	height: 8px;
	margin: -4px auto 0;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
}

.reco-nav-toggle[aria-expanded="true"]::after {
	margin-top: 4px;
	transform: rotate(225deg);
}

.reco-nav-toggle:focus,
.reco-nav-toggle:focus-visible {
	opacity: 1;
	pointer-events: auto;
}

/* ---------- Header: mobile menu ---------- */
header .mobile_header_bar button.icon.hamburger {
	border: 0;
	background: transparent;
}

header .mobile_nav_container button.close_icon {
	position: absolute;
	top: 16px;
	right: 12px;
	z-index: 999;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	background: transparent;
	line-height: 1;
}

header .mobile_nav_container button.close_icon::after {
	position: static;
}

header .mobile_nav_container .mobile_nav_inner .nav_items div.link {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

header .mobile_nav_container .mobile_nav_inner .nav_items div.link.open {
	width: 100%;
	background: none;
}

header .mobile_nav_container .mobile_nav_inner .nav_items div.link > a {
	flex: 1 1 auto;
	color: inherit;
	font: inherit;
	text-decoration: none;
}

header .mobile_nav_container .mobile_nav_inner .nav_items button.menu_icon {
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	margin: -10px -5px -10px 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: #0d0d0d;
	cursor: pointer;
}

header .mobile_nav_container .mobile_nav_inner .nav_items .link button.menu_icon::after {
	position: static;
	line-height: 44px;
}

header .mobile_header_bar button:focus-visible,
header .mobile_nav_container a:focus-visible,
header .mobile_nav_container button:focus-visible {
	outline: 2px solid #214c3b;
	outline-offset: 2px;
}

/* ---------- Side navigation ---------- */
.general_side_menu button.side_nav_icon_right {
	border: 0;
	background: transparent;
	line-height: 1;
}

/* Nested toggles sit on the sand panel, where the sand icon was invisible. */
.general_side_menu ul.sub_nav button.side_nav_icon_right {
	color: #214c3b;
}

.general_side_menu a:focus-visible,
.general_side_menu button:focus-visible {
	outline: 2px solid #fdf9ed;
	outline-offset: -4px;
}

.general_side_menu ul.sub_nav a:focus-visible,
.general_side_menu ul.sub_nav button:focus-visible {
	outline-color: #214c3b;
}

.mobile-side-nav .accordion-flush .accordion-item .accordion-button .nav-icon {
	color: #fdf9ed;
}

/* ---------- Breadcrumbs: stop the 13px sideways overflow ---------- */
/* Positioned inside a padded container, so leave room for that padding on both sides. */
.breadcrumbs.container {
	max-width: calc(100% - 1.5rem);
}

/* ---------- Carousel indicators ---------- */
/* Same solid dot as before, in a slightly deeper mint: 3:1 against both the cream background
   and the dark green dots, so the active slide does not rely on hue alone. */
.carousel-indicators .active {
	background-color: #17a379;
}

.carousel-indicators [data-bs-target]:focus-visible {
	outline: 3px solid #bd4f2e;
	outline-offset: 2px;
}

/* A slide title may be an h2; match the h1 it used to be. */
h2.sliderHeader {
	color: inherit;
	font-weight: normal;
	font-size: 72px;
	line-height: 1.1;
}

@media screen and (max-width: 1440px) {
	h2.sliderHeader {
		font-size: 54px;
	}
}

@media screen and (max-width: 576px) {
	h2.sliderHeader {
		font-size: 44px;
	}
}

/* ---------- Resource block: same look at any heading level ---------- */
.RecoResourceListContainer .resource-item .reco-resource-title {
	color: #0d0d0d;
	font-size: 20px;
	font-weight: bold;
	line-height: 27px;
}

/* ---------- News ---------- */
button.search-icon-anchor {
	border: 0;
}

/* Category filters: the real checkbox was display:none (no keyboard access). Keep it invisible but
   focusable, under the drawn box, and show focus on that box. */
.news_grid_container .checkboxes .item {
	position: relative;
}

.news_grid_container .checkboxes .item input[type=checkbox] {
	display: inline-block;
	position: absolute;
	top: 0;
	left: 12px;
	width: 25px;
	height: 23px;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

/* The box is 23px tall with a 1px border, but its text inherited a taller line, so the X sat low. */
.news_grid_container .checkboxes .item span::before {
	line-height: 21px;
}

.news_grid_container .checkboxes .item input[type=checkbox]:focus-visible + span::before {
	outline: 3px solid #bd4f2e;
	outline-offset: 2px;
}

/* ---------- Form fields: visible edges (3:1 or better) ---------- */
.form-control,
.form-select,
.ra-jump .form-select {
	border-color: #767676;
}

.form-control::placeholder {
	color: #6c757d;
	opacity: 1;
}

/* ---------- Wide content tables ---------- */
.reco-table-scroll {
	max-width: 100%;
	overflow-x: auto;
	margin-bottom: 1rem;
}

.reco-table-scroll:focus-visible {
	outline: 3px solid #214c3b;
	outline-offset: 2px;
}

/* ---------- Headings that keep their previous look ---------- */
.action-item h3.action-title {
	margin: 0;
	color: inherit;
	font: inherit;
	font-weight: bold;
	letter-spacing: inherit;
}

.site_search_result_item h2.reco-search-title {
	margin: 0;
	color: inherit;
	font: inherit;
	letter-spacing: inherit;
}

/* ---------- Focus rings that were switched off ---------- */
#toTopBtn:focus-visible {
	outline: 3px solid #214c3b;
	outline-offset: 2px;
	background-color: #fdf9ed;
}

.reco-accordion .accordion .accordion-button:focus-visible {
	outline: 3px solid #214c3b;
	outline-offset: 2px;
}

/* ---------- Regulatory archive ---------- */
.reco-archive-title {
	font-size: 72px;
	font-weight: normal;
	line-height: 1.1;
}

.reco-archive-row {
	margin-left: 0;
	margin-right: 0;
}

.reco-archive-title,
.single_column_container_inner a {
	overflow-wrap: anywhere;
}

@media (max-width: 575.98px) {
	.reco-archive-title {
		font-size: 36px;
	}
}

/* ---------- Reflow at 320px ---------- */
@media (max-width: 420px) {
	.MoreImportantInfoLinks .card {
		padding: 0 20px;
	}

	.MoreImportantInfoLinks a {
		font-size: 26px;
		padding-right: 54px;
		overflow-wrap: anywhere;
	}

	.panelHeader,
	h2.panelHeader,
	.sliderHeader,
	ul.panellinks a {
		overflow-wrap: anywhere;
	}

	.site_search_container h1 {
		font-size: 44px;
		overflow-wrap: anywhere;
	}

	.ra-jump {
		flex-wrap: wrap;
	}

	.ra-jump .form-select {
		min-width: 0;
		width: 100%;
	}
}

/* reco2025.css means panel headings to be 44px on phones, but its own 54px !important wins. */
@media (max-width: 420px) {
	h2.panelHeader {
		font-size: 44px !important;
	}
}

/* Very narrow screens (320px reflow): shrink headings so long French words are not split. */
@media (max-width: 350px) {
	h2.panelHeader {
		font-size: 34px !important; /* reco2025.css sets 54px !important */
	}

	.sliderHeader,
	h2.sliderHeader,
	.site_search_container h1 {
		font-size: 34px;
	}
}

/* ---------- Desktop menu: keep it clear of the logo (1280px screens, or 150% zoom at 1920px) ---------- */
@media screen and (min-width: 1200px) and (max-width: 1420px) {
	header .main_nav_container .menu_container .main_logo .logo {
		left: 30px;
		width: 225px;
	}

	header .main_nav_container .menu_container:not(.french_menu_container) .nav_items .link > a {
		margin: 0 1.1vw;
		font-size: 20px;
	}
}

@media screen and (min-width: 1200px) and (max-width: 1700px) {
	header .main_nav_container .menu_container.french_menu_container .main_logo .logo.logoFR {
		left: 30px;
		width: 225px;
	}
}
