/* Fast Recipe Engine - frontend styles
   System fonts only, no frameworks, mobile-first. Kept deliberately small
   (well under the 50KB budget) - every rule here earns its place. */

:root {
	--fre-radius: 8px;
	--fre-border: #e4e7e6;
	--fre-text: #1c1f1e;
	--fre-muted: #6b716f;
	--fre-accent: #0f6e5c;
	--fre-accent-soft: #eaf4f1;
	--fre-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.fre-card,
.fre-intro,
.fre-quick-answer,
.fre-faq,
.fre-nutrition,
.fre-checklist,
.fre-instructions,
.fre-related-grid,
.fre-share-bar {
	font-family: var(--fre-font);
	color: var(--fre-text);
}

/* Quick Answer - the snippet/AI-Overview-friendly callout */
.fre-quick-answer {
	background: var(--fre-accent-soft);
	border-left: 4px solid var(--fre-accent);
	border-radius: 0 var(--fre-radius) var(--fre-radius) 0;
	padding: 12px 16px;
	margin: 0 0 24px;
	font-size: 1rem;
	line-height: 1.6;
}

/* Recipe card */
.fre-card {
	background: #fff;
}

.fre-card-media {
	position: relative;
	display: block;
}

.fre-card-media img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 6px;
}

.fre-card-title {
	font-size: 1.4rem;
	line-height: 1.3;
	margin: 12px 0 8px;
}

/* Recipe Snapshot - icon + value + label tiles, shown right after the image */
.fre-snapshot {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
	gap: 10px;
	background: var(--fre-accent-soft);
	border: 1px solid var(--fre-border);
	border-radius: var(--fre-radius);
	padding: 14px;
	margin: 14px 0 16px;
}

.fre-snapshot-item {
	display: flex;
	align-items: center;
	gap: 8px;
}

.fre-snapshot-icon {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: #fff;
	color: var(--fre-accent);
}

.fre-snapshot-text {
	display: flex;
	flex-direction: column;
	line-height: 1.25;
	min-width: 0;
}

.fre-snapshot-value {
	font-weight: 700;
	font-size: 0.85rem;
	color: var(--fre-text);
}

.fre-snapshot-label {
	font-size: 0.66rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--fre-muted);
}

.fre-card-jump {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 10px;
}

.fre-btn {
	display: inline-block;
	font-size: 0.85rem;
	font-weight: 600;
	padding: 9px 14px;
	border-radius: 6px;
	background: var(--fre-accent);
	color: #fff;
	text-decoration: none;
	border: 1px solid var(--fre-accent);
	cursor: pointer;
	line-height: 1.2;
}

.fre-btn-outline {
	background: transparent;
	color: var(--fre-accent);
}

.fre-btn-print {
	width: 100%;
	text-align: center;
	background: transparent;
	color: var(--fre-text);
	border-color: var(--fre-border);
}

/* Sticky "Jump to Recipe" - mobile only, hidden until the card scrolls out */
.fre-sticky-jump {
	display: flex;
	justify-content: center;
	padding: 10px 16px;
	background: #fff;
	box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
}

.fre-sticky-jump .fre-btn {
	width: 100%;
	max-width: 320px;
	text-align: center;
}

/* Share bar - compact, icon-only, brand-colored circular buttons */
.fre-share-bar {
	margin: 0 0 16px;
}

.fre-share-label {
	display: block;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--fre-muted);
	margin: 0 0 8px;
}

.fre-share-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.fre-share-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	color: #fff;
}

.fre-share-btn svg {
	display: block;
}

.fre-share-facebook {
	background: #1877f2;
}

.fre-share-whatsapp {
	background: #25d366;
}

.fre-share-pinterest {
	background: #e60023;
}

.fre-share-x {
	background: #111111;
}

.fre-share-email {
	background: #5b6664;
}

/* Ingredient checklist */
.fre-checklist {
	list-style: none;
	margin: 0 0 24px;
	padding: 0;
}

.fre-checklist-item {
	border-bottom: 1px solid var(--fre-border);
	padding: 10px 0;
}

.fre-checklist-item label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	cursor: pointer;
}

.fre-checklist-item input {
	margin-top: 3px;
	width: 18px;
	height: 18px;
	accent-color: var(--fre-accent);
}

.fre-checklist-item input:checked + span {
	color: var(--fre-muted);
	text-decoration: line-through;
}

.fre-checklist-group {
	font-weight: 700;
	margin: 14px 0 4px;
	padding: 0;
	border-bottom: none;
}

/* Instructions */
.fre-instructions {
	margin: 0 0 24px;
	padding-left: 1.4em;
}

.fre-instructions li {
	margin-bottom: 14px;
	line-height: 1.6;
}

/* Nutrition - a stat-tile grid rather than a plain table */
.fre-nutrition {
	background: #fff;
	border: 1px solid var(--fre-border);
	border-radius: var(--fre-radius);
	padding: 16px;
	margin: 0 0 24px;
}

.fre-nutrition-caption {
	margin: 0 0 12px;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--fre-muted);
}

.fre-nutrition-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(82px, 1fr));
	gap: 10px;
}

.fre-nutrition-item {
	text-align: center;
	padding: 10px 6px;
	background: var(--fre-accent-soft);
	border-radius: 6px;
}

.fre-nutrition-value {
	display: block;
	font-size: 1.15rem;
	font-weight: 700;
	color: var(--fre-accent);
	line-height: 1.2;
}

.fre-nutrition-unit {
	font-size: 0.68rem;
	font-weight: 600;
	color: var(--fre-muted);
}

.fre-nutrition-label {
	display: block;
	margin-top: 4px;
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--fre-muted);
}

/* FAQ - native <details>/<summary>, each one fully independent */
.fre-faq-item {
	border-bottom: 1px solid var(--fre-border);
}

.fre-faq-question {
	position: relative;
	display: block;
	list-style: none;
	cursor: pointer;
	padding: 14px 28px 14px 0;
	font-size: 1rem;
	font-weight: 600;
	font-family: var(--fre-font);
	color: var(--fre-text);
}

.fre-faq-question::-webkit-details-marker {
	display: none;
}

.fre-faq-question::marker {
	content: "";
}

.fre-faq-question::after {
	content: "+";
	position: absolute;
	right: 4px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--fre-accent);
	font-size: 1.2rem;
}

.fre-faq-item[open] > .fre-faq-question::after {
	content: "\2212";
}

.fre-faq-answer {
	padding: 0 0 16px;
}

/* Related Recipes - real posts, shown as a thumbnail card grid */
.fre-related-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 14px;
	margin: 0 0 24px;
}

.fre-related-card {
	display: block;
	text-decoration: none;
	color: var(--fre-text);
	border: 1px solid var(--fre-border);
	border-radius: var(--fre-radius);
	overflow: hidden;
	background: #fff;
}

.fre-related-media {
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--fre-accent-soft);
}

.fre-related-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.fre-related-title {
	display: block;
	padding: 10px 12px;
	font-size: 0.85rem;
	font-weight: 600;
	line-height: 1.35;
}

/* Pinterest "Pin it" overlay - auto-attached by JS to recipe images */
.fre-pin-host {
	position: relative;
}

.fre-pin-wrap {
	display: inline-block;
	max-width: 100%;
}

.fre-pin-wrap img {
	display: block;
	max-width: 100%;
}

.fre-pin-btn {
	position: absolute;
	top: 10px;
	left: 10px;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	background: #e60023;
	color: #fff;
	font-size: 0.78rem;
	font-weight: 700;
	padding: 7px 13px;
	border-radius: 999px;
	text-decoration: none;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.fre-pin-btn svg {
	display: block;
}

@media (min-width: 768px) {
	.fre-sticky-jump {
		display: none;
	}
}

@media print {
	.fre-sticky-jump,
	.fre-btn-print,
	.fre-share-bar,
	.fre-pin-btn,
	.fre-faq-question::after {
		display: none !important;
	}

	.fre-faq-answer {
		display: block !important;
	}
}
