/* WPER Hearth — small additions theme.json can't express. */

:where(.wp-site-blocks) :focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 3px;
}

/* Header */
.wper-header {
	border-bottom: 1px solid var(--wp--preset--color--line);
}
.wper-header .wp-block-navigation a:where(:not(.wp-element-button)) {
	text-decoration: none;
}
.wper-header .wp-block-navigation .current-menu-item > a,
.wper-header .wp-block-navigation a[aria-current="page"] {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 8px;
}
.wper-header .wp-block-navigation-item,
.wper-header .wp-block-button__link {
	min-height: 44px;
}

/* Hero form preview (decorative) */
.wper-preview {
	position: relative;
}
.wper-preview .wper-preview__card {
	box-shadow: var(--wp--preset--shadow--lifted);
}
.wper-preview .wper-preview__field {
	height: 44px;
	border: 1px solid #D8CCBB;
	border-radius: 10px;
	background: #FFFFFF;
}
.wper-preview .wper-preview__label {
	margin-bottom: 0.35rem;
	font-weight: 600;
	font-size: 0.875rem;
}

/* Step numbers */
.wper-step-number {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 999px;
	background: var(--wp--preset--color--surface);
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.375rem;
	line-height: 1;
}

/* Inline shortcode chip */
.wper-chip code,
code.wper-chip {
	display: inline-block;
	padding: 0.4rem 0.75rem;
	border-radius: 8px;
	background: var(--wp--preset--color--surface);
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.9375rem;
}

/* Release rows */
.wper-release-row {
	border-top: 1px solid #D8CCBB;
}
.wper-release-row:last-child {
	border-bottom: 1px solid #D8CCBB;
}

/* Release notes timeline (blog index) */
.wper-timeline .wp-block-post {
	position: relative;
	padding-left: 2.5rem;
	padding-bottom: 3rem;
	border-left: 2px solid #D8CCBB;
	margin-block-start: 0;
}
.wper-timeline .wp-block-post::before {
	content: "";
	position: absolute;
	left: -9px;
	top: 0.75rem;
	width: 16px;
	height: 16px;
	border-radius: 999px;
	box-sizing: border-box;
	background: var(--wp--preset--color--base);
	border: 2px solid #8A7E73;
}
.wper-timeline .wp-block-post:first-child::before {
	background: var(--wp--preset--color--accent);
	border-color: var(--wp--preset--color--accent);
}

/* Docs sidebar navigation */
.wper-docs-nav .wp-block-navigation__container {
	gap: 0.25rem;
	width: 100%;
}
.wper-docs-nav .wp-block-navigation-item {
	width: 100%;
}
.wper-docs-nav .wp-block-navigation-item__content {
	display: flex;
	align-items: center;
	min-height: 44px;
	padding: 0 0.875rem;
	border-radius: 10px;
	text-decoration: none;
	color: var(--wp--preset--color--contrast);
}
.wper-docs-nav .current-menu-item > .wp-block-navigation-item__content,
.wper-docs-nav .wp-block-navigation-item__content[aria-current="page"] {
	background: var(--wp--preset--color--sage);
	font-weight: 600;
}
@media (min-width: 900px) {
	.wper-docs-sidebar {
		position: sticky;
		top: 2rem;
	}
}

/* Footer */
.wper-footer a {
	color: var(--wp--preset--color--footer-text);
	text-decoration: none;
}
.wper-footer a:hover {
	color: var(--wp--preset--color--base);
	text-decoration: underline;
}
.wper-partner {
	min-width: 234px;
	min-height: 60px;
}

/* Cards lift slightly on hover when they are links */
.is-style-card:has(> a:only-child):hover {
	box-shadow: var(--wp--preset--shadow--soft);
}

@media (prefers-reduced-motion: no-preference) {
	.wp-element-button,
	.wp-block-button__link {
		transition: background-color 0.15s ease, color 0.15s ease;
	}
}

.wper-footer ul.wp-block-list {
	list-style: none;
	margin: 0.9rem 0 0;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

/* Search fields */
.wp-block-search__input {
	min-height: 44px;
	border: 1px solid #D8CCBB;
	border-radius: 10px;
	padding: 0 0.875rem;
	background: var(--wp--preset--color--surface);
	font: inherit;
}
.wp-block-search__label {
	font-weight: 600;
	font-size: 0.875rem;
}
.wp-block-search__button {
	border-radius: 999px;
}

/* Custom docs content spacing */
.wper-docs-sidebar + * h2:first-child { margin-top: 0; }

.wp-block-column > .is-style-card {
	box-sizing: border-box;
	height: 100%;
}

.wper-full .wp-block-button,
.wper-full .wp-block-button__link {
	width: 100%;
	text-align: center;
}
