/**
 * Recipe card — base stylesheet.
 *
 * Everything is driven by the custom properties on `.vrtl-recipe`. To restyle
 * the card you should not need to rewrite a single rule: override the variables
 * in your theme and the whole card follows.
 *
 *   .vrtl-recipe {
 *       --vrtl-recipe-accent: #cc1400;
 *       --vrtl-recipe-radius: 0;
 *   }
 *
 * The class names are a stable contract with the card template. If you edit the
 * template in Settings, keep them and this stylesheet keeps working.
 */

.vrtl-recipe {
	--vrtl-recipe-accent: #cc1400;
	--vrtl-recipe-text: #333;
	--vrtl-recipe-muted: #767676;
	--vrtl-recipe-bg: #fff;
	--vrtl-recipe-border: #e2e2e2;
	--vrtl-recipe-rule: 1px solid var( --vrtl-recipe-border );
	--vrtl-recipe-radius: 6px;
	--vrtl-recipe-gap: 1.25rem;
	--vrtl-recipe-font: inherit;

	background: var( --vrtl-recipe-bg );
	border: var( --vrtl-recipe-rule );
	border-radius: var( --vrtl-recipe-radius );
	border-top: 4px solid var( --vrtl-recipe-accent );
	color: var( --vrtl-recipe-text );
	font-family: var( --vrtl-recipe-font );
	margin: 2rem 0;
	padding: var( --vrtl-recipe-gap );
}

.vrtl-recipe > * + * {
	margin-top: var( --vrtl-recipe-gap );
}

/* Header ------------------------------------------------------------------ */

.vrtl-recipe__title {
	color: var( --vrtl-recipe-accent );
	font-size: 1.5em;
	line-height: 1.25;
	margin: 0;
}

.vrtl-recipe__figure {
	margin: 0;
}

.vrtl-recipe__figure img {
	border-radius: calc( var( --vrtl-recipe-radius ) / 2 );
	display: block;
	height: auto;
	max-width: 100%;
}

.vrtl-recipe__summary {
	color: var( --vrtl-recipe-muted );
}

.vrtl-recipe__summary p:first-child {
	margin-top: 0;
}

.vrtl-recipe__summary p:last-child {
	margin-bottom: 0;
}

/* Facts strip ------------------------------------------------------------- */

.vrtl-recipe__meta {
	border-bottom: var( --vrtl-recipe-rule );
	border-top: var( --vrtl-recipe-rule );
	display: grid;
	gap: 0.5rem 1.5rem;
	grid-template-columns: repeat( auto-fit, minmax( 11rem, 1fr ) );
	list-style: none;
	margin: 0;
	padding: 0.9rem 0;
}

.vrtl-recipe__meta-item {
	margin: 0;
}

.vrtl-recipe__meta-label {
	color: var( --vrtl-recipe-muted );
	font-size: 0.85em;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.vrtl-recipe__meta-value {
	font-weight: 600;
}

/* Sections ---------------------------------------------------------------- */

.vrtl-recipe__heading {
	border-left: 3px solid var( --vrtl-recipe-accent );
	font-size: 1.15em;
	margin: 0 0 0.75rem;
	padding-left: 0.6rem;
}

.vrtl-recipe__group-name {
	font-size: 1em;
	margin: 1rem 0 0.4rem;
}

.vrtl-recipe__ingredients {
	list-style: none;
	margin: 0;
	padding: 0;
}

.vrtl-recipe__ingredient {
	border-bottom: 1px dashed var( --vrtl-recipe-border );
	padding: 0.4rem 0;
}

.vrtl-recipe__ingredient:last-child {
	border-bottom: 0;
}

.vrtl-recipe__amount,
.vrtl-recipe__unit {
	font-weight: 700;
}

.vrtl-recipe__ingredient-note {
	color: var( --vrtl-recipe-muted );
	font-size: 0.9em;
}

.vrtl-recipe__steps {
	margin: 0;
	padding-left: 1.3rem;
}

.vrtl-recipe__step {
	margin-bottom: 0.7rem;
	padding-left: 0.3rem;
}

.vrtl-recipe__step img {
	display: block;
	height: auto;
	margin-top: 0.5rem;
	max-width: 100%;
}

.vrtl-recipe__notes {
	background: rgba( 0, 0, 0, 0.03 );
	border-radius: calc( var( --vrtl-recipe-radius ) / 2 );
	padding: 0.75rem 1rem;
}

.vrtl-recipe__notes p:first-child {
	margin-top: 0;
}

.vrtl-recipe__notes p:last-child {
	margin-bottom: 0;
}

/* Video ------------------------------------------------------------------- */

.vrtl-recipe__video {
	aspect-ratio: 16 / 9;
}

.vrtl-recipe__video iframe {
	border: 0;
	height: 100%;
	width: 100%;
}

/* Narrow screens ---------------------------------------------------------- */

@media ( max-width: 480px ) {

	.vrtl-recipe {
		--vrtl-recipe-gap: 1rem;
	}

	.vrtl-recipe__meta {
		grid-template-columns: 1fr 1fr;
	}
}

/* Print ------------------------------------------------------------------- */

@media print {

	.vrtl-recipe {
		border: 0;
		padding: 0;
	}

	.vrtl-recipe__video {
		display: none;
	}
}
