/**
 * OF Elementor Widgets - Certification tables
 *
 * Colors come from the site palette (--site-*, with fallbacks). Contrast: white on
 * --ofew-cert-accent (#005f78) 7.2:1, #005f78 on the yellow tabs 5.6:1, links #005f78 on white
 * 7.2:1 (6.3:1 on the row hover color). Focus = 3px outline in a color that contrasts with
 * each background.
 *
 * States set by the scripts: .is-js (JavaScript on; printed inline with the widget), .has-dialog
 * (the browser supports <dialog>), .is-enhanced (certification-tables.js ran), .is-fullscreen
 * (inside the dialog), .has-overflow on .ofew-cert__table-wrap (table wider than its box).
 */

.ofew-cert {
	--ofew-cert-accent: var(--site-azul-escuro, #005f78);
	--ofew-cert-on-accent: #fff;
	--ofew-cert-tab-bg: var(--site-amarelo, #ffe191);
	--ofew-cert-tab-bg-hover: #ffd35a;
	--ofew-cert-tab-text: var(--site-azul-escuro, #005f78);
	--ofew-cert-head-bg: var(--site-amarelo, #ffe191);
	--ofew-cert-head-text: var(--site-grafite, #3c3c3c);
	--ofew-cert-text: var(--site-grafite, #3c3c3c);
	--ofew-cert-link: var(--site-azul-escuro, #005f78);
	--ofew-cert-border: #d5d5d5;
	--ofew-cert-gutter: var(--site-grafite-50, #ececec);
	--ofew-cert-empty: #f6f6f6;
	--ofew-cert-row-hover: #e9f2f5;
	--ofew-cert-focus: var(--site-grafite, #3c3c3c);
	--ofew-cert-group-width: 180px;
	--ofew-cert-brand-width: 160px;
	--ofew-cert-col-width: 150px;
	--ofew-cert-gutter-width: 40px;
	--ofew-cert-radius: 12px;
	color: var(--ofew-cert-text);
	font-size: var(--site-size-type-14, 0.875rem);
	line-height: 1.4;
}

.ofew-cert [hidden] {
	display: none !important;
}

.ofew-cert .ofew-sr-only {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.ofew-cert .ofew-cert__icon {
	display: block;
	flex: none;
}

/* Without JavaScript: no tabs and no tools, every table with its own heading. */

.ofew-cert:not(.is-js) .ofew-cert__tabs,
.ofew-cert:not(.is-js) .ofew-cert__search,
.ofew-cert:not(.has-dialog) .ofew-cert__fullscreen {
	display: none;
}

.ofew-cert:not(.is-js) .ofew-cert__panel + .ofew-cert__panel {
	margin-top: 32px;
}

/* JavaScript on but the script not loaded yet: only the first table. */
.ofew-cert.is-js:not(.is-enhanced) .ofew-cert__panel ~ .ofew-cert__panel {
	display: none;
}

.ofew-cert .ofew-cert__heading {
	margin: 0 0 12px;
	color: var(--ofew-cert-accent);
	font-family: var(--font-sans-10-medium, inherit);
	font-size: var(--site-size-type-20, 1.25rem);
	font-weight: 500;
	line-height: 1.25;
}

.ofew-cert--tabs.is-js .ofew-cert__heading {
	display: none;
}

/* Tabs */

.ofew-cert .ofew-cert__tabs {
	display: grid;
	grid-auto-columns: minmax(0, 1fr);
	grid-auto-flow: column;
	gap: 4px;
}

.ofew-cert .ofew-cert__tab,
.ofew-cert .ofew-cert__tab:hover,
.ofew-cert .ofew-cert__tab:focus {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: flex-start;
	gap: 2px;
	width: 100%;
	min-height: 44px;
	margin: 0;
	padding: 12px 16px;
	border: 0;
	border-radius: var(--ofew-cert-radius) var(--ofew-cert-radius) 0 0;
	background: var(--ofew-cert-tab-bg);
	color: var(--ofew-cert-tab-text);
	font-family: var(--font-sans-10-medium, inherit);
	font-size: var(--site-size-type-16, 1rem);
	font-weight: 500;
	line-height: 1.25;
	text-align: left;
	text-decoration: none;
	text-transform: none;
	letter-spacing: normal;
	white-space: normal;
	box-shadow: none;
	cursor: pointer;
}

.ofew-cert .ofew-cert__tab:hover:not([aria-selected="true"]) {
	background: var(--ofew-cert-tab-bg-hover);
}

.ofew-cert .ofew-cert__tab:hover:not([aria-selected="true"]) .ofew-cert__tab-title {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.ofew-cert .ofew-cert__tab[aria-selected="true"],
.ofew-cert .ofew-cert__tab[aria-selected="true"]:hover,
.ofew-cert .ofew-cert__tab[aria-selected="true"]:focus {
	background: var(--ofew-cert-accent);
	color: var(--ofew-cert-on-accent);
	cursor: default;
}

.ofew-cert .ofew-cert__tab:focus-visible {
	outline: 3px solid var(--ofew-cert-focus);
	outline-offset: 2px;
	box-shadow: 0 0 0 5px #fff;
	position: relative;
	z-index: 1;
}

.ofew-cert .ofew-cert__tab-subtitle {
	font-family: var(--font-sans-10-regular, inherit);
	font-size: var(--site-size-type-14, 0.875rem);
	font-weight: 400;
}

/* Panel: description, full screen button and search on the dark blue band, table below. */

.ofew-cert .ofew-cert__panel {
	border-radius: var(--ofew-cert-radius);
	background: var(--ofew-cert-accent);
	color: var(--ofew-cert-on-accent);
}

.ofew-cert.is-js.ofew-cert--tabs .ofew-cert__panel {
	border-top-left-radius: 0;
	border-top-right-radius: 0;
}

.ofew-cert:not(.is-js) .ofew-cert__heading,
.ofew-cert--single .ofew-cert__heading {
	padding: 16px 16px 0;
	margin: 0;
	color: var(--ofew-cert-on-accent);
}

.ofew-cert .ofew-cert__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	padding: 16px 16px 0;
}

.ofew-cert .ofew-cert__description {
	flex: 1 1 auto;
	min-width: 0;
	color: var(--ofew-cert-on-accent);
	font-family: var(--font-sans-10-regular, inherit);
	font-size: var(--site-size-type-14, 0.875rem);
	line-height: 1.45;
}

.ofew-cert .ofew-cert__description p {
	margin: 0 0 0.5em;
	color: inherit;
	font-size: inherit;
	line-height: inherit;
}

.ofew-cert .ofew-cert__description p:last-child {
	margin-bottom: 0;
}

.ofew-cert .ofew-cert__description a,
.ofew-cert .ofew-cert__description a:hover,
.ofew-cert .ofew-cert__description a:visited {
	color: var(--ofew-cert-on-accent);
	font-family: var(--font-sans-10-medium, inherit);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.ofew-cert .ofew-cert__description a:hover {
	text-decoration-thickness: 2px;
}

.ofew-cert .ofew-cert__fullscreen,
.ofew-cert .ofew-cert__fullscreen:hover,
.ofew-cert .ofew-cert__fullscreen:focus {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 44px;
	height: 44px;
	margin: 0 0 0 auto;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.7);
	border-radius: 8px;
	background: transparent;
	color: var(--ofew-cert-on-accent);
	box-shadow: none;
	cursor: pointer;
}

.ofew-cert .ofew-cert__fullscreen:hover {
	background: var(--ofew-cert-on-accent);
	color: var(--ofew-cert-accent);
}

.ofew-cert .ofew-cert__icon--collapse,
.ofew-cert.is-fullscreen .ofew-cert__icon--expand {
	display: none;
}

.ofew-cert.is-fullscreen .ofew-cert__icon--collapse {
	display: block;
}

.ofew-cert .ofew-cert__head :focus-visible,
.ofew-cert .ofew-cert__search :focus-visible {
	outline: 3px solid var(--ofew-cert-tab-bg);
	outline-offset: 2px;
	box-shadow: none;
}

.ofew-cert .ofew-cert__search {
	padding: 12px 16px 16px;
}

.ofew-cert .ofew-cert__search-label {
	display: block;
	margin: 0 0 6px;
	color: var(--ofew-cert-on-accent);
	font-family: var(--font-sans-10-medium, inherit);
	font-size: var(--site-size-type-14, 0.875rem);
	line-height: 1.3;
	vertical-align: baseline;
}

.ofew-cert .ofew-cert__search-field {
	position: relative;
	max-width: 560px;
}

.ofew-cert .ofew-cert__search-input,
.ofew-cert .ofew-cert__search-input:focus {
	width: 100%;
	height: 44px;
	margin: 0;
	padding: 8px 44px 8px 12px;
	border: 1px solid #fff;
	border-radius: 8px;
	background: #fff;
	color: var(--ofew-cert-text);
	font-family: var(--font-sans-10-regular, inherit);
	font-size: 1rem; /* 16px: no automatic zoom on iOS. */
	line-height: 1.3;
	box-shadow: none;
	transition: none;
}

.ofew-cert .ofew-cert__search-icon {
	position: absolute;
	top: 50%;
	right: 12px;
	color: var(--ofew-cert-accent);
	transform: translateY(-50%);
	pointer-events: none;
}

/* Table */

.ofew-cert .ofew-cert__table-wrap {
	position: relative;
	border: 1px solid var(--ofew-cert-accent);
	border-radius: 0 0 var(--ofew-cert-radius) var(--ofew-cert-radius);
	background: #fff;
	color: var(--ofew-cert-text);
}

.ofew-cert:not(.is-js) .ofew-cert__table-wrap {
	margin-top: 16px;
}

.ofew-cert .ofew-cert__scroller {
	overflow-x: auto;
	overflow-y: hidden;
	border-radius: 0 0 calc(var(--ofew-cert-radius) - 1px) calc(var(--ofew-cert-radius) - 1px);
	overscroll-behavior-x: contain;
}

.ofew-cert .ofew-cert__scroller:focus-visible {
	outline: 3px solid var(--ofew-cert-focus);
	outline-offset: 2px;
	box-shadow: 0 0 0 5px #fff;
}

.ofew-cert .ofew-cert__table {
	/* Columns keep their width (scroll) instead of being squeezed; few columns still fill the box. */
	width: max-content;
	min-width: 100%;
	margin: 0;
	border: 0;
	border-collapse: separate;
	border-spacing: 0;
	background: #fff;
	font-size: inherit;
	table-layout: auto;
}

.ofew-cert .ofew-cert__caption {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.ofew-cert .ofew-cert__table th,
.ofew-cert .ofew-cert__table td {
	width: var(--ofew-cert-col-width);
	padding: 10px 12px;
	border: 0;
	border-right: 1px solid var(--ofew-cert-border);
	border-bottom: 1px solid var(--ofew-cert-border);
	background: #fff;
	color: var(--ofew-cert-text);
	font-family: var(--font-sans-10-regular, inherit);
	font-size: inherit;
	font-weight: 400;
	line-height: 1.35;
	text-align: left;
	vertical-align: middle;
	overflow-wrap: anywhere;
}

.ofew-cert .ofew-cert__table th:last-child,
.ofew-cert .ofew-cert__table td:last-child {
	border-right: 0;
}

.ofew-cert .ofew-cert__table tbody tr:last-child > * {
	border-bottom: 0;
}

.ofew-cert .ofew-cert__table thead th {
	background: var(--ofew-cert-head-bg);
	color: var(--ofew-cert-head-text);
	font-family: var(--font-sans-10-medium, inherit);
	font-size: 0.8125rem;
	font-weight: 500;
	line-height: 1.3;
	vertical-align: bottom;
	overflow-wrap: normal;
}

.ofew-cert .ofew-cert__table .ofew-cert__brand {
	width: var(--ofew-cert-brand-width);
}

/* Fixed first column; its thick grey right border is the "gutter" under the left arrow. */
.ofew-cert .ofew-cert__table .ofew-cert__group {
	position: sticky;
	left: 0;
	z-index: 1;
	width: calc(var(--ofew-cert-group-width) + 1px);
	min-width: calc(var(--ofew-cert-group-width) + 1px);
	font-family: var(--font-sans-10-medium, inherit);
	font-size: 0.8125rem;
	overflow-wrap: break-word;
}

.ofew-cert .ofew-cert__table-wrap.has-overflow .ofew-cert__group {
	width: calc(var(--ofew-cert-group-width) + var(--ofew-cert-gutter-width));
	min-width: calc(var(--ofew-cert-group-width) + var(--ofew-cert-gutter-width));
	border-right: var(--ofew-cert-gutter-width) solid var(--ofew-cert-gutter);
}

.ofew-cert .ofew-cert__table thead .ofew-cert__group {
	z-index: 2;
}

.ofew-cert .ofew-cert__table td.is-empty {
	background: var(--ofew-cert-empty);
}

.ofew-cert .ofew-cert__table tbody tr:hover > th,
.ofew-cert .ofew-cert__table tbody tr:hover > td {
	background: var(--ofew-cert-row-hover);
}

.ofew-cert .ofew-cert__table a,
.ofew-cert .ofew-cert__table a:visited {
	color: var(--ofew-cert-link);
	font-family: var(--font-sans-10-medium, inherit);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	white-space: nowrap;
}

.ofew-cert .ofew-cert__table a:hover {
	text-decoration-thickness: 2px;
}

.ofew-cert .ofew-cert__table a:focus-visible {
	outline: 3px solid var(--ofew-cert-focus);
	outline-offset: 2px;
	box-shadow: 0 0 0 5px #fff;
	border-radius: 2px;
}

.ofew-cert .ofew-cert__empty {
	margin: 0;
	padding: 16px;
	border-top: 1px solid var(--ofew-cert-border);
	color: var(--ofew-cert-text);
	font-size: var(--site-size-type-16, 1rem);
}

/* Arrows: over the header row, the left one on the gutter, the right one at the right edge. */

.ofew-cert .ofew-cert__scroll,
.ofew-cert .ofew-cert__scroll:hover,
.ofew-cert .ofew-cert__scroll:focus {
	position: absolute;
	top: 0;
	z-index: 4;
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--ofew-cert-gutter-width);
	height: var(--ofew-cert-head, 48px);
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: var(--ofew-cert-gutter);
	color: var(--ofew-cert-accent);
	box-shadow: none;
	cursor: pointer;
}

.ofew-cert .ofew-cert__scroll--prev {
	left: calc(var(--ofew-cert-sticky, 220px) - var(--ofew-cert-gutter-width));
}

.ofew-cert .ofew-cert__scroll--next {
	right: var(--ofew-cert-scrollbar, 0px);
	box-shadow: -6px 0 8px -6px rgba(0, 0, 0, 0.35);
}

.ofew-cert .ofew-cert__scroll:hover:not([aria-disabled="true"]) {
	background: var(--ofew-cert-accent);
	color: var(--ofew-cert-on-accent);
}

.ofew-cert .ofew-cert__scroll[aria-disabled="true"] {
	color: #8a8a8a;
	cursor: default;
}

.ofew-cert .ofew-cert__scroll:focus-visible {
	outline: 3px solid var(--ofew-cert-focus);
	outline-offset: -3px;
	box-shadow: inset 0 0 0 5px #fff;
}

/* The last column is one arrow wider, so its header is not hidden under the right arrow at the end. */
.ofew-cert .ofew-cert__table-wrap.has-overflow .ofew-cert__table tr > :last-child {
	width: calc(var(--ofew-cert-col-width) + var(--ofew-cert-gutter-width));
	padding-right: calc(var(--ofew-cert-gutter-width) + 12px);
}

/* Full screen dialog */

html.ofew-cert-locked {
	overflow: hidden;
}

.ofew-cert-dialog {
	position: fixed;
	inset: 0;
	box-sizing: border-box;
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 16px;
	border: 0;
	background: #fff;
	color: inherit;
	overflow: hidden;
}

.ofew-cert-dialog::backdrop {
	background: rgba(0, 0, 0, 0.6);
}

.ofew-cert.is-fullscreen {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.ofew-cert.is-fullscreen .ofew-cert__tabs {
	flex: none;
}

.ofew-cert.is-fullscreen .ofew-cert__panel:not([hidden]) {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-height: 0;
}

.ofew-cert.is-fullscreen .ofew-cert__head,
.ofew-cert.is-fullscreen .ofew-cert__search {
	flex: none;
}

.ofew-cert.is-fullscreen .ofew-cert__table-wrap {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-height: 0;
}

.ofew-cert.is-fullscreen .ofew-cert__scroller {
	flex: 1 1 auto;
	min-height: 0;
	overflow: auto;
}

.ofew-cert.is-fullscreen .ofew-cert__table thead th {
	position: sticky;
	top: 0;
	z-index: 2;
}

.ofew-cert.is-fullscreen .ofew-cert__table thead .ofew-cert__group {
	z-index: 3;
}

.ofew-cert.is-fullscreen .ofew-cert__empty {
	flex: none;
}

/* Tablet */

@media (max-width: 1024px) {
	.ofew-cert {
		--ofew-cert-group-width: 150px;
		--ofew-cert-brand-width: 140px;
		--ofew-cert-col-width: 130px;
	}
}

/* Mobile: tabs one below the other, narrower fixed column. */

@media (max-width: 767px) {
	.ofew-cert {
		--ofew-cert-group-width: 112px;
		--ofew-cert-brand-width: 120px;
		--ofew-cert-col-width: 118px;
		--ofew-cert-gutter-width: 36px;
	}

	.ofew-cert .ofew-cert__tabs {
		grid-auto-flow: row;
		grid-auto-columns: auto;
		gap: 4px;
		margin-bottom: 8px;
	}

	.ofew-cert .ofew-cert__tab,
	.ofew-cert .ofew-cert__tab:hover,
	.ofew-cert .ofew-cert__tab:focus {
		border-radius: 8px;
		padding: 10px 14px;
	}

	.ofew-cert.is-js.ofew-cert--tabs .ofew-cert__panel {
		border-radius: var(--ofew-cert-radius);
	}

	.ofew-cert .ofew-cert__table th,
	.ofew-cert .ofew-cert__table td {
		padding: 8px 10px;
	}

	.ofew-cert .ofew-cert__table .ofew-cert__group {
		font-size: 0.75rem;
	}

	.ofew-cert-dialog {
		padding: 8px;
	}
}

/* Print: every table, no tools. */

@media print {
	.ofew-cert .ofew-cert__tabs,
	.ofew-cert .ofew-cert__search,
	.ofew-cert .ofew-cert__fullscreen,
	.ofew-cert .ofew-cert__scroll {
		display: none !important;
	}

	.ofew-cert .ofew-cert__panel[hidden],
	.ofew-cert.is-js:not(.is-enhanced) .ofew-cert__panel ~ .ofew-cert__panel {
		display: block !important;
	}

	.ofew-cert--tabs.is-js .ofew-cert__heading {
		display: block;
	}

	.ofew-cert .ofew-cert__scroller {
		overflow: visible;
	}

	.ofew-cert .ofew-cert__table .ofew-cert__group {
		position: static;
	}
}
