/*
 * Report (prototype report.html "report-body"). Pattern cmc/report (after the standard page hero):
 *
 *   core/group  is-style-report (section, white, 40/40)
 *     .report__grid    one column (50 apart); from 1024px 784 | 72 | 440
 *       .report__main     intro (Type on), "Key findings", .report__findings (5 rows: count-up figure | text),
 *                         .report__produced (heading + text, then the methodology link)
 *       .report__aside    cover image over the charcoal download card (.report__gate), one 30px radius for both;
 *                         the form is Gravity Forms "Report download" (styled below; GF's own CSS is off, inc/forms.php)
 */
.is-style-report .report__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 50px;
}

@media (width >= 1024px) {
	.is-style-report .report__grid {
		grid-template-columns: minmax(0, 784px) minmax(0, 440px);
		gap: 72px;
	}
}

.is-style-report .report__main {
	display: flex;
	flex-direction: column;
	gap: 24px;
	min-width: 0;
}

.is-style-report .report__findings {
	display: flex;
	flex-direction: column;
}

.is-style-report .report__finding {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding-block: 23px;
	border-top: 1px solid var(--wp--preset--color--greige);
}

.is-style-report .report__finding:last-child {
	border-bottom: 1px solid var(--wp--preset--color--greige);
}

.is-style-report .report__finding > :last-child {
	min-width: 0;
}

@media (width >= 640px) {
	.is-style-report .report__finding {
		flex-direction: row;
		align-items: center;
		gap: 35px;
	}

	.is-style-report .report__figure {
		flex: none;
		width: 150px;
	}
}

.is-style-report .report__produced {
	display: flex;
	flex-direction: column;
	gap: 30px;
	padding-top: 10px;
}

.is-style-report .report__produced-text {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

/* the link is a flex item (prototype a.inline-flex in a flex column), so it doesn't sit on a 24px text line */
.is-style-report .report__produced .wp-block-button.is-style-link {
	display: flex;
}

.is-style-report .report__produced .wp-block-button.is-style-link .wp-block-button__link {
	padding-bottom: 5px;
}

/* the download card */
.is-style-report .report__aside {
	align-self: start;
	overflow: hidden;
	border-radius: var(--wp--custom--radius--section);
}

.is-style-report .report__aside > .wp-block-image {
	margin: 0;
}

.is-style-report .report__aside > .wp-block-image img {
	display: block;
	width: 100%;
}

.is-style-report .report__gate {
	display: flex;
	flex-direction: column;
	gap: 24px;
	padding: 40px;
}

.is-style-report .report__gate-head {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

/* Gravity Forms "Report download": labels over 48px white inputs, two consent boxes split by a faint rule, the
   gradient submit with a download icon (inc/article.php) */
.report__gate .gform_wrapper,
.report__gate .gform_wrapper form {
	margin: 0;
}

.report__gate .gform_wrapper form,
.report__gate .gform_fields {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.report__gate .gform_heading,
.report__gate .gform_validation_container,
.report__gate .gform_ajax_spinner {
	display: none !important;
}

.report__gate .gfield {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.report__gate .gfield_label {
	display: block;
	margin: 0 0 7px;
	padding: 0;
	color: var(--wp--preset--color--off-white);
	font-size: var(--wp--preset--font-size--text-11);
	font-weight: 600;
	line-height: 1.3;
}

/* "(Required)" and the consent boxes' own titles: for screen readers only */
.report__gate .gfield_required,
.report__gate .hidden_label > .gfield_label {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.report__gate .gfield input:is([type="text"], [type="email"]) {
	display: block;
	width: 100%;
	height: 48px;
	padding: 0 14px;
	border: 0;
	border-radius: var(--wp--custom--radius--btn);
	background-color: var(--wp--preset--color--white);
	color: var(--wp--preset--color--charcoal);
	font-family: inherit;
	font-size: var(--wp--preset--font-size--text-10);
	line-height: 1.3;
}

/* the design's placeholder grey (prototype placeholder:text-[#6f6a5f]) */
.report__gate .gfield input::placeholder {
	color: #6f6a5f;
	opacity: 1;
}

.report__gate .ginput_container_consent {
	display: flex;
	align-items: flex-start;
	gap: 12px;
}

.report__gate .ginput_container_consent input[type="checkbox"] {
	flex: none;
	width: 18px;
	height: 18px;
	margin: 2px 0 0;
	accent-color: var(--wp--preset--color--off-white);
}

.report__gate .gfield_consent_label {
	min-width: 0;
	color: var(--wp--preset--color--off-white);
	font-size: var(--wp--preset--font-size--text-11);
	font-weight: 400;
	line-height: 1.3;
}

.report__gate .cmc-gate-updates {
	padding-top: 24px;
	border-top: 1px solid rgb(241 239 236 / 0.15); /* off-white at 15% */
}

.report__gate .cmc-gate-optional {
	display: block;
	margin-bottom: 4px;
	color: var(--wp--preset--color--greige);
	font-weight: 600;
	letter-spacing: var(--wp--custom--letter-spacing--caption);
	text-transform: uppercase;
}

.report__gate .gform_footer {
	margin: 0;
	padding: 0;
}

.report__gate .gform_button,
.report__gate .cmc-gate-pdf {
	position: relative;
	display: inline-flex;
	width: 100%;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 18px 20px 16px 22px;
	border: 0;
	border-radius: var(--wp--custom--radius--btn);
	background: var(--wp--preset--gradient--warm);
	color: var(--wp--preset--color--charcoal);
	font-family: inherit;
	font-size: var(--wp--preset--font-size--text-8);
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	cursor: pointer;
	transition: transform 300ms var(--wp--custom--ease);
}

.report__gate .gform_button:is(:hover, :focus-visible),
.report__gate .cmc-gate-pdf:is(:hover, :focus-visible) {
	transform: translateY(-2px);
}

.report__gate .gform_button svg {
	flex: none;
	width: 16px;
	height: 16px;
}

/* errors and the thank-you (with the PDF link) */
.report__gate :is(.gform_validation_errors, .gfield_validation_message, .validation_message) {
	margin-top: 6px;
	color: var(--wp--preset--color--light-amber);
	font-size: var(--wp--preset--font-size--text-11);
	line-height: 1.3;
}

.report__gate .gform_validation_errors h2 {
	font-size: inherit;
	font-weight: 600;
}

.report__gate .gform_confirmation_message {
	display: flex;
	flex-direction: column;
	gap: 24px;
	color: var(--wp--preset--color--off-white);
	font-size: var(--wp--preset--font-size--text-10);
	line-height: 1.3;
}

@media (prefers-reduced-motion: reduce) {
	.report__gate .gform_button,
	.report__gate .cmc-gate-pdf {
		transition: none;
	}
}
