/**
 * Block-specific Neobrutalist Styles
 * Preserves the original theme styling for block templates
 *
 * @package Berghain
 * @since 2.0.0
 */

/*--------------------------------------------------------------
# Neobrutalist Box Styling for Blocks
--------------------------------------------------------------*/
.neobrutalist-box,
.widget.neobrutalist-box {
	border: var(--wp--custom--border-width--thick) solid var(--wp--preset--color--foreground);
	border-radius: 4px;
	box-shadow: var(--wp--custom--shadow--base);
}

/*--------------------------------------------------------------
# Navigation Block Styles
--------------------------------------------------------------*/
.wp-block-navigation .wp-block-navigation-item a {
	box-shadow: var(--wp--custom--shadow--base);
	transition: all var(--wp--custom--transitions--speed) var(--wp--custom--transitions--easing);
}

.wp-block-navigation .wp-block-navigation-item a:hover,
.wp-block-navigation .wp-block-navigation-item a:focus {
	transform: translate(var(--wp--custom--shadow--offsetX), var(--wp--custom--shadow--offsetY));
	box-shadow: none;
}

/*--------------------------------------------------------------
# Button Block Styles
--------------------------------------------------------------*/
.wp-block-button__link,
.wp-element-button {
	box-shadow: var(--wp--custom--shadow--base) !important;
	transition: all var(--wp--custom--transitions--speed) var(--wp--custom--transitions--easing) !important;
}

.wp-block-button__link:hover,
.wp-block-button__link:focus,
.wp-element-button:hover,
.wp-element-button:focus {
	transform: translate(var(--wp--custom--shadow--offsetX), var(--wp--custom--shadow--offsetY)) !important;
	box-shadow: none !important;
}

/*--------------------------------------------------------------
# Quote Block Enhanced Styling
--------------------------------------------------------------*/
.wp-block-quote {
	box-shadow: var(--wp--custom--shadow--large);
}

.wp-block-pullquote {
	box-shadow: var(--wp--custom--shadow--large);
}

/*--------------------------------------------------------------
# Post Navigation Styling
--------------------------------------------------------------*/
.wp-block-post-navigation-link a {
	display: inline-block;
	padding: var(--wp--preset--spacing--md) var(--wp--preset--spacing--lg);
	background-color: var(--wp--preset--color--main);
	color: var(--wp--preset--color--main-foreground);
	text-decoration: none;
	font-weight: 700;
	border: var(--wp--custom--border-width--thick) solid var(--wp--preset--color--foreground);
	border-radius: 4px;
	box-shadow: var(--wp--custom--shadow--base);
	transition: all var(--wp--custom--transitions--speed) var(--wp--custom--transitions--easing);
}

.wp-block-post-navigation-link a:hover,
.wp-block-post-navigation-link a:focus {
	transform: translate(var(--wp--custom--shadow--offsetX), var(--wp--custom--shadow--offsetY));
	box-shadow: none;
	background-color: var(--wp--preset--color--accent);
}

.wp-block-post-navigation-link .post-navigation-link__label {
	display: block;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 900;
	text-transform: uppercase;
	margin-bottom: var(--wp--preset--spacing--xs);
	color: var(--wp--preset--color--secondary);
}

.wp-block-post-navigation-link .post-navigation-link__title {
	display: block;
	font-size: var(--wp--preset--font-size--base);
	font-weight: 700;
}

/*--------------------------------------------------------------
# Query Pagination (Posts Navigation)
--------------------------------------------------------------*/
.wp-block-query-pagination {
	margin: var(--wp--preset--spacing--xl) 0;
	padding: var(--wp--preset--spacing--lg) 0;
	border-top: var(--wp--custom--border-width--thick) solid var(--wp--preset--color--foreground);
	border-bottom: var(--wp--custom--border-width--thick) solid var(--wp--preset--color--foreground);
}

.wp-block-query-pagination .wp-block-query-pagination-previous a,
.wp-block-query-pagination .wp-block-query-pagination-next a,
.wp-block-query-pagination .wp-block-query-pagination-numbers a {
	display: inline-block;
	padding: var(--wp--preset--spacing--md) var(--wp--preset--spacing--lg);
	background-color: var(--wp--preset--color--main);
	color: var(--wp--preset--color--main-foreground);
	text-decoration: none;
	font-weight: 700;
	border: var(--wp--custom--border-width--thick) solid var(--wp--preset--color--foreground);
	border-radius: 4px;
	box-shadow: var(--wp--custom--shadow--base);
	transition: all var(--wp--custom--transitions--speed) var(--wp--custom--transitions--easing);
}

.wp-block-query-pagination .wp-block-query-pagination-previous a:hover,
.wp-block-query-pagination .wp-block-query-pagination-next a:hover,
.wp-block-query-pagination .wp-block-query-pagination-numbers a:hover,
.wp-block-query-pagination .wp-block-query-pagination-previous a:focus,
.wp-block-query-pagination .wp-block-query-pagination-next a:focus,
.wp-block-query-pagination .wp-block-query-pagination-numbers a:focus {
	transform: translate(var(--wp--custom--shadow--offsetX), var(--wp--custom--shadow--offsetY));
	box-shadow: none;
	background-color: var(--wp--preset--color--accent);
}

.wp-block-query-pagination .wp-block-query-pagination-numbers .current {
	background-color: var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--foreground);
}

/*--------------------------------------------------------------
# Comment Blocks Styling
--------------------------------------------------------------*/
.wp-block-comments-title {
	display: inline-block;
	padding: var(--wp--preset--spacing--md) var(--wp--preset--spacing--lg);
	margin-bottom: var(--wp--preset--spacing--lg);
	background-color: var(--wp--preset--color--main);
	color: var(--wp--preset--color--main-foreground);
	border: var(--wp--custom--border-width--thick) solid var(--wp--preset--color--foreground);
	border-radius: 4px;
	box-shadow: var(--wp--custom--shadow--base);
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 900;
	font-size: var(--wp--preset--font-size--x-large);
	text-transform: uppercase;
	transform: rotate(-1deg);
}

.comment-body.neobrutalist-box {
	box-shadow: var(--wp--custom--shadow--base);
}

.wp-block-post-comments-form .comment-reply-title {
	margin-top: 0;
	margin-bottom: var(--wp--preset--spacing--md);
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 900;
}

.wp-block-post-comments-form {
	padding: var(--wp--preset--spacing--lg);
	border: var(--wp--custom--border-width--thick) solid var(--wp--preset--color--foreground);
	border-radius: 4px;
	box-shadow: var(--wp--custom--shadow--base);
	background-color: var(--wp--preset--color--background);
}

/*--------------------------------------------------------------
# Widget Styling
--------------------------------------------------------------*/
.widget-area .widget {
	margin-bottom: var(--wp--preset--spacing--lg);
}

.widget-title {
	margin-top: 0;
	margin-bottom: var(--wp--preset--spacing--md);
	padding-bottom: var(--wp--preset--spacing--sm);
	border-bottom: var(--wp--custom--border-width--thick) solid var(--wp--preset--color--foreground);
}

/*--------------------------------------------------------------
# Page Header Styling
--------------------------------------------------------------*/
.page-header.neobrutalist-box {
	padding: var(--wp--preset--spacing--lg);
	background-color: var(--wp--preset--color--secondary);
	text-align: center;
	margin-bottom: var(--wp--preset--spacing--xl);
}

.page-title {
	margin: 0;
}

/*--------------------------------------------------------------
# Post Meta Styling
--------------------------------------------------------------*/
.entry-meta,
.post-meta {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	color: var(--wp--preset--color--main);
}

.entry-meta a,
.post-meta a {
	color: var(--wp--preset--color--main);
	text-decoration: none;
	border-bottom: var(--wp--custom--border-width--thin) solid var(--wp--preset--color--foreground);
}

.entry-meta a:hover,
.entry-meta a:focus,
.post-meta a:hover,
.post-meta a:focus {
	border-bottom-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--accent);
}

/*--------------------------------------------------------------
# Search Block Styling
--------------------------------------------------------------*/
.wp-block-search .wp-block-search__button {
	box-shadow: var(--wp--custom--shadow--base);
	transition: all var(--wp--custom--transitions--speed) var(--wp--custom--transitions--easing);
}

.wp-block-search .wp-block-search__button:hover,
.wp-block-search .wp-block-search__button:focus {
	transform: translate(var(--wp--custom--shadow--offsetX), var(--wp--custom--shadow--offsetY));
	box-shadow: none;
}

/*--------------------------------------------------------------
# Form Input Styling
--------------------------------------------------------------*/
.wp-block-search__input,
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
textarea {
	border: var(--wp--custom--border-width--thick) solid var(--wp--preset--color--foreground);
	border-radius: 4px;
}

.wp-block-search__input:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
textarea:focus {
	outline: var(--wp--custom--border-width--thick) solid var(--wp--preset--color--accent);
	outline-offset: var(--wp--custom--border-width--thin);
}

/*--------------------------------------------------------------
# Latest Posts Block
--------------------------------------------------------------*/
.wp-block-latest-posts li {
	margin-bottom: var(--wp--preset--spacing--sm);
	padding-left: var(--wp--preset--spacing--md);
	position: relative;
}

.wp-block-latest-posts li::before {
	content: "▶";
	position: absolute;
	left: 0;
	color: var(--wp--preset--color--accent);
	font-weight: 900;
}

/*--------------------------------------------------------------
# Categories Block
--------------------------------------------------------------*/
.wp-block-categories li {
	margin-bottom: var(--wp--preset--spacing--sm);
	padding-left: var(--wp--preset--spacing--md);
	position: relative;
}

.wp-block-categories li::before {
	content: "▶";
	position: absolute;
	left: 0;
	color: var(--wp--preset--color--accent);
	font-weight: 900;
}

/*--------------------------------------------------------------
# Site Layout Styling
--------------------------------------------------------------*/
.site {
	max-width: var(--wp--style--global--content-size);
	margin: 0 auto;
}

.site-header {
	padding: var(--wp--preset--spacing--lg);
	margin-bottom: var(--wp--preset--spacing--xl);
	background-color: #ffffff;
}

.site-branding {
	text-align: center;
	margin-bottom: var(--wp--preset--spacing--lg);
}

.site-footer {
	margin-top: var(--wp--preset--spacing--xl);
	padding: var(--wp--preset--spacing--xl) var(--wp--preset--spacing--md);
	background-color: #000000;
	color: #ffffff;
	border-radius: 4px;
}

.site-info {
	text-align: center;
	padding: var(--wp--preset--spacing--lg);
	background-color: #ffffff;
	color: #000000;
	border-radius: 4px;
}

/*--------------------------------------------------------------
# Responsive Layout
--------------------------------------------------------------*/
@media screen and (min-width: 768px) {
	.site {
		display: flex;
		flex-wrap: wrap;
		gap: 0;
	}

	.site-header {
		flex: 0 0 100%;
		width: 100%;
	}

	.site-main {
		flex: 0 0 66%;
		width: 66%;
		margin-right: 4%;
		box-sizing: border-box;
	}

	.widget-area {
		flex: 0 0 30%;
		width: 30%;
		margin-top: 0;
		box-sizing: border-box;
	}

	.site-footer {
		flex: 0 0 100%;
		width: 100%;
	}

	.site-main.no-sidebar {
		flex: 0 0 100%;
		width: 100%;
		margin-right: 0;
	}
}

/*--------------------------------------------------------------
# Skip Link (Accessibility)
--------------------------------------------------------------*/
.skip-link {
	position: absolute;
	top: -999px;
	left: -999px;
	background-color: var(--wp--preset--color--main);
	color: var(--wp--preset--color--main-foreground);
	padding: var(--wp--preset--spacing--sm) var(--wp--preset--spacing--md);
	border: var(--wp--custom--border-width--thick) solid var(--wp--preset--color--foreground);
	text-decoration: none;
	font-weight: 700;
	z-index: 100000;
}

.skip-link:focus {
	top: var(--wp--preset--spacing--sm);
	left: var(--wp--preset--spacing--sm);
	outline: var(--wp--custom--border-width--thick) solid var(--wp--preset--color--accent);
	outline-offset: var(--wp--custom--border-width--thin);
}

/*--------------------------------------------------------------
# Accessibility - Screen Reader Text
--------------------------------------------------------------*/
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background-color: var(--wp--preset--color--background);
	border: var(--wp--custom--border-width--thick) solid var(--wp--preset--color--foreground);
	clip: auto !important;
	clip-path: none;
	color: var(--wp--preset--color--foreground);
	display: block;
	font-size: var(--wp--preset--font-size--base);
	height: auto;
	left: var(--wp--preset--spacing--sm);
	padding: var(--wp--preset--spacing--md);
	top: var(--wp--preset--spacing--sm);
	width: auto;
	z-index: 100000;
}
