/**
 * Recipe Display
 *
 * Deliberately low-specificity so Divi's own styling wins where it should.
 * Everything visual is driven by the custom properties below — override them
 * once in Divi (Theme Options → Custom CSS, or a Code module) rather than
 * fighting individual selectors.
 *
 * Font family and base size are intentionally NOT set, so the recipe inherits
 * whatever typography the Divi theme builder template establishes.
 */

.recipe-card,
.recipe-ingredients,
.recipe-method,
.recipe-equipment,
.recipe-notes,
.recipe-meta {
	--recipe-accent: #b4562c;
	--recipe-text: inherit;
	--recipe-muted: rgba(0, 0, 0, 0.55);
	--recipe-rule: rgba(0, 0, 0, 0.12);
	--recipe-surface: rgba(0, 0, 0, 0.025);
	--recipe-radius: 6px;
	--recipe-gap: 1.5rem;
}

/* ---------------------------------------------------------------------------
   Card wrapper
   --------------------------------------------------------------------------- */

.recipe-card {
	border: 1px solid var(--recipe-rule);
	border-radius: var(--recipe-radius);
	padding: clamp(1.25rem, 4vw, 2.25rem);
	background: #fff;
}

.recipe-card__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	margin-bottom: 0.75rem;
}

.recipe-card__title {
	margin: 0;
	flex: 1 1 auto;
}

.recipe-card__summary {
	color: var(--recipe-muted);
	margin-bottom: var(--recipe-gap);
}

.recipe-card__summary p:last-child {
	margin-bottom: 0;
}

/* ---------------------------------------------------------------------------
   Section heads
   --------------------------------------------------------------------------- */

.recipe-section__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	margin-bottom: 0.75rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid var(--recipe-rule);
}

.recipe-section__title {
	margin: 0;
}

.recipe-ingredients,
.recipe-method,
.recipe-equipment,
.recipe-notes {
	margin-bottom: var(--recipe-gap);
}

/* ---------------------------------------------------------------------------
   Meta strip
   --------------------------------------------------------------------------- */

.recipe-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 1.25rem 2rem;
	padding: 1rem 0;
	margin-bottom: var(--recipe-gap);
	border-top: 1px solid var(--recipe-rule);
	border-bottom: 1px solid var(--recipe-rule);
}

.recipe-meta__item {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}

.recipe-meta__label {
	font-size: 0.75em;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--recipe-muted);
}

.recipe-meta__value {
	font-weight: 600;
}

/* ---------------------------------------------------------------------------
   Servings scaler
   --------------------------------------------------------------------------- */

.recipe-scaler {
	display: inline-flex;
	border: 1px solid var(--recipe-rule);
	border-radius: var(--recipe-radius);
	overflow: hidden;
	flex: 0 0 auto;
}

.recipe-scaler__btn {
	appearance: none;
	background: transparent;
	border: 0;
	border-right: 1px solid var(--recipe-rule);
	padding: 0.4em 0.8em;
	font: inherit;
	font-size: 0.85em;
	line-height: 1.4;
	cursor: pointer;
	color: var(--recipe-muted);
	transition: background-color 0.15s ease, color 0.15s ease;
}

.recipe-scaler__btn:last-child {
	border-right: 0;
}

.recipe-scaler__btn:hover,
.recipe-scaler__btn:focus-visible {
	background: var(--recipe-surface);
	color: inherit;
}

.recipe-scaler__btn.is-active {
	background: var(--recipe-accent);
	color: #fff;
}

/* ---------------------------------------------------------------------------
   Ingredients
   --------------------------------------------------------------------------- */

.recipe-ingredients__group + .recipe-ingredients__group {
	margin-top: 1.25rem;
}

.recipe-ingredients__group-title,
.recipe-method__group-title {
	margin: 0 0 0.5rem;
	font-size: 1em;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--recipe-accent);
}

.recipe-ingredients__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.recipe-ingredients__item {
	padding: 0.35rem 0;
	border-bottom: 1px solid var(--recipe-rule);
}

.recipe-ingredients__item:last-child {
	border-bottom: 0;
}

.recipe-ingredients__label {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	cursor: pointer;
	margin: 0;
	font-weight: inherit;
}

.recipe-ingredients__check {
	margin: 0.35em 0 0;
	flex: 0 0 auto;
	accent-color: var(--recipe-accent);
	cursor: pointer;
}

.recipe-ingredients__text {
	display: block;
}

.recipe-amount,
.recipe-unit {
	font-weight: 600;
}

/* Highlight scaled quantities so it's obvious they are no longer as written. */
.recipe-ingredients.is-scaled .recipe-amount {
	color: var(--recipe-accent);
}

.recipe-ingredient-notes {
	color: var(--recipe-muted);
	font-style: italic;
}

.recipe-ingredient-notes::before {
	content: ", ";
	font-style: normal;
}

.recipe-ingredients__item.is-ticked .recipe-ingredients__text {
	text-decoration: line-through;
	opacity: 0.45;
}

/* ---------------------------------------------------------------------------
   Method
   --------------------------------------------------------------------------- */

.recipe-method__group + .recipe-method__group {
	margin-top: 1.5rem;
}

.recipe-method__list {
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: none;
}

.recipe-method__step {
	display: flex;
	gap: 1rem;
	padding: 0.9rem 0;
	border-bottom: 1px solid var(--recipe-rule);
}

.recipe-method__step:last-child {
	border-bottom: 0;
}

.recipe-method__step-number {
	flex: 0 0 auto;
	width: 1.9em;
	height: 1.9em;
	border-radius: 50%;
	background: var(--recipe-accent);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.85em;
	font-weight: 700;
	line-height: 1;
}

.recipe-method__step-body {
	flex: 1 1 auto;
	min-width: 0;
}

.recipe-method__step-text > *:last-child {
	margin-bottom: 0;
}

.recipe-method__step-image {
	margin: 0.75rem 0 0;
	max-width: 380px;
}

.recipe-method__step-image img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--recipe-radius);
}

/* ---------------------------------------------------------------------------
   Equipment and notes
   --------------------------------------------------------------------------- */

.recipe-equipment__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.recipe-equipment__item {
	background: var(--recipe-surface);
	border: 1px solid var(--recipe-rule);
	border-radius: 999px;
	padding: 0.3em 0.9em;
	font-size: 0.9em;
}

.recipe-notes__body {
	background: var(--recipe-surface);
	border-left: 3px solid var(--recipe-accent);
	padding: 1rem 1.25rem;
	border-radius: 0 var(--recipe-radius) var(--recipe-radius) 0;
}

.recipe-notes__body > *:last-child {
	margin-bottom: 0;
}

/* ---------------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------------- */

.recipe-jump,
.recipe-print-btn {
	display: inline-block;
	appearance: none;
	background: transparent;
	border: 1px solid var(--recipe-accent);
	color: var(--recipe-accent);
	border-radius: var(--recipe-radius);
	padding: 0.45em 1.1em;
	font: inherit;
	font-size: 0.9em;
	line-height: 1.4;
	cursor: pointer;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.recipe-jump:hover,
.recipe-print-btn:hover,
.recipe-jump:focus-visible,
.recipe-print-btn:focus-visible {
	background: var(--recipe-accent);
	color: #fff;
	text-decoration: none;
}

/* Anchor targets clear any Divi sticky header. */
#recipe-card,
#recipe-ingredients,
#recipe-method {
	scroll-margin-top: 100px;
}

/* ---------------------------------------------------------------------------
   Small screens
   --------------------------------------------------------------------------- */

@media (max-width: 600px) {
	.recipe-meta {
		gap: 1rem 1.5rem;
	}

	.recipe-section__head {
		align-items: flex-start;
	}
}

/* ---------------------------------------------------------------------------
   Print
   Strips Divi chrome down to the card. Selectors are broad on purpose —
   Divi generates a lot of wrappers, and hiding by role is more durable than
   targeting specific module classes.
   --------------------------------------------------------------------------- */

@media print {
	header,
	footer,
	nav,
	aside,
	.et_pb_menu,
	.et-l--header,
	.et-l--footer,
	.et_pb_section_video_bg,
	.et_pb_with_border,
	.recipe-scaler,
	.recipe-print-btn,
	.recipe-jump,
	.comment-respond,
	#comments,
	.et_pb_social_media_follow,
	.sidebar,
	#sidebar {
		display: none !important;
	}

	body {
		background: #fff !important;
		color: #000 !important;
		font-size: 11pt;
	}

	.recipe-card {
		border: 0;
		padding: 0;
		max-width: 100%;
	}

	.recipe-method__step,
	.recipe-ingredients__group {
		break-inside: avoid;
		page-break-inside: avoid;
	}

	.recipe-method__step-number {
		background: #000 !important;
		color: #fff !important;
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
	}

	.recipe-method__step-image {
		max-width: 220px;
	}

	.recipe-ingredients__check {
		/* Keep the boxes — people tick them on paper too. */
		opacity: 1;
	}

	a[href]::after {
		content: "";
	}
}
