/*
Theme Name: Pattern Builder WP
Theme URI: https://patternbuilderwp.com
Author: Twenty Bellows
Author URI: https://twentybellows.com
Description: The patternbuilderwp.com website theme — the public pattern directory and account pages.
Requires at least: 6.8
Requires PHP: 7.4
Version: 0.2.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: patternbuilderwp
*/

/*
 * The design system lives in theme.json and styles/*.json. What is left here
 * is what those cannot express: the markup the pbwpcom plugin's own blocks
 * render, and the two resets every block theme needs.
 */

.wp-site-blocks > footer {
	margin-block-start: 0;
}

/* ---------- Directory cards (pbwpcom/pattern-card) ---------- */

.pbwp-card {
	display: block;
	border: 1px solid var(--wp--preset--color--hairline);
	border-radius: 12px;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	background: var(--wp--preset--color--surface);
	transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.pbwp-card:hover {
	border-color: rgba(79, 70, 229, 0.35);
	box-shadow: 0 16px 40px -18px rgba(79, 70, 229, 0.3);
	transform: translateY(-3px);
}

.pbwp-card__preview {
	display: block;
	position: relative;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	background: var(--wp--preset--color--surface-muted);
}

.pbwp-card__preview iframe {
	/* Absolute so the fixed 1400px canvas never inflates grid tracks
	   (the mobile single-column grid sizes tracks by content). */
	position: absolute;
	top: 0;
	left: 0;
	width: 1400px;
	height: 934px;
	border: 0;
	transform-origin: 0 0;
	pointer-events: none;
}

.pbwp-card__title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 14px 18px;
	font-weight: 600;
	font-size: 0.9375rem;
	border-top: 1px solid var(--wp--preset--color--hairline);
}

.pbwp-card__badge {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 999px;
	background: #fef3c7;
	color: #b45309;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

/* ---------- Single pattern (pbwpcom/pattern-preview, pbwpcom/pro-cta) ---------- */

.pbwp-single-preview {
	width: 100%;
	height: 640px;
	border: 1px solid var(--wp--preset--color--hairline);
	border-radius: 12px;
	background: var(--wp--preset--color--surface);
}

.pbwp-download {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 16px;
	margin: 24px 0;
}

.pbwp-download--locked {
	color: var(--wp--preset--color--text-muted);
}

.pbwp-download .wp-element-button {
	display: inline-block;
	text-decoration: none;
}

.pbwp-download__count,
.pbwp-pro-cta__price {
	color: var(--wp--preset--color--text-muted);
	font-size: 0.875rem;
}

/* ---------- Header, below the small breakpoint ---------- */

/* The bar keeps logotype, menu and the call to action; the sign-in link is
   in the menu overlay's reach and would only crowd them. */
@media (max-width: 599px) {

	.wp-block-template-part header .wp-block-group > .has-text-muted-color {
		display: none;
	}
}

/* ---------- Motion sanity ---------- */

@media (prefers-reduced-motion: reduce) {

	.pbwp-card,
	.wp-block-group.is-style-card {
		transition: none;
	}
}
