/**
 * Forge Recipes — front-end styles.
 *
 * Deliberately colour-free: only class hooks, borders, spacing and
 * currentColor, so the plugin looks native on any theme. The Forge
 * Flagship theme can layer its token-based styling on top of the
 * same class names.
 */

/* Recipe grid */
.forge-recipes-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 1rem;
}

.forge-recipes-grid__empty {
	font-style: italic;
}

/* Recipe cards (grid) */
.forge-recipes-card {
	border: 1px solid currentColor;
	border-radius: 0.5rem;
	padding: 1rem 1.25rem 1.25rem;
}

.forge-recipes-card__media {
	display: block;
	margin: -0.25rem -0.25rem 1rem;
	border-radius: 0.375rem;
	overflow: hidden;
}

.forge-recipes-card__image {
	display: block;
	width: 100%;
	height: auto;
}

/* The honest placeholder: a bordered panel that says plainly there
 * is no photo, sized like the media it stands in for. */
.forge-recipes-card__media--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 4 / 3;
	border: 1px dashed currentColor;
	border-radius: 0.375rem;
	margin: 0 0 1rem;
}

.forge-recipes-card__placeholder-label {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.8125em;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	opacity: 0.7;
}

.forge-recipes-card__title {
	margin: 0;
	font-size: 1.125em;
	line-height: 1.3;
}

.forge-recipes-card__meta {
	margin: 0.5rem 0 0;
	font-size: 0.875em;
}

.forge-recipes-card__total {
	font-weight: 600;
}

.forge-recipes-card__categories {
	margin: 0.5rem 0 0;
	font-size: 0.875em;
}

.forge-recipes-card__category {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.8125em;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

/* Single-recipe card */
.forge-recipes-detail {
	border: 1px solid currentColor;
	border-radius: 0.5rem;
	padding: 1rem 1.25rem 1.25rem;
	margin-bottom: 1.5rem;
}

.forge-recipes-detail__heading {
	margin: 0 0 0.75rem;
	font-size: 1.125em;
	line-height: 1.3;
}

.forge-recipes-detail__list {
	margin: 0;
}

.forge-recipes-detail__row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1rem;
	padding: 0.5rem 0;
	border-top: 1px solid currentColor;
}

.forge-recipes-detail__term {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.8125em;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	min-width: 7rem;
	margin: 0;
}

.forge-recipes-detail__value {
	margin: 0;
}

.forge-recipes-detail__subheading {
	margin: 1rem 0 0.5rem;
	font-size: 1em;
	line-height: 1.3;
}

/* The ingredients checklist: one line per ingredient, each with an
 * open box marker a cook can tick off mentally (or on paper). */
.forge-recipes-detail__ingredients {
	list-style: none;
	margin: 0;
	padding: 0;
}

.forge-recipes-detail__ingredient {
	position: relative;
	padding: 0.375rem 0 0.375rem 1.75rem;
	border-top: 1px solid currentColor;
}

.forge-recipes-detail__ingredient::before {
	content: "";
	position: absolute;
	left: 0.125rem;
	top: 0.625em;
	width: 0.875em;
	height: 0.875em;
	border: 1px solid currentColor;
	border-radius: 0.1875rem;
}

/* The print link closes the card: the same tracked monospace voice
 * as the detail terms, pointing at the recipe's /print/ sheet. */
.forge-recipes-print {
	margin: 1rem 0 0;
}

.forge-recipes-print__link {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.8125em;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

/* A quick Ctrl+P on the ordinary recipe page, tidied as far as a
 * plugin stylesheet honestly can: it styles only the plugin's own
 * classes (the theme owns its chrome — the guaranteed-clean sheet
 * is the /print/ view). On paper the card loses its box, and the
 * print link itself — meaningless on paper — disappears. */
@media print {
	.forge-recipes-detail {
		border: none;
		padding: 0;
	}

	.forge-recipes-print {
		display: none;
	}
}
