/**
 * Single Post Highlight block styles.
 * Matches Figma Big Recipe Card (node 823:11717).
 */

.single-post-highlight {
	box-sizing: border-box;
	max-width: none;
	padding: 20px 0 40px;
	width: 100%;
}

.single-post-highlight:not(.has-background) {
	background-color: var(--wp--preset--color--parchment, #faf9f4);
}

.single-post-highlight:not(.has-text-color) {
	color: var(--wp--preset--color--coffee, #3c1f10);
}

.single-post-highlight *,
.single-post-highlight *::before,
.single-post-highlight *::after {
	box-sizing: border-box;
}

.single-post-highlight__inner {
	display: flex;
	flex-direction: column;
	gap: 30px;
	margin-left: auto;
	margin-right: auto;
	max-width: 100%;
	padding: 1px 40px 0;
	width: 100%;
}

@media (min-width: 67.5625rem) {
	.single-post-highlight__inner {
		align-items: stretch;
		display: grid;
		gap: 30px;
		/* Image caps at 1068px; copy always keeps a readable minimum width */
		grid-template-columns: minmax(0, 66.75rem) minmax(18.75rem, 1fr);
	}

	.single-post-highlight__media {
		flex: unset;
		max-width: none;
		width: auto;
	}

	.single-post-highlight__image-link {
		height: 100%;
	}
}

/* Mid desktop (~1081–1400): media at 60%, copy expands. */
@media (min-width: 67.5625rem) and (max-width: 87.5rem) {
	.single-post-highlight__inner {
		grid-template-columns: minmax(0, 60%) minmax(0, 1fr);
	}
}

/* ≤1080px — stacked image over copy, full width. */
@media (max-width: 67.5rem) {
	.single-post-highlight__inner {
		align-items: stretch;
		display: flex;
		flex-direction: column;
		gap: 30px;
		grid-template-columns: none;
	}

	.single-post-highlight__media {
		flex: none;
		grid-column: auto;
		max-width: 100%;
		width: 100%;
	}

	.single-post-highlight__content {
		flex: none;
		grid-column: auto;
		width: 100%;
	}
}

/* -------------------------------------------------------------------------
   Media — Figma image frame 1068×570 (landscape)
   ------------------------------------------------------------------------- */

.single-post-highlight__media {
	flex: 0 1 auto;
	max-width: 66.75rem; /* 1068px — Figma image frame width */
	min-width: 0;
	width: 100%;
}

.single-post-highlight__image-link {
	display: block;
	height: auto;
	outline-offset: 4px;
	width: 100%;
}

.single-post-highlight__image-link:focus-visible {
	outline: 2px solid currentColor;
}
.no-border .single-post-highlight__image {
	border:none;
}
.single-post-highlight__image {
	aspect-ratio: 1068 / 610;
	border: 1px solid var(--wp--preset--color--coffee, #3c1f10);
	display: block;
	height: auto;
	max-width: none;
	object-fit: cover;
	width: 100%;
}

@media (max-width: 48rem) {
	.single-post-highlight__inner {
		padding-left: 20px;
		padding-right: 20px;
	}

	.single-post-highlight__image-link {
		aspect-ratio: 1 / 1;
		overflow: hidden;
	}

	.single-post-highlight__image {
		aspect-ratio: 1 / 1;
		height: 100%;
		width: 100%;
	}
}

/* -------------------------------------------------------------------------
   Content: rules, title, excerpt, CTA
   ------------------------------------------------------------------------- */

.single-post-highlight__content {
	display: flex;
	flex: none;
	flex-direction: column;
	justify-content: flex-start;
	min-width: 0;
	width: 100%;
}

.single-post-highlight__main {
	display: flex;
	flex-direction: column;
	gap: 0.75rem; /* 12px */
	width: 100%;
}

.single-post-highlight__category {
	display: none;
	font-family: var(--wp--preset--font-family--gt-maru-mono, ui-monospace, Consolas, Menlo, monospace);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.72px;
	line-height: 1.25;
	margin: 0;
	text-transform: uppercase;
}

.single-post-highlight__category-bracket {
	font-weight: inherit;
}

.single-post-highlight__footer {
	display: flex;
	flex-direction: column;
	gap: 1rem; /* 16px */
	margin-top: 1.5rem;
	width: 100%;
}

/* Desktop: stretch copy to image height and pin CTA to the bottom (Figma justify-between). */
@media (min-width: 67.5625rem) {
	.single-post-highlight__content {
		align-self: stretch;
		flex: unset;
		height: 100%;
		justify-content: space-between;
		min-height: 0;
		min-width: 0;
		width: auto;
	}

	.single-post-highlight__footer {
		margin-top: auto;
	}
}

.single-post-highlight__rule {
	background-color: currentColor;
	border: 0;
	display: block;
	height: 1px;
	margin: 0;
	opacity: 1;
	padding: 0;
	width: 100%;
}

.single-post-highlight__title {
	font-family: var(--wp--preset--font-family--pp-neue-montreal, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
	font-size: clamp(2rem, 3.5vw, 3rem); /* 48px */
	font-weight: 400;
	letter-spacing: -0.01em;
	line-height: 1.1;
	margin: 0;
	overflow-wrap: break-word;
	text-transform: capitalize;
}

.single-post-highlight__title a {
	color: inherit;
	text-decoration: none;
}

.single-post-highlight__title a:hover,
.single-post-highlight__title a:focus {
	text-decoration: none;
}

.single-post-highlight__title a:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

.single-post-highlight__excerpt {
	font-family: var(--wp--preset--font-family--pp-neue-montreal, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
	font-size: 1rem;
	font-weight: 400;
	letter-spacing: 0.02em;
	line-height: 1.4;
	margin: 0;
	overflow-wrap: break-word;
	/* ~6 leading spaces in Figma — first line shifts right. */
	text-indent: 1.7em;
	white-space: pre-wrap;
}

.single-post-highlight__cta {
	align-items: center;
	color: inherit;
	display: inline-flex;
	font-family: var(--wp--preset--font-family--gt-maru-mono, ui-monospace, Consolas, Menlo, monospace);
	font-size: 1rem;
	font-weight: 500;
	gap: 0.375rem; /* 6px */
	justify-content: center;
	letter-spacing: -0.02em;
	line-height: 0.9;
	padding: 0;
	text-decoration: none;
	text-transform: uppercase;
	transition: color 150ms ease;
	width: fit-content;
}

.single-post-highlight__cta:hover,
.single-post-highlight__cta:focus {
	color: var(--wp--preset--color--tomato, #f15b22);
	text-decoration: none;
}

.single-post-highlight__cta:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

.single-post-highlight__cta-icon {
	background-color: currentColor;
	display: block;
	flex-shrink: 0;
	height: 13px;
	mask-image: url("../../assets/images/facet-elbow.svg");
	mask-position: center;
	mask-repeat: no-repeat;
	mask-size: contain;
	-webkit-mask-image: url("../../assets/images/facet-elbow.svg");
	-webkit-mask-position: center;
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-size: contain;
	width: 19px;
}

.single-post-highlight__empty {
	font-family: var(--wp--preset--font-family--pp-neue-montreal, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
	margin: 0;
	padding: 1rem;
}

/* -------------------------------------------------------------------------
   Editor — always stack in the canvas (matches frontend at this width)
   ------------------------------------------------------------------------- */

.editor-styles-wrapper .wp-block-cwp-single-post-highlight {
	width: 100%;
}

.editor-styles-wrapper .wp-block-cwp-single-post-highlight .single-post-highlight {
	width: 100%;
}

.editor-styles-wrapper .single-post-highlight__inner,
.block-editor-block-list__block.wp-block-cwp-single-post-highlight .single-post-highlight__inner {
	align-items: stretch !important;
	display: flex !important;
	flex-direction: column !important;
}

.editor-styles-wrapper .single-post-highlight__media,
.editor-styles-wrapper .single-post-highlight__content,
.block-editor-block-list__block.wp-block-cwp-single-post-highlight .single-post-highlight__media,
.block-editor-block-list__block.wp-block-cwp-single-post-highlight .single-post-highlight__content {
	flex: none !important;
	max-width: 100% !important;
	width: 100% !important;
}

.editor-styles-wrapper .single-post-highlight__footer,
.block-editor-block-list__block.wp-block-cwp-single-post-highlight .single-post-highlight__footer {
	margin-top: 1.5rem !important;
}
