/**
 * Ballin' Ass Recipes — theme polish
 * Small CSS that block markup can't express: category pills (core/categories
 * renders its own <ul>), card hover, newsletter input focus. Token-driven.
 */

/* ---- Category strip: turn core/categories list into pill links ---- */
.ballin-category-strip ul,
.wp-block-categories.ballin-category-strip {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	justify-content: center;
}

.ballin-category-strip li { margin: 0; }

.ballin-category-strip a {
	display: inline-block;
	padding: 0.45em 1em;
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--contrast) 18%, transparent);
	border-radius: 100px;
	background: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--contrast);
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.ballin-category-strip a:hover,
.ballin-category-strip a:focus-visible {
	background: var(--wp--preset--color--brick);
	color: var(--wp--preset--color--paper);
	border-color: var(--wp--preset--color--brick);
}

/* ---- Recipe cards: gentle lift on hover ---- */
.wp-block-query .wp-block-post-template > li,
.wp-block-query .wp-block-post-template .wp-block-group.has-paper-background-color {
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.wp-block-query .wp-block-post-template > li:hover .wp-block-group.has-paper-background-color {
	transform: translateY(-4px);
	box-shadow: 0 20px 40px -24px rgba(34, 58, 51, 0.45);
}

/* Post-title links: spruce by default, brick on hover (keeps brick as an accent,
   not the default — hero + card titles were reading as walls of red). */
.wp-block-post-title a {
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}
.wp-block-post-title a:hover,
.wp-block-post-title a:focus-visible {
	color: var(--wp--preset--color--brick);
	text-decoration: underline;
}

/* ---- Breathing room so page content never butts against the footer band ---- */
.wp-site-blocks main.wp-block-group {
	padding-block-end: var(--wp--preset--spacing--60);
}

/* ---- core/search: theme never styled it; header instance overflowed.
   Scoped to the icon-button variant so the text-button (results page) is untouched. ---- */
.wp-site-blocks header .wp-block-search {
	width: auto;
	max-width: 260px;
	margin-left: auto;
}
.wp-block-search.wp-block-search__icon-button .wp-block-search__inside-wrapper {
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--contrast) 22%, transparent);
	border-radius: 100px;
	background: var(--wp--preset--color--paper);
	padding: 3px 3px 3px 16px;
	overflow: hidden;
	align-items: center;
}
.wp-block-search.wp-block-search__icon-button .wp-block-search__input {
	border: none !important;
	background: transparent !important;
	box-shadow: none !important;
	color: var(--wp--preset--color--contrast);
	font-family: var(--wp--preset--font-family--body);
	padding-block: 6px;
	margin: 0;
}
.wp-block-search.wp-block-search__icon-button .wp-block-search__input:focus {
	outline: none;
}
.wp-block-search.wp-block-search__icon-button .wp-block-search__button.has-icon {
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	min-width: 40px;
	padding: 0;
	margin: 0;
	border: none;
	border-radius: 100px;
	background: var(--wp--preset--color--brick);
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.wp-block-search.wp-block-search__icon-button .wp-block-search__button.has-icon svg {
	width: 20px;
	height: 20px;
	fill: var(--wp--preset--color--paper);
}
.wp-block-search.wp-block-search__icon-button .wp-block-search__button.has-icon:hover {
	background: color-mix(in srgb, var(--wp--preset--color--brick) 85%, #000);
}

/* ---- Hero: graceful placeholder when the featured recipe has no photo yet,
   so the right side isn't a blank void. The real image sits on top once added. ---- */
.ballin-hero-media {
	min-height: 300px;
	border-radius: 10px;
	overflow: hidden;
	background:
		linear-gradient(135deg,
			var(--wp--preset--color--paper),
			color-mix(in srgb, var(--wp--preset--color--gold) 24%, var(--wp--preset--color--base)));
}
.ballin-hero-media .wp-block-post-featured-image { margin: 0; height: 100%; }
.ballin-hero-media .wp-block-post-featured-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* ---- Single-post hero image: a capped, rounded banner instead of a giant
   full-bleed image. ---- */
.ballin-post-hero {
	margin-block: 0 var(--wp--preset--spacing--40);
}
.ballin-post-hero img {
	width: 100%;
	height: clamp(240px, 42vh, 460px);
	object-fit: cover;
	border-radius: 14px;
	display: block;
}

/* ---- Recipe cards: real media area (photo when present, warm placeholder when
   not) + gentle elevation. Fixes the flat, image-less "meh" card. ---- */
.ballin-card {
	overflow: hidden;
	box-shadow: 0 1px 2px rgba(34, 58, 51, 0.06);
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.ballin-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 22px 44px -26px rgba(34, 58, 51, 0.5);
}
.ballin-card-media {
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background:
		linear-gradient(135deg,
			var(--wp--preset--color--paper),
			color-mix(in srgb, var(--wp--preset--color--gold) 26%, var(--wp--preset--color--base)));
}
.ballin-card-media,
.ballin-card-media .wp-block-post-featured-image {
	margin: 0;
	height: 100%;
}
.ballin-card-media .wp-block-post-featured-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
/* Card body padding — set explicitly here because WP's block-support padding
   gets dropped in this nested constrained group (falls back to ~0 global padding).
   Child selector out-specifies .has-global-padding so it wins reliably. */
.ballin-card > .ballin-card-body {
	padding: 1.35rem 1.5rem 1.45rem;
}

/* ---- Newsletter form: focus + hover states the inline styles can't hold ---- */
.ballin-newsletter-input:focus-visible {
	outline: 2px solid var(--wp--preset--color--gold);
	outline-offset: 2px;
}

.ballin-newsletter-button:hover {
	background-color: color-mix(in srgb, var(--wp--preset--color--brick) 85%, #000) !important;
}

@media (prefers-reduced-motion: reduce) {
	.wp-block-query .wp-block-post-template > li:hover .wp-block-group.has-paper-background-color {
		transform: none;
	}
}
