/**
 * Food26 Recipe Header
 *
 * Contents
 * 1. Variables and layout (split, stacked; stacked below 992 px)
 * 2. Breadcrumb
 * 3. Badges
 * 4. Title, byline, rating, intro
 * 5. Facts
 * 6. Actions (Jump to Recipe, round buttons)
 * 7. Photo and video button
 * 8. Phones, editor hint, reduced motion
 *
 * Colours read the Food26 Design Scheme (--inoforest-color-*, --inoforest-custom-*) with the design's values as
 * fallbacks. Rules use two classes; the Style tab's controls use three (or set the variables).
 */

/* 1. Variables and layout --------------------------------------------------------- */
.food26-recipe-header {
	--food26-rh-primary: var(--inoforest-color-primary, #b23a1e);
	--food26-rh-dark: var(--inoforest-custom-primary-dark, #8e2c15);
	--food26-rh-accent: var(--inoforest-color-accent, #3f6b32);
	--food26-rh-heading: var(--inoforest-color-heading, #2b1a12);
	--food26-rh-muted: var(--inoforest-custom-muted, #6e5f55);
	--food26-rh-line: var(--inoforest-color-border, #ece2d6);
	--food26-rh-ratio: 4 / 3;
	--food26-rh-radius: 26px;
	--food26-rh-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
	align-items: center;
	gap: var(--food26-rh-gap, 60px);
}

.food26-recipe-header[data-layout="stacked"] {
	grid-template-columns: minmax(0, 1fr);
	gap: var(--food26-rh-gap, 40px);
}

.food26-recipe-header[data-layout="stacked"] .food26-recipe-header__content {
	max-width: 860px;
}

/* 2. Breadcrumb ----------------------------------------------------------------- */
/* inline-flex on the nav's text line, as in the design (it sits 3 px down on that line). */
.food26-recipe-header .food26-recipe-header__breadcrumb ol {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 22px;
	padding: 0;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--food26-rh-muted);
	list-style: none;
}

.food26-recipe-header__breadcrumb li {
	margin: 0;
}

.food26-recipe-header .food26-recipe-header__breadcrumb a {
	color: var(--food26-rh-heading);
	text-decoration: none;
}

.food26-recipe-header .food26-recipe-header__breadcrumb a:hover,
.food26-recipe-header .food26-recipe-header__breadcrumb a:focus-visible {
	color: var(--food26-rh-primary);
}

.food26-recipe-header .food26-recipe-header__sep {
	margin-inline-end: 8px;
	font-weight: 400;
	color: var(--food26-rh-primary);
}

.food26-recipe-header__sep svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
	vertical-align: -0.125em;
}

[dir="rtl"] .food26-recipe-header__sep i,
[dir="rtl"] .food26-recipe-header__sep svg {
	scale: -1 1;
}

/* 3. Badges ---------------------------------------------------------------------- */
.food26-recipe-header__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 18px;
}

.food26-recipe-header .food26-recipe-header__badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 14px;
	font-size: 0.78rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.02em;
	color: #fff;
	text-decoration: none;
	background-color: var(--food26-rh-accent);
	border-radius: 999px;
	transition: color 0.3s var(--food26-rh-ease), background-color 0.3s var(--food26-rh-ease);
}

.food26-recipe-header__badge svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.food26-recipe-header .food26-recipe-header__badge--primary {
	background-color: var(--food26-rh-primary);
}

.food26-recipe-header .food26-recipe-header__badge--light {
	color: var(--food26-rh-heading);
	background-color: #fff;
}

.food26-recipe-header .food26-recipe-header__badge--members {
	background-color: var(--inoforest-custom-dark, #22150f);
}

.food26-recipe-header .food26-recipe-header__badge--tested {
	color: var(--food26-rh-accent);
	background-color: var(--inoforest-custom-accent-light, #e9f1e4);
}

.food26-recipe-header a.food26-recipe-header__badge--members:hover,
.food26-recipe-header a.food26-recipe-header__badge--members:focus-visible {
	color: #fff;
	background-color: var(--food26-rh-primary);
}

.food26-recipe-header a.food26-recipe-header__badge--tested:hover,
.food26-recipe-header a.food26-recipe-header__badge--tested:focus-visible {
	color: #fff;
	background-color: var(--food26-rh-accent);
}

/* 4. Title, byline, rating, intro --------------------------------------------------- */
.food26-recipe-header .food26-recipe-header__title {
	margin: 0 0 18px;
	font-size: clamp(2.4rem, 4.4vw, 3.6rem);
	color: var(--food26-rh-heading);
}

.food26-recipe-header .food26-recipe-header__byline {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 22px;
	margin-bottom: 20px;
	font-size: 0.9rem;
	color: var(--food26-rh-muted);
}

.food26-recipe-header .food26-recipe-header__author {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-weight: 600;
	color: var(--food26-rh-heading);
	text-decoration: none;
}

.food26-recipe-header .food26-recipe-header__author:hover,
.food26-recipe-header .food26-recipe-header__author:focus-visible {
	color: var(--food26-rh-primary);
}

.food26-recipe-header .food26-recipe-header__avatar {
	width: 42px;
	height: 42px;
	max-width: none;
	object-fit: cover;
	border-radius: 50%;
}

.food26-recipe-header .food26-recipe-header__rating-link {
	display: inline-flex;
	color: inherit;
	text-decoration: none;
}

.food26-recipe-header .food26-recipe-header__rating {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	font-size: 0.875rem;
	line-height: 1.2;
	color: var(--food26-rh-muted);
}

.food26-recipe-header .food26-recipe-header__stars {
	display: inline-flex;
	gap: 1px;
	font-size: 1rem;
	color: var(--inoforest-custom-rating, #b7791f);
}

.food26-recipe-header__stars svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

[dir="rtl"] .food26-recipe-header__stars .ri-star-half-fill {
	scale: -1 1;
}

.food26-recipe-header__rating-value {
	font-weight: 700;
	color: var(--food26-rh-heading);
}

.food26-recipe-header .food26-recipe-header__intro {
	margin: 0;
	font-size: 1.1rem;
}

/* 5. Facts ------------------------------------------------------------------------- */
.food26-recipe-header .food26-recipe-header__facts {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	margin: 26px 0 28px;
	padding: 0;
	list-style: none;
	background-color: #fff;
	border: 1px solid var(--food26-rh-line);
	border-radius: 16px;
}

.food26-recipe-header .food26-recipe-header__fact {
	display: grid;
	justify-items: center;
	gap: 2px;
	margin: 0;
	padding: 16px 8px;
	text-align: center;
}

.food26-recipe-header .food26-recipe-header__fact + .food26-recipe-header__fact {
	border-inline-start: 1px solid var(--food26-rh-line);
}

.food26-recipe-header .food26-recipe-header__fact-icon {
	display: grid;
	font-size: 1.35rem;
	color: var(--food26-rh-primary);
}

.food26-recipe-header__fact-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.food26-recipe-header .food26-recipe-header__fact-label {
	font-size: 0.8rem;
	color: var(--food26-rh-muted);
}

.food26-recipe-header .food26-recipe-header__fact-value {
	font-size: 1rem;
	line-height: 1.3;
	color: var(--food26-rh-heading);
	overflow-wrap: anywhere;
}

/* 6. Actions -------------------------------------------------------------------------- */
.food26-recipe-header__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}

.food26-recipe-header .food26-recipe-header__jump {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 54px;
	padding: 14px 30px;
	font-size: 0.975rem;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	color: #fff;
	background-color: var(--food26-rh-primary);
	border: 2px solid var(--food26-rh-primary);
	border-radius: 999px;
	transition: color 0.3s var(--food26-rh-ease), background-color 0.3s var(--food26-rh-ease), border-color 0.3s var(--food26-rh-ease);
}

.food26-recipe-header .food26-recipe-header__jump:hover,
.food26-recipe-header .food26-recipe-header__jump:focus-visible {
	color: #fff;
	background-color: var(--food26-rh-dark);
	border-color: var(--food26-rh-dark);
}

.food26-recipe-header .food26-recipe-header__icon-btn {
	display: inline-grid;
	flex: none;
	place-items: center;
	width: 54px;
	height: 54px;
	padding: 0;
	font-size: 21px;
	font-weight: 400;
	line-height: 1;
	color: var(--food26-rh-heading);
	text-decoration: none;
	background-color: #fff;
	border: 2px solid var(--food26-rh-line);
	border-radius: 50%;
	cursor: pointer;
	transition: color 0.3s var(--food26-rh-ease), background-color 0.3s var(--food26-rh-ease), border-color 0.3s var(--food26-rh-ease);
}

.food26-recipe-header .food26-recipe-header__icon-btn:hover,
.food26-recipe-header .food26-recipe-header__icon-btn:focus-visible,
.food26-recipe-header .food26-recipe-header__icon-btn[aria-pressed="true"] {
	color: #fff;
	background-color: var(--food26-rh-primary);
	border-color: var(--food26-rh-primary);
}

.food26-recipe-header__jump svg,
.food26-recipe-header__icon-btn svg,
.food26-recipe-header__video svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

/* 7. Photo and video button --------------------------------------------------------------- */
.food26-recipe-header__media {
	position: relative;
}

.food26-recipe-header .food26-recipe-header__frame {
	aspect-ratio: var(--food26-rh-ratio);
	overflow: hidden;
	background-color: var(--inoforest-custom-warm, #f3e9dc);
	border-radius: var(--food26-rh-radius);
}

.food26-recipe-header .food26-recipe-header__frame img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

.food26-recipe-header .food26-recipe-header__video {
	position: absolute;
	inset-block-end: 20px;
	inset-inline-start: 20px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 46px;
	padding: 10px 22px;
	font-size: 0.925rem;
	font-weight: 700;
	line-height: 1.2;
	color: var(--food26-rh-heading);
	text-decoration: none;
	background-color: #fff;
	border: 2px solid #fff;
	border-radius: 999px;
	box-shadow: 0 18px 44px rgba(43, 26, 18, 0.12);
	transition: color 0.3s var(--food26-rh-ease), background-color 0.3s var(--food26-rh-ease), border-color 0.3s var(--food26-rh-ease);
}

.food26-recipe-header .food26-recipe-header__video:hover,
.food26-recipe-header .food26-recipe-header__video:focus-visible {
	color: var(--food26-rh-dark);
	background-color: var(--inoforest-custom-primary-light, #fbeae4);
	border-color: var(--inoforest-custom-primary-light, #fbeae4);
}

/* 8. Phones, editor hint, reduced motion ----------------------------------------------------- */
@media (max-width: 991px) {
	.food26-recipe-header {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--food26-rh-gap, 40px);
	}
}

@media (max-width: 767px) {
	.food26-recipe-header .food26-recipe-header__facts {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.food26-recipe-header .food26-recipe-header__fact:nth-child(3) {
		border-inline-start: 0;
	}

	.food26-recipe-header .food26-recipe-header__fact:nth-child(n + 3) {
		border-block-start: 1px solid var(--food26-rh-line);
	}

	.food26-recipe-header .food26-recipe-header__jump {
		flex: 1 1 100%;
	}
}

.food26-recipe-header__hint {
	margin: 0;
}

@media (prefers-reduced-motion: reduce) {
	.food26-recipe-header .food26-recipe-header__badge,
	.food26-recipe-header .food26-recipe-header__jump,
	.food26-recipe-header .food26-recipe-header__icon-btn,
	.food26-recipe-header .food26-recipe-header__video {
		transition: none;
	}
}

/* Email Me's button stays hidden until its script runs. */
.food26-recipe-header [data-food26-email-open][hidden] {
	display: none;
}
