/*
Content classes ported from the production child theme (Hello Elementor Child).
Editors set these classes on Elementor sections and in the text editor. The
converter keeps them as block class names, so the rules below select the
block wrappers instead of the Elementor wrappers. Classes that no converted
content uses any more are left out.
*/

/* Lead paragraph */
.lead {
	font-weight: bold;
}

/* Colored text boxes. The class sits on a group, a column, or a div from the text editor. */
.white-on-turq,
.white-on-black,
.black-on-grey {
	padding: var(--wp--preset--spacing--40);
	border-radius: var(--wp--preset--border-radius--small);
}
.white-on-turq {
	background-color: var(--wp--preset--color--campax-blue-deep);
	color: var(--wp--preset--color--white);
}
.white-on-black {
	background-color: var(--wp--preset--color--black);
	color: var(--wp--preset--color--white);
}
/* The old grey boxes take the light surface of the theme; the link blue has 4.7:1 on it. */
.black-on-grey {
	background-color: var(--wp--preset--color--campax-light);
	color: var(--wp--preset--color--campax-text);
}
.has-campax-blue-deep-background-color,
.has-campax-blue-deep-background-color :is(h1, h2, h3, h4, h5, p, li, a),
.white-on-turq :is(h1, h2, h3, h4, h5, p, li, a),
.white-on-black :is(h1, h2, h3, h4, h5, p, li, a) {
	color: var(--wp--preset--color--white);
}
/* On a blue surface the main button turns white; the outline button stays an outline (style.css). */
:is(.has-campax-blue-deep-background-color, .white-on-turq) .wp-block-button:not(.is-style-outline) > .wp-block-button__link:not(.has-background, :hover, :focus-visible) {
	background-color: var(--wp--preset--color--white);
	color: var(--wp--preset--color--campax-blue-deep);
}
/* The old grey button (#666666) on black boxes takes the quiet palette colour. */
.white-on-black .wp-block-button__link {
	background-color: var(--wp--preset--color--campax-muted);
	color: var(--wp--preset--color--white);
}
.black-on-grey .wp-block-button__link {
	background-color: var(--wp--preset--color--campax-blue-deep);
	color: var(--wp--preset--color--white);
}

/* Sidebar column and its blocks */
.wp-block-column.sidebar {
	--sidebar-width: 267px;
	max-width: var(--sidebar-width);
	padding: 0;
	background: transparent;
}
.sidebar-block {
	display: block;
	width: 100%;
	box-shadow: var(--wp--preset--shadow--float);
	margin: 0 0 var(--wp--preset--spacing--30) 0;
	font-size: var(--wp--preset--font-size--small);
	text-align: left;
	border-radius: 0 0 var(--wp--preset--border-radius--small) var(--wp--preset--border-radius--small);
}
.sidebar-block h2,
.sidebar-block h3 {
	--sidebar-title-padding: 8px 10px 6px 10px;
	font-size: var(--wp--preset--font-size--small);
	padding: var(--sidebar-title-padding) !important;
	margin: 0 !important;
	text-align: left;
}
.sidebar-block h2,
.sidebar-block h3 {
	background-color: var(--wp--preset--color--campax-blue-deep);
	color: var(--wp--preset--color--white);
	border-radius: var(--wp--preset--border-radius--small) var(--wp--preset--border-radius--small) 0 0;
}
@media (max-width: 767px) {
	.wp-block-column.sidebar {
		max-width: 100%;
	}
}

/* Info box, notes, manual, typeform */
.info-box {
	background-color: var(--wp--preset--color--campax-light);
	padding: var(--wp--preset--spacing--40);
	border-radius: var(--wp--preset--border-radius--small);
}
.notes {
	background-color: var(--wp--preset--color--campax-light);
	padding: var(--wp--preset--spacing--40);
	border-radius: var(--wp--preset--border-radius--small);
	overflow: hidden;
}
.notes :is(h2, h3, h4) {
	--notes-heading-margin: 6pt 0 8pt 0;
	margin: var(--notes-heading-margin) !important;
	font-size: var(--wp--preset--font-size--medium);
	color: var(--wp--preset--color--campax-text);
}
.notes h5 {
	margin: 0;
	font-size: var(--wp--preset--font-size--medium);
	color: var(--wp--preset--color--campax-text);
}
.typeform {
	border: var(--wp--custom--line--thin) solid var(--wp--preset--color--campax-rule);
	overflow: hidden;
}

/* Lists */
ul.list-with-icons {
	--icon-list-margin: 8px 0 10px 0;
	padding: 0;
	margin: var(--icon-list-margin);
	list-style: none;
}
ul.list-with-icons li {
	--icon-row-height: 27px;
	--icon-indent: 36px;
	min-height: var(--icon-row-height);
	margin: 0;
	padding: 0 0 0 var(--icon-indent);
	background-repeat: no-repeat;
}
ul.list-with-icons li a {
	--icon-link-padding: 2px 10px 6px 0;
	display: block;
	padding: var(--icon-link-padding);
}
ul.list-with-icons li.goto { background-image: url('https://campax.org/wp-content/uploads/2024/11/Arrow_blau.png'); }

/* Simple table without borders */
table.campax-simple td,
table.campax-simple th,
.wp-block-table table.campax-simple td,
.wp-block-table table.campax-simple th,
.wp-block-table.campax-simple td,
.wp-block-table.campax-simple th {
	--simple-table-gap: 2em;
	margin: 0 !important;
	padding: 0 var(--simple-table-gap) 0 0 !important;
	border: none !important;
	background-color: var(--wp--preset--color--white) !important;
	width: auto !important;
	word-break: normal;
	overflow-wrap: normal;
}
table.campax-simple caption,
.wp-block-table.campax-simple figcaption {
	text-align: left;
	font-weight: bold;
	color: var(--wp--preset--color--campax-muted);
}

/* Inline images */
img.inline-left,
figure.alignleft,
figure.alignright {
	--inline-image-gap: 20px;
	--inline-image-below: 10px;
}
img.inline-left,
figure.alignleft {
	float: left;
	margin: 0 var(--inline-image-gap) var(--inline-image-below) 0;
}
figure.alignright {
	float: right;
	margin: 0 0 var(--inline-image-below) var(--inline-image-gap);
}
img.inline-left {
	--inline-image-width: 300px;
	width: var(--inline-image-width);
	height: auto;
}
@media (max-width: 767px) {
	img.inline-left {
		--inline-image-width: 200px;
	}
}

/* Sticky donation bar at the top of campaign posts */
.sticky-donation-section {
	background-color: var(--wp--preset--color--campax-light);
	border-bottom: var(--wp--custom--line--thin) solid var(--wp--preset--color--campax-rule);
	position: sticky;
	top: 0;
	z-index: 10;
}

/* Top news boxes on the front page */
.top-news-container :is(h2, h3) {
	--top-news-heading-margin: 6pt;
	margin: var(--top-news-heading-margin) 0 0 0;
	color: var(--wp--preset--color--black);
}
.top-news-container :is(h2, h3) a {
	color: var(--wp--preset--color--black);
	text-decoration: none;
}

/* Popups used on some pages */
.popup-container,
.popup-video-container {
	--popup-top: 20px;
	--popup-width: 700px;
	--popup-padding: 10px;
	--popup-slide: 45px;
	position: fixed;
	top: var(--popup-top);
	max-width: var(--popup-width);
	margin: 0 auto;
	background-color: var(--wp--preset--color--campax-blue-deep);
	padding: var(--popup-padding);
	z-index: 1000;
	visibility: hidden;
	transition: 0.5s ease-out;
	transform: translateY(var(--popup-slide));
	border-radius: var(--wp--preset--border-radius--small);
	overflow: auto;
}
.popup-container :is(h3, p),
.popup-video-container :is(h3, p) {
	--popup-text-padding: 0.1em 2em 0.3em 0.8em;
	margin: 0;
	padding: var(--popup-text-padding);
	text-align: center;
	color: var(--wp--preset--color--white) !important;
}
.popup-close-btn {
	position: absolute;
	top: 0;
	right: 0;
	--popup-close-padding: 10px;
	padding: var(--popup-close-padding);
	font-size: 120%;
	cursor: pointer;
}
.popup-overlay-container {
	position: fixed;
	inset: 0;
	background-color: color-mix(in srgb, var(--wp--preset--color--campax-text) 80%, transparent);
	z-index: 50;
	visibility: hidden;
	transition: 0.7s;
}

/* Hero covers from the converter fade the image under white, so the title stays dark. */
.wp-block-cover .wp-block-cover__background[style*="#ffffff"] ~ .wp-block-cover__inner-container {
	color: var(--wp--preset--color--campax-text);
}
.wp-block-cover .wp-block-cover__background[style*="#ffffff"] ~ .wp-block-cover__inner-container .wp-block-heading {
	color: var(--wp--preset--color--campax-text);
}
