/*
 * "Designed For" row on the homepage (inner section flagged .ss-designed-for by inc/designed-for.php).
 * Layout, icon size and colour only. The words, links and Elementor content are not changed.
 */
.elementor-section.ss-designed-for {
	--ss-df-icon: 26px;
	--ss-df-link: var(--global-palette4, #2d3748);
	--ss-df-hover: var(--global-palette-highlight, #3182ce);
	--ss-df-rule: #c3cfdd;
	background: transparent;
}

/* The tint covers the full width of the top section that holds the row, so no white shows around it. */
.elementor-top-section:has(.ss-designed-for) {
	background-color: #e8eef5;
}

.elementor-section.ss-designed-for > .elementor-container {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	align-items: center;
	gap: 6px 16px;
	padding: 6px 20px;
	box-sizing: border-box;
}

/* Elementor sets each column's width from the editor; the grid decides here. */
.elementor-section.ss-designed-for > .elementor-container > .elementor-column {
	width: auto !important;
	max-width: none !important;
	min-width: 0;
}

.elementor-section.ss-designed-for .elementor-widget-wrap {
	padding: 0 !important;
	align-content: center;
}

.elementor-section.ss-designed-for .elementor-widget-text-editor {
	margin: 0 !important;
}

/* One layout for every item, whether or not its markup has a paragraph wrapper. */
.elementor-section.ss-designed-for .elementor-widget-container {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 9px;
	text-align: left;
	line-height: 1.25;
	font-size: 15px;
	font-weight: 600;
}

.elementor-section.ss-designed-for .elementor-widget-container > p {
	display: contents;
	margin: 0;
}

.elementor-section.ss-designed-for img {
	float: none;
	flex: 0 0 var(--ss-df-icon);
	width: var(--ss-df-icon);
	height: var(--ss-df-icon);
	margin: 0;
	object-fit: contain;
}

/* A leftover white background pasted onto a link would show as a box. */
.elementor-section.ss-designed-for a {
	background: none !important;
	text-decoration: none;
	font-size: inherit;
	font-weight: inherit;
	transition: color 0.15s ease;
}

.elementor-section.ss-designed-for a:hover,
.elementor-section.ss-designed-for a:focus-visible {
	color: var(--ss-df-hover) !important;
	text-decoration: underline;
	text-underline-offset: 4px;
}

/* The label: small, capitalised, quiet, so the items carry the row. */
.elementor-section.ss-designed-for > .elementor-container > .elementor-column:first-child .elementor-widget-container,
.elementor-section.ss-designed-for > .elementor-container > .elementor-column:first-child .elementor-widget-container strong {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #5a6b80;
}

/*
 * When most items in the row are links (the homepage: five of six), the item without a link takes
 * the same colour so the row reads as one set. A row that is mostly plain labels keeps its colours.
 * The label keeps its own colour in both cases.
 */
.elementor-section.ss-designed-for.ss-df-uniform > .elementor-container > .elementor-column:not(:first-child) a,
.elementor-section.ss-designed-for.ss-df-uniform > .elementor-container > .elementor-column:not(:first-child) .elementor-widget-container > strong {
	color: var(--ss-df-link);
}

/* The label: first column, on its own line until the row fits on one line. */
.elementor-section.ss-designed-for > .elementor-container > .elementor-column:first-child {
	grid-column: 1 / -1;
}

.elementor-section.ss-designed-for > .elementor-container > .elementor-column:first-child .elementor-widget-container {
	justify-content: center;
}

@media (min-width: 768px) {
	.elementor-section.ss-designed-for > .elementor-container {
		grid-template-columns: repeat(3, auto);
		justify-content: space-between;
		column-gap: 16px;
	}
}

/* Wide enough for the label and all six items on one line. */
@media (min-width: 1280px) {
	.elementor-section.ss-designed-for > .elementor-container {
		display: flex;
		flex-wrap: nowrap;
		justify-content: space-evenly;
		gap: 12px;
	}

	.elementor-section.ss-designed-for > .elementor-container > .elementor-column:first-child {
		grid-column: auto;
	}

	.elementor-section.ss-designed-for > .elementor-container > .elementor-column {
		flex: 0 0 auto;
	}

	/* Thin rules between the items, like a menu. */
	.elementor-section.ss-designed-for > .elementor-container > .elementor-column:nth-child(n+3) {
		border-left: 1px solid var(--ss-df-rule);
		padding-left: 12px;
	}

	.elementor-section.ss-designed-for .elementor-widget-container {
		white-space: nowrap;
	}

	.elementor-section.ss-designed-for > .elementor-container > .elementor-column:first-child .elementor-widget-container {
		justify-content: flex-start;
	}
}

/* The homepage copy of the row is replaced by the sitewide bar in the header. */
body.home .elementor-top-section:has(.ss-designed-for) {
	display: none;
}

/*
 * Sitewide bar, printed in the header by inc/designed-for.php. Same look as the row above:
 * tinted band, small label, dark items, thin rules between them, blue line underneath.
 */
.ss-df-bar {
	--ss-df-icon: 26px;
	--ss-df-link: var(--global-palette4, #2d3748);
	--ss-df-hover: var(--global-palette-highlight, #3182ce);
	--ss-df-rule: #c3cfdd;
	width: 100%;
	box-sizing: border-box;
	background: #e8eef5;
	border-bottom: 3px solid #2b6cb0;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.25;
}

.ss-df-bar__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	padding: 6px 20px;
	box-sizing: border-box;
}

.ss-df-bar__list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px 16px;
	width: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ss-df-bar__list li {
	margin: 0;
	padding: 0;
}

.ss-df-bar a,
.ss-df-bar__item {
	display: flex;
	align-items: center;
	gap: 9px;
	color: var(--ss-df-link);
	text-decoration: none;
	transition: color 0.15s ease;
}

.ss-df-bar img {
	flex: 0 0 var(--ss-df-icon);
	width: var(--ss-df-icon);
	height: var(--ss-df-icon);
	margin: 0;
	object-fit: contain;
}

.ss-df-bar a:hover,
.ss-df-bar a:focus-visible {
	color: var(--ss-df-hover);
	text-decoration: underline;
	text-underline-offset: 4px;
}

@media (min-width: 768px) {
	.ss-df-bar__list {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		width: auto;
		gap: 6px 0;
	}

	.ss-df-bar__list li + li {
		border-left: 1px solid var(--ss-df-rule);
		margin-left: 12px;
		padding-left: 12px;
	}
}

/* Wide enough for the label and all six items on one line. */
@media (min-width: 1280px) {
	.ss-df-bar__inner {
		flex-direction: row;
		justify-content: space-evenly;
		gap: 12px;
	}

	.ss-df-bar__list {
		flex-wrap: nowrap;
	}

	.ss-df-bar__list li {
		white-space: nowrap;
	}
}
