/*
Child-only CSS. Enqueued after the parent's assets/css/style.css (see
functions.php) so anything added here layers on top of / overrides the
parent's supplemental CSS without touching it.
*/

/* ---------- Fix broken has-h1/h2/h3/h4-font-size classes ---------- */
/* WordPress core kebab-cases theme.json preset slugs before emitting the
   class selector + CSS custom property (_wp_to_kebab_case()), turning our
   font-size slugs "h1"/"h2"/"h3"/"h4" into "--wp--preset--font-size--h-1"
   and ".has-h-1-font-size" etc. Blocks emit their class from the raw,
   un-kebabbed slug ("has-h1-font-size"), so every block anywhere in the site
   using one of these four font-size presets silently gets no font-size rule
   and falls back to the inherited body size instead. */
.has-h1-font-size { font-size: var(--wp--preset--font-size--h-1) !important; }
.has-h2-font-size { font-size: var(--wp--preset--font-size--h-2) !important; }
.has-h3-font-size { font-size: var(--wp--preset--font-size--h-3) !important; }
.has-h4-font-size { font-size: var(--wp--preset--font-size--h-4) !important; }

/* Single post article readability */
.single .sc-single-article .wp-block-post-title {
	max-width: none;
	line-height: 1.2;
	color: #0b1f1a;
}

.single .sc-single-article .wp-block-post-content {
	max-width: none;
}

.single .wp-block-post-content strong,
.single .wp-block-post-content b {
	color: #01b18b;
	font-weight: 400;
}

.single .wp-block-post-content h2,
.single .wp-block-post-content h3 {
	margin-top: 2rem;
	color: #0b1f1a;
}

.single .wp-block-post-featured-image img {
	width: auto;
	height: auto;
	display: block;
}

/* Comparison-style tables in post body (matches How We Partner table) */
.single .wp-block-post-content .wp-block-table,
.single .sc-single-article .wp-block-post-content .wp-block-table {
	border: 1px solid var(--wp--preset--color--neutral-200, #dbe2e2);
	border-radius: 14px;
	overflow: hidden;
	margin: 1.75rem 0;
}

.single .wp-block-post-content .wp-block-table table,
.single .wp-block-post-content table {
	width: 100%;
	border-collapse: collapse;
	border: none;
	margin: 0;
}

.single .wp-block-post-content .wp-block-table thead th,
.single .wp-block-post-content table thead th {
	background: var(--wp--preset--color--neutral-900, #0f1b1f);
	color: var(--wp--preset--color--neutral-0, #ffffff);
	font-size: 12.5px;
	font-weight: 800;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	padding: 16px 20px;
	border: none;
	text-align: left;
	vertical-align: middle;
}

.single .wp-block-post-content .wp-block-table thead th:first-child,
.single .wp-block-post-content table thead th:first-child {
	color: var(--wp--preset--color--neutral-400, #94a3a3);
}

.single .wp-block-post-content .wp-block-table thead th:nth-child(2),
.single .wp-block-post-content table thead th:nth-child(2) {
	color: var(--wp--preset--color--mint-500, #01b18a);
}

.single .wp-block-post-content .wp-block-table tbody td,
.single .wp-block-post-content table tbody td,
.single .wp-block-post-content .wp-block-table tbody th,
.single .wp-block-post-content table tbody th {
	padding: 18px 20px;
	font-size: 14px;
	line-height: 1.55;
	border: none;
	border-top: 1px solid var(--wp--preset--color--neutral-200, #dbe2e2);
	border-left: 1px solid var(--wp--preset--color--neutral-200, #dbe2e2);
	background: var(--wp--preset--color--neutral-0, #ffffff);
	color: var(--wp--preset--color--neutral-600, #4a5454);
	vertical-align: top;
	text-align: left;
}

.single .wp-block-post-content .wp-block-table tbody td:first-child,
.single .wp-block-post-content table tbody td:first-child,
.single .wp-block-post-content .wp-block-table tbody th:first-child,
.single .wp-block-post-content table tbody th:first-child {
	border-left: none;
	background: var(--wp--preset--color--mint-50, #e6f7f3);
	font-weight: 700;
	font-size: 13.5px;
	color: var(--wp--preset--color--ink, #0f1b1f);
}

.single .wp-block-post-content .wp-block-table tbody td:nth-child(2),
.single .wp-block-post-content table tbody td:nth-child(2) {
	font-weight: 600;
	color: var(--wp--preset--color--ink, #0f1b1f);
}

/* Tables without <thead>: style first row of th cells as the dark header */
.single .wp-block-post-content .wp-block-table tbody tr:first-child th,
.single .wp-block-post-content table tbody tr:first-child th {
	background: var(--wp--preset--color--neutral-900, #0f1b1f);
	color: var(--wp--preset--color--neutral-0, #ffffff);
	font-size: 12.5px;
	font-weight: 800;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	padding: 16px 20px;
	border: none;
	vertical-align: middle;
}

.single .wp-block-post-content .wp-block-table tbody tr:first-child th:first-child,
.single .wp-block-post-content table tbody tr:first-child th:first-child {
	color: var(--wp--preset--color--neutral-400, #94a3a3);
	background: var(--wp--preset--color--neutral-900, #0f1b1f);
}

.single .wp-block-post-content .wp-block-table tbody tr:first-child th:nth-child(2),
.single .wp-block-post-content table tbody tr:first-child th:nth-child(2) {
	color: var(--wp--preset--color--mint-500, #01b18a);
}

@media (max-width: 782px) {
	.single .wp-block-post-content .wp-block-table {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.single .wp-block-post-content .wp-block-table table,
	.single .wp-block-post-content table {
		min-width: 520px;
	}

	.single .wp-block-post-content .wp-block-table thead th,
	.single .wp-block-post-content .wp-block-table tbody td,
	.single .wp-block-post-content .wp-block-table tbody th {
		padding: 14px 16px;
	}
}

/* Single post comments */
.single .wp-block-comments {
	max-width: 48rem;
	margin-top: 48px;
	padding-top: 32px;
	border-top: 1px solid #e5e7eb;
}

.single .wp-block-post-comments-form .form-submit input[type="submit"],
.single .wp-block-post-comments-form input[type="submit"] {
	background-color: #01b18b;
	border-color: #01b18b;
	color: #fff;
}

/* Resources page dynamic post cards */
.sc-resources-query .wp-block-post-featured-image img {
	width: 100%;
	height: 170px;
	object-fit: cover;
	display: block;
}

.sc-resources-query .wp-block-post-title a {
	color: var(--wp--preset--color--ink, #0b1f1a);
	text-decoration: none;
}

.sc-resources-query .wp-block-post-terms {
	margin-bottom: 0.35rem;
}

.sc-resources-query .wp-block-post-terms a {
	color: inherit;
	text-decoration: none;
}

/* Careers page dynamic role cards */
.sc-careers-query .role-card {
	margin-top: 0;
}

.sc-careers-query .wp-block-post-featured-image,
.sc-careers-query .wp-block-post-featured-image a {
	display: block;
	width: 64px;
	height: 64px;
}

.sc-careers-query .wp-block-post-featured-image img {
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: 10px;
	display: block;
}

.sc-careers-query .wp-block-post-title a {
	color: var(--wp--preset--color--ink, #0b1f1a);
	text-decoration: none;
}

.sc-careers-query .wp-block-post-terms {
	margin-bottom: 0.25rem;
}

.sc-careers-query .wp-block-post-terms a {
	color: inherit;
	text-decoration: none;
}

.sc-careers-query .wp-block-read-more {
	display: block;
	text-align: right;
	font-weight: 700;
	color: var(--wp--preset--color--mint-600, #01b18b);
	text-decoration: none;
}

/* Contact / signup form status banners */
.sc-contact-status,
.sc-form-status {
	margin-bottom: 16px;
	padding: 14px 18px;
	border-radius: 10px;
	font-size: 14.5px;
	font-weight: 600;
	line-height: 1.45;
}

.sc-contact-status--success,
.sc-form-status--success {
	background: #e8f8f3;
	color: #0b5c4a;
	border: 1px solid #01b18b;
}

.sc-contact-status--error,
.sc-form-status--error {
	background: #fef2f2;
	color: #991b1b;
	border: 1px solid #fca5a5;
}

/* Events page dynamic upcoming list */
.sc-events-query .sc-event-row {
	gap: 18px;
	align-items: center;
}

.sc-events-query .sc-event-date {
	min-width: 72px;
	text-align: center;
	flex-shrink: 0;
}

.sc-events-query .sc-event-date .wp-block-post-date {
	margin: 0;
	line-height: 1.2;
}

.sc-events-query .sc-event-body {
	flex: 1;
	min-width: 220px;
}

.sc-events-query .wp-block-post-title a {
	color: var(--wp--preset--color--ink, #0b1f1a);
	text-decoration: none;
}

.sc-events-query .wp-block-read-more {
	font-weight: 700;
	color: var(--wp--preset--color--mint-600, #01b18b);
	text-decoration: none;
	white-space: nowrap;
}

/* Single post: article + related sidebar */
.sc-single-columns {
	align-items: flex-start;
}

.sc-single-sidebar {
	position: sticky;
	top: 96px;
}

.sc-single-sidebar > .wp-block-heading {
	margin-top: 0;
	margin-bottom: 12px;
	color: #0b1f1a;
}

.sc-related-posts .sc-related-item {
	border-bottom: 1px solid #e5e7eb;
}

.sc-related-posts .sc-related-item:last-child {
	border-bottom: none;
}

.sc-related-posts .wp-block-post-title {
	margin: 0 0 4px;
	line-height: 1.35;
}

.sc-related-posts .wp-block-post-title a {
	color: var(--wp--preset--color--ink, #0b1f1a);
	text-decoration: none;
}

.sc-related-posts .wp-block-post-title a:hover {
	color: #01b18b;
}

.sc-related-posts .wp-block-post-date {
	margin: 0;
}

@media (max-width: 900px) {
	.sc-single-columns {
		flex-direction: column !important;
	}

	.sc-single-article,
	.sc-single-sidebar {
		flex-basis: 100% !important;
		width: 100% !important;
	}

	.sc-single-sidebar {
		position: static;
		margin-top: 32px;
		padding-top: 24px;
		border-top: 1px solid #e5e7eb;
	}
}

/* Signup form: submit loading state */
.sc-signup-submit.is-loading {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	opacity: 0.85;
	cursor: wait;
	pointer-events: none;
}

.sc-signup-spinner {
	display: inline-block;
	width: 1em;
	height: 1em;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: sc-signup-spin 0.7s linear infinite;
	flex-shrink: 0;
}

@keyframes sc-signup-spin {
	to {
		transform: rotate(360deg);
	}
}
