/* ==========================================================================
   VegeBurger recipes
   Uses the --vb-* variables from vegeburger-bp.css (Settings › VegeBurger).
   ========================================================================== */

/* --------------------------------------------------------------------------
   Diet filter chips (Recipes archive)
   -------------------------------------------------------------------------- */

.vb-chip {
	display: inline-block;
	background: #FFFFFF;
	color: var(--vb-ink) !important;
	border: 2px solid var(--vb-line);
	font-family: var(--vb-font-body);
	font-weight: 800;
	padding: 10px 20px;
	margin: 0 8px 10px 0;
	border-radius: var(--vb-radius-pill);
	text-decoration: none;
	transition: border-color 0.15s ease;
}

.vb-chip:hover,
.vb-chip:focus {
	border-color: var(--vb-leaf);
}

body.category-recipes .vb-chip-all,
body.category-vegan .vb-chip-vegan,
body.category-vegetarian .vb-chip-vegetarian {
	background: var(--vb-leaf);
	border-color: var(--vb-leaf);
	color: #FFFFFF !important;
}

/* --------------------------------------------------------------------------
   Recipe grid cards (Divi Blog module with class vb-recipe-grid)
   -------------------------------------------------------------------------- */

.vb-recipe-grid .et_pb_blog_grid .et_pb_post,
.vb-recipe-grid.et_pb_blog_grid .et_pb_post {
	background: #FFFFFF;
	border: 0;
	border-radius: var(--vb-radius-lg);
	box-shadow: var(--vb-shadow);
	padding: 0 0 20px;
	overflow: hidden;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.vb-recipe-grid .et_pb_blog_grid .et_pb_post:hover,
.vb-recipe-grid.et_pb_blog_grid .et_pb_post:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 30px rgba(31, 42, 30, 0.12);
}

.vb-recipe-grid .et_pb_post .et_pb_image_container {
	margin: 0 0 18px;
}

.vb-recipe-grid .et_pb_post .et_pb_image_container img {
	aspect-ratio: 4 / 3;
	object-fit: cover;
	width: 100%;
}

.vb-recipe-grid .et_pb_post .entry-title,
.vb-recipe-grid .et_pb_post .post-meta,
.vb-recipe-grid .et_pb_post .post-content {
	padding: 0 22px;
}

.vb-recipe-grid .et_pb_post .entry-title {
	padding-top: 20px;
}

.vb-recipe-grid .et_pb_post .et_pb_image_container + .entry-title {
	padding-top: 0;
}

.vb-recipe-grid .et_pb_post .entry-title a {
	color: var(--vb-ink);
}

.vb-recipe-grid .et_pb_post .entry-title a:hover {
	color: var(--vb-leaf);
}

.vb-recipe-grid .et_pb_post .post-meta {
	margin: 4px 0 10px;
}

.vb-recipe-grid .et_pb_post .post-meta a {
	display: inline-block;
	background: var(--vb-leaf-tint);
	color: var(--vb-leaf-dark) !important;
	font-size: 12px;
	font-weight: 800;
	padding: 2px 10px;
	border-radius: var(--vb-radius-pill);
	margin: 0 4px 4px 0;
	text-decoration: none;
}

.vb-recipe-grid .pagination a {
	display: inline-block;
	background: #FFFFFF;
	border: 2px solid var(--vb-line);
	border-radius: var(--vb-radius-pill);
	padding: 10px 20px;
	font-weight: 800;
	color: var(--vb-leaf);
}

/* --------------------------------------------------------------------------
   Single recipe page (Divi template)
   -------------------------------------------------------------------------- */

/* Body rows match the title row */
.et_pb_row:has(.vb-recipe-content),
.et_pb_row:has(.vb-recipe-share),
.et_pb_row:has(.vb-recipe-comments),
.et_pb_row:has(.vb-recipe-title) {
	max-width: 960px !important;
	width: 90% !important;
}

.vb-recipe-title .et_pb_title_featured_container {
	margin-top: 28px;
}

.vb-recipe-title .et_pb_title_featured_container img {
	border-radius: 28px;
	width: 100%;
	max-height: 560px;
	object-fit: cover;
	border: 6px solid var(--vb-surface);
	box-shadow: var(--vb-shadow);
}

.vb-recipe-title .et_pb_title_meta_container a {
	color: var(--vb-leaf);
	font-weight: 800;
}

.vb-recipe-content p {
	margin-bottom: 1.1em;
}

.vb-recipe-content img {
	border-radius: var(--vb-radius-lg);
}

/* A post's own Divi Builder sections: no white box, no extra padding */
.vb-recipe-content .et_pb_section {
	background-color: transparent !important;
	padding: 0 !important;
}

.vb-recipe-content .et_pb_row {
	width: 100% !important;
	max-width: 100% !important;
	padding: 0 !important;
}

/* Comments */
.vb-recipe-comments #commentform input[type="text"],
.vb-recipe-comments #commentform input[type="email"],
.vb-recipe-comments #commentform input[type="url"],
.vb-recipe-comments #commentform textarea {
	background: #FFFFFF;
	border: 2px solid var(--vb-line);
	border-radius: var(--vb-radius-sm);
	padding: 12px 14px;
	font-family: var(--vb-font-body);
	font-size: 16px;
	color: var(--vb-ink);
}

.vb-recipe-comments #commentform input:focus,
.vb-recipe-comments #commentform textarea:focus {
	border-color: var(--vb-leaf);
	outline: none;
	box-shadow: 0 0 0 3px var(--vb-leaf-tint);
}

.vb-recipe-comments .et_pb_button,
.vb-recipe-comments #commentform .submit {
	background: var(--vb-leaf) !important;
	color: #FFFFFF !important;
	border: 2px solid var(--vb-leaf) !important;
	border-radius: var(--vb-radius-pill) !important;
	font-family: var(--vb-font-body) !important;
	font-weight: 800 !important;
	padding: 12px 26px !important;
}

.vb-recipe-comments .et_pb_button:after {
	display: none;
}

.vb-recipe-comments .comment_avatar img {
	border-radius: 50%;
}

/* --------------------------------------------------------------------------
   The recipe card (added automatically from the Recipe details box)
   "html body" + !important so Divi's module link/text colours can't win.
   -------------------------------------------------------------------------- */

html body .vb-recipe-jump {
	margin: 0 0 24px !important;
}

html body .vb-recipe-jump a,
html body .vb-recipe-card .vb-recipe-card__print {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--vb-leaf) !important;
	color: #FFFFFF !important;
	border: 2px solid var(--vb-leaf);
	border-radius: var(--vb-radius-pill);
	font-family: var(--vb-font-body);
	font-weight: 800;
	font-size: 15px;
	line-height: 1.2;
	padding: 10px 20px;
	text-decoration: none !important;
	cursor: pointer;
}

html body .vb-recipe-jump .vb-recipe-jump__text,
html body #page-container .vb-recipe-jump a .vb-recipe-jump__text {
	color: #FFFFFF !important;
}

html body .vb-recipe-jump .vb-recipe-jump__text::before {
	content: "↓";
	margin-right: 8px;
	color: #FFFFFF;
}

html body .vb-recipe-jump a:hover,
html body .vb-recipe-card .vb-recipe-card__print:hover {
	background: var(--vb-leaf-dark) !important;
	border-color: var(--vb-leaf-dark);
}

html body .vb-recipe-card {
	background: #FFFFFF;
	border-radius: var(--vb-radius-lg);
	box-shadow: var(--vb-shadow);
	margin: 40px 0 8px;
	padding: 36px 40px 40px;
	color: var(--vb-ink) !important;
	font-family: var(--vb-font-body);
	font-size: 17px;
	line-height: 1.6;
	scroll-margin-top: 120px;
	overflow: hidden;
	position: relative;
}

/* mustard bun strip along the top */
html body .vb-recipe-card::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	height: 8px;
	background: var(--vb-mustard);
}

.vb-recipe-card__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 24px;
}

.vb-recipe-card__diet {
	display: inline-block;
	font-size: 13px;
	font-weight: 800;
	padding: 4px 12px;
	border-radius: var(--vb-radius-pill);
	margin-bottom: 10px;
	background: var(--vb-leaf-tint);
	color: var(--vb-leaf-dark);
}

.vb-recipe-card__diet--vegetarian {
	background: var(--vb-mustard-tint);
	color: #6B4A0E;
}

html body .vb-recipe-card h2.vb-recipe-card__title {
	font-family: var(--vb-font-display) !important;
	font-weight: 700 !important;
	font-size: 34px !important;
	line-height: 1.1 !important;
	color: var(--vb-ink) !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* Facts strip */
.vb-recipe-card__facts {
	display: flex;
	flex-wrap: wrap;
	gap: 0;
	background: var(--vb-surface-raised);
	border-radius: var(--vb-radius-sm);
	margin: 0 0 32px;
	padding: 0;
}

.vb-recipe-card__facts > div {
	flex: 1 1 110px;
	box-sizing: border-box;
	padding: 14px 18px;
	text-align: center;
	border-right: 1px solid var(--vb-line);
}

.vb-recipe-card__facts > div:last-child {
	border-right: 0;
}

.vb-recipe-card__facts dt {
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--vb-ink-muted);
	margin: 0;
}

.vb-recipe-card__facts dd {
	margin: 2px 0 0;
	font-size: 18px;
	font-weight: 800;
	color: var(--vb-ink);
}

/* Two columns: ingredients | method */
.vb-recipe-card__body {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
	gap: 40px;
}

html body .vb-recipe-card h3 {
	font-family: var(--vb-font-display) !important;
	font-weight: 700 !important;
	font-size: 24px !important;
	line-height: 1.2 !important;
	color: var(--vb-ink) !important;
	margin: 0 0 14px !important;
	padding: 0 !important;
}

html body .vb-recipe-card h4 {
	font-family: var(--vb-font-body) !important;
	font-size: 14px !important;
	font-weight: 800 !important;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--vb-leaf) !important;
	margin: 18px 0 8px !important;
	padding: 0 !important;
}

html body .vb-recipe-card ul,
html body .vb-recipe-card ol {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* Ingredients: tick-off checkboxes */
.vb-recipe-card__ingredients li {
	border-bottom: 1px dashed var(--vb-line);
	padding: 8px 0 !important;
	margin: 0 !important;
}

.vb-recipe-card__ingredients li::before {
	display: none !important;
}

.vb-recipe-card__ingredients input[type="checkbox"] {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.vb-recipe-card__ingredients label {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	cursor: pointer;
	color: var(--vb-ink);
}

.vb-recipe-card__ingredients label::before {
	content: "";
	flex: 0 0 20px;
	height: 20px;
	margin-top: 3px;
	border: 2px solid var(--vb-sprout);
	border-radius: 6px;
	background: #FFFFFF;
	box-sizing: border-box;
}

.vb-recipe-card__ingredients input:checked + label {
	color: var(--vb-ink-muted);
	text-decoration: line-through;
}

.vb-recipe-card__ingredients input:checked + label::before {
	background: var(--vb-sprout) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
	border-color: var(--vb-sprout);
}

.vb-recipe-card__ingredients input:focus-visible + label::before {
	outline: 3px solid var(--vb-mustard);
	outline-offset: 2px;
}

/* Method: numbered mustard circles, numbering continues across headings */
.vb-recipe-card__method {
	counter-reset: vb-step;
}

.vb-recipe-card__method li {
	counter-increment: vb-step;
	position: relative;
	padding: 2px 0 18px 50px !important;
	margin: 0 !important;
	color: var(--vb-ink);
}

.vb-recipe-card__method li::before {
	content: counter(vb-step) !important;
	position: absolute;
	left: 0;
	top: 0;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--vb-mustard);
	color: var(--vb-ink);
	font-weight: 800;
	font-size: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Notes */
.vb-recipe-card__notes {
	margin-top: 28px;
	background: var(--vb-surface);
	border-radius: var(--vb-radius-sm);
	padding: 18px 22px;
}

.vb-recipe-card__notes p {
	margin: 0 0 8px !important;
	padding: 0 !important;
}

.vb-recipe-card__notes p:last-child {
	margin-bottom: 0 !important;
}

/* Small screens */
@media (max-width: 760px) {
	html body .vb-recipe-card {
		padding: 28px 20px 24px;
	}

	.vb-recipe-card__body {
		grid-template-columns: 1fr;
		gap: 24px;
	}

	html body .vb-recipe-card h2.vb-recipe-card__title {
		font-size: 28px !important;
	}

	.vb-recipe-card__facts > div {
		flex-basis: 45%;
		border-right: 0;
	}
}

/* Print just the recipe card */
@media print {
	body.vb-has-recipe * {
		visibility: hidden;
	}

	body.vb-has-recipe .vb-recipe-card,
	body.vb-has-recipe .vb-recipe-card * {
		visibility: visible;
	}

	body.vb-has-recipe .vb-recipe-card {
		position: absolute;
		left: 0;
		top: 0;
		width: 100%;
		margin: 0;
		box-shadow: none;
		padding: 0;
	}

	body.vb-has-recipe .vb-recipe-card::before,
	body.vb-has-recipe .vb-recipe-card__print,
	body.vb-has-recipe .vb-recipe-card__ingredients label::before {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.vb-recipe-grid .et_pb_post,
	.vb-chip {
		transition: none;
	}

	.vb-recipe-grid .et_pb_blog_grid .et_pb_post:hover {
		transform: none;
	}
}
