/* Guarantee (cwp/guarantee): brass seal + label, heading and wording.
   On light backgrounds: Brass Dark seal, Ink heading. Inside a dark green (Primary) section:
   brass seal, ivory heading, mist text. */
.block-guarantee {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 28px;
	max-width: 860px;
	margin-left: auto;
	margin-right: auto;
}

/* The seal: a 2px brass ring with a second hairline ring 5px outside it */
.block-guarantee__seal {
	flex: none;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 112px;
	height: 112px;
	border: 2px solid var(--wp--preset--color--quaternary);
	border-radius: 50%;
	outline: 1px solid var(--wp--preset--color--quaternary);
	outline-offset: 5px;
	color: var(--wp--preset--color--brass-dark);
}

.block-guarantee__number {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 2.5rem;
	font-weight: 800;
	line-height: 1;
}

.block-guarantee__unit {
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.block-guarantee__content {
	flex: 1 1 400px;
}

.block-guarantee__content > * {
	margin: 0;
}

.block-guarantee .block-guarantee__kicker {
	margin-bottom: 6px;
}

.block-guarantee__heading {
	margin-bottom: 10px;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 2rem;
	font-weight: 800;
	line-height: 1.15;
	color: var(--wp--custom--color--subheading); /* brass: Brass Dark on light bands, brass on dark (theme.json) */
}

.block-guarantee__text {
	font-size: 1.0625rem;
	line-height: 1.6;
	color: var(--wp--custom--color--subheading);
}

/* On the dark green band */
.has-primary-background-color .block-guarantee__seal {
	color: var(--wp--preset--color--quaternary);
}

/* Phones: seal centred above the text */
@media only screen and (max-width: 767px) {
	.block-guarantee {
		justify-content: center;
		text-align: center;
		gap: 22px;
	}

	.block-guarantee__seal {
		width: 96px;
		height: 96px;
	}

	.block-guarantee__number {
		font-size: 2.125rem;
	}

	.block-guarantee__heading {
		font-size: 1.625rem;
	}
}

/* "Compact": the size the guarantee needs when it sits inside a column beside other content
   rather than spanning a band of its own. Same parts, two thirds the scale. */
/* Compact (Guarantee > Styles > Compact) sits in a column of its own beside an offer card, not
   across a band, so it centres: the seal over the words rather than beside them, and the whole
   block centred in the column. */
.block-guarantee.is-style-compact {
	max-width: none;
	gap: 14px;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

/* Stacked, the content is a row of the column, so its flex-basis is a height, not a width: the
   400px the wide layout wants left the block 490px tall with a quarter of it empty. */
.block-guarantee.is-style-compact .block-guarantee__content {
	flex: 0 1 auto;
	width: 100%;
}

/* Straight after a photo the seal sits astride its lower edge, pulled up by half its height, and
   fills with the band's own colour so it reads as a stamp pressed on the picture rather than a
   ring lost in it. The fill is named per band because nothing carries the band's colour as a
   value the seal could inherit. */
.wp-block-image + .block-guarantee.is-style-compact {
	margin-top: 0;
}

.wp-block-image + .block-guarantee.is-style-compact .block-guarantee__seal {
	position: relative;
	margin-top: -52px;
	background: var(--wp--preset--color--background);
}

.has-primary-background-color .wp-block-image + .block-guarantee.is-style-compact .block-guarantee__seal {
	background: var(--wp--preset--color--primary);
}

.has-secondary-background-color .wp-block-image + .block-guarantee.is-style-compact .block-guarantee__seal {
	background: var(--wp--preset--color--secondary);
}
.block-guarantee.is-style-compact .block-guarantee__seal {
	width: 76px;
	height: 76px;
}
.block-guarantee.is-style-compact .block-guarantee__number {
	font-size: 1.625rem;
}
.block-guarantee.is-style-compact .block-guarantee__unit {
	font-size: 0.5625rem;
}
.block-guarantee.is-style-compact .block-guarantee__heading {
	font-size: 1.625rem; /* 26px */
}
.block-guarantee.is-style-compact .block-guarantee__text {
	font-size: 0.9375rem;
}

/* Third column (Call to action heading / button): a short prompt and a button on the right, so a
   guarantee band is also somewhere to buy from. The wording column takes the slack, the prompt
   and button keep their own width, and the band grows to hold all three. */
.block-guarantee--has-cta {
	max-width: 1100px;
	flex-wrap: nowrap;
	gap: 36px;
}

.block-guarantee--has-cta .block-guarantee__content {
	flex: 1 1 auto;
	min-width: 0;
}

.block-guarantee__cta {
	flex: none;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	text-align: center;
}

.block-guarantee__cta-heading {
	margin: 0;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.2;
	color: inherit; /* ivory on the dark band, Ink on a light one */
}

.block-guarantee__button {
	white-space: nowrap;
}

/* Below the laptop breakpoint the three columns stack: seal and prompt centred, wording between
   them, because side by side the wording is squeezed to a couple of words a line. */
@media only screen and (max-width: 1023px) {
	.block-guarantee--has-cta {
		flex-wrap: wrap;
		justify-content: center;
		gap: 24px;
		text-align: center;
	}

	/* The wording takes a row of its own, which puts the seal above it and the prompt below it -
	   the order render.php already outputs them in, so nothing needs reordering here. */
	.block-guarantee--has-cta .block-guarantee__content {
		flex-basis: 100%;
	}
}
