/**
 * Neobrutalist Custom Styles
 *
 * @package Palomino
 * @since 1.0.0
 */

/* Archive Header Styling */
.palomino-archive-header {
	transform: rotate(-1deg);
	box-shadow: 4px 4px 0 0 #000000 !important;
}

.palomino-archive-header .wp-block-query-title {
	text-transform: uppercase;
}

/* Remove shadows from nested groups to avoid shadow-within-shadow */
/* Specifically target groups that are inside main content wrapper, but not comment-related groups */
main > .wp-block-group .wp-block-group:not(.wp-block-comment-template > .wp-block-group):not(.wp-block-comments > .wp-block-group) {
	box-shadow: none !important;
}

/* Single Post/Page View: Add neo-brutalist shadows */
/* Main content wrapper in single post/page views */
.single main > .wp-block-group:first-of-type,
.page main > .wp-block-group:first-of-type,
.single main .wp-block-column > .wp-block-group:first-of-type,
.page main .wp-block-column > .wp-block-group:first-of-type {
	box-shadow: 4px 4px 0 0 #000000 !important;
}

/* Individual comments - group is inside li, not direct child */
.single .wp-block-comment-template .wp-block-group,
.page .wp-block-comment-template .wp-block-group {
	box-shadow: 4px 4px 0 0 #000000 !important;
}

/* Comment form wrapper */
.single .wp-block-comments > .wp-block-group:last-of-type,
.page .wp-block-comments > .wp-block-group:last-of-type {
	box-shadow: 4px 4px 0 0 #000000 !important;
}

/* Remove shadows from groups inside header */
header .wp-block-group {
	box-shadow: none !important;
}

/* Remove shadows from groups inside footer */
footer .wp-block-group {
	box-shadow: none !important;
}

/* Footer - Black background with white text and borders */
.palomino-footer {
	background-color: #000000 !important;
}

.palomino-footer,
.palomino-footer * {
	color: #ffffff !important;
}

/* Ensure all footer blocks have transparent or black backgrounds with white borders */
.palomino-footer .wp-block-group,
.palomino-footer .wp-block-column {
	background-color: transparent !important;
}

.palomino-footer .wp-block-column {
	border: 2px solid #ffffff !important;
	border-radius: 10px !important;
	padding: var(--wp--preset--spacing--50) !important;
}

/* Ensure footer columns wrapper also has no conflicting styles */
.palomino-footer .wp-block-columns {
	margin-bottom: 0;
}

.palomino-footer h1,
.palomino-footer h2,
.palomino-footer h3,
.palomino-footer h4,
.palomino-footer h5,
.palomino-footer h6 {
	color: #ffffff !important;
}

.palomino-footer a {
	color: var(--wp--preset--color--highlight) !important;
	text-decoration: underline;
}

.palomino-footer a:hover,
.palomino-footer a:focus {
	color: #ffffff !important;
}

/* Footer navigation - white borders */
.palomino-footer .wp-block-navigation .wp-block-navigation-item__content {
	background-color: transparent;
	border-color: #ffffff;
	color: #ffffff !important;
}

.palomino-footer .wp-block-navigation .wp-block-navigation-item__content:hover,
.palomino-footer .wp-block-navigation .wp-block-navigation-item__content:focus {
	background-color: var(--wp--preset--color--highlight);
	color: #000000 !important;
	border-color: #ffffff;
}

/* Footer latest posts */
.palomino-footer .wp-block-latest-posts li {
	border-color: #ffffff;
}

.palomino-footer .wp-block-latest-posts a {
	color: var(--wp--preset--color--highlight) !important;
}

.palomino-footer .wp-block-latest-posts a:hover {
	color: #ffffff !important;
}

.palomino-footer .wp-block-latest-posts__post-date {
	color: #ffffff !important;
	opacity: 0.8;
}

/* Post Navigation Links */
.wp-block-post-navigation-link {
	flex: 1 1 auto;
}

.wp-block-post-navigation-link a {
	display: inline-block;
	padding: 0.75rem 1.5rem;
	background-color: #000000;
	color: #ffffff;
	border: 2px solid #000000;
	border-radius: 10px;
	box-shadow: 3px 3px 0 0 #000000;
	text-decoration: none;
	font-weight: 600;
	transition: all 0.2s ease;
}

.wp-block-post-navigation-link a:hover,
.wp-block-post-navigation-link a:focus {
	background-color: #000000;
	color: #ffffff !important;
	box-shadow: 1px 1px 0 0 #000000;
	transform: translate(2px, 2px);
}

.wp-block-post-navigation-link a:hover .post-navigation-link__label,
.wp-block-post-navigation-link a:focus .post-navigation-link__label {
	color: var(--wp--preset--color--highlight) !important;
}

.wp-block-post-navigation-link a:hover .post-navigation-link__title,
.wp-block-post-navigation-link a:focus .post-navigation-link__title {
	color: #ffffff !important;
}

/* Highlight the 'Previous' and 'Next' labels */
.wp-block-post-navigation-link .post-navigation-link__label {
	color: var(--wp--preset--color--highlight);
	font-weight: 700;
	text-transform: uppercase;
	display: block;
}

/* Navigation link text (post title) */
.wp-block-post-navigation-link a {
	text-transform: uppercase;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

/* Increase post title font size in navigation */
.wp-block-post-navigation-link .post-navigation-link__title {
	font-size: 1.125rem;
}

/* Right align the next link */
.wp-block-post-navigation-link:not(.post-navigation-link-previous) {
	text-align: right;
}

/* Hide arrows in navigation links */
.wp-block-post-navigation-link .post-navigation-link__arrow-previous,
.wp-block-post-navigation-link .post-navigation-link__arrow-next {
	display: none;
}

/* Comments Section Header */
.wp-block-comments-title {
	background-color: #000000;
	color: #ffffff;
	border: 2px solid #000000;
	border-radius: 10px;
	box-shadow: 4px 4px 0 0 #000000;
	padding: 1rem 1.5rem;
	margin-bottom: 2rem;
	font-weight: 700;
	transform: rotate(-1deg);
	text-transform: uppercase;
}

.wp-block-comments-title h2,
.wp-block-comments-title h3 {
	margin: 0;
	color: #ffffff;
	text-transform: uppercase;
}

/* Highlight the number in the comments title */
.wp-block-comments-title .wp-block-comments__comment-count {
	color: var(--wp--preset--color--highlight);
}

/* Comment Reply Link - Button Style */
.wp-block-comment-reply-link a {
	display: inline-block;
	padding: 0.5rem 1rem;
	background-color: var(--wp--preset--color--highlight);
	color: #000000;
	border: 2px solid #000000;
	border-radius: 10px;
	box-shadow: 3px 3px 0 0 #000000;
	text-decoration: none;
	font-weight: 600;
	font-size: 0.875rem;
	transition: all 0.2s ease;
	margin-top: 0.5rem;
}

.wp-block-comment-reply-link a:hover,
.wp-block-comment-reply-link a:focus {
	box-shadow: 1px 1px 0 0 #000000;
	transform: translate(2px, 2px);
	background-color: var(--wp--preset--color--highlight);
}

/* Comment Form Styling */
/* Note: Border and shadow controlled via Site Editor settings */
.wp-block-post-comments-form {
	margin-top: 2rem;
}

.wp-block-post-comments-form h3 {
	margin-top: 0;
}

/* Comment Reply Form (contextual form when replying to specific comment) */
#respond {
	background-color: #ffffff;
	border: 2px solid #000000;
	border-radius: 10px;
	box-shadow: 4px 4px 0 0 #000000;
	padding: var(--wp--preset--spacing--50);
	margin-top: var(--wp--preset--spacing--40);
	margin-bottom: var(--wp--preset--spacing--40);
}

/* Ensure nested respond forms in comments also get styling */
.wp-block-comment-template #respond {
	background-color: #ffffff;
	border: 2px solid #000000;
	border-radius: 10px;
	box-shadow: 4px 4px 0 0 #000000;
	padding: var(--wp--preset--spacing--50);
	margin-top: var(--wp--preset--spacing--40);
	margin-bottom: var(--wp--preset--spacing--40);
}

.wp-block-post-comments-form input[type="text"],
.wp-block-post-comments-form input[type="email"],
.wp-block-post-comments-form input[type="url"],
.wp-block-post-comments-form textarea {
	background-color: #ffffff;
	border: 2px solid #000000;
	border-radius: 5px;
	padding: 0.75rem;
	width: 100%;
	font-family: inherit;
	font-size: 1rem;
}

.wp-block-post-comments-form input[type="text"]:focus,
.wp-block-post-comments-form input[type="email"]:focus,
.wp-block-post-comments-form input[type="url"]:focus,
.wp-block-post-comments-form textarea:focus {
	outline: 2px solid #000000;
	outline-offset: 2px;
}

.wp-block-post-comments-form input[type="submit"] {
	background-color: var(--wp--preset--color--highlight);
	color: #000000;
	border: 2px solid #000000;
	border-radius: 10px;
	box-shadow: 3px 3px 0 0 #000000;
	padding: 0.75rem 1.5rem;
	font-weight: 600;
	font-size: 1rem;
	cursor: pointer;
	transition: all 0.2s ease;
}

.wp-block-post-comments-form input[type="submit"]:hover {
	box-shadow: 1px 1px 0 0 #000000;
	transform: translate(2px, 2px);
}

/* Neobrutalist Button Enhancements */
.is-style-neo-button .wp-block-button__link {
	background-color: #ffffff;
	color: #000000;
	border: 2px solid #000000;
	border-radius: 10px;
	box-shadow: 4px 4px 0 0 #000000;
	padding: 0.75rem 1.5rem;
	font-weight: 600;
	text-decoration: none;
	transition: all 0.2s ease;
	display: inline-block;
}

.is-style-neo-button .wp-block-button__link:hover,
.is-style-neo-button .wp-block-button__link:focus {
	box-shadow: 2px 2px 0 0 #000000;
	transform: translate(2px, 2px);
	background-color: var(--wp--preset--color--highlight);
}

/* Neobrutalist Image Blocks */
.wp-block-image img {
	border: 2px solid #000000;
	border-radius: 10px;
	box-shadow: 4px 4px 0 0 #000000;
}

.wp-block-image figcaption {
	background-color: #000000;
	color: #ffffff;
	padding: 0.5rem 1rem;
	margin-top: -4px;
	border-radius: 0 0 10px 10px;
	font-size: 0.875rem;
}

/* Neobrutalist Gallery */
.wp-block-gallery .wp-block-image img {
	border: 2px solid #000000;
	box-shadow: 3px 3px 0 0 #000000;
}

/* Neobrutalist Cover Block */
.wp-block-cover {
	border: 4px solid #000000;
	border-radius: 10px;
	box-shadow: 6px 6px 0 0 #000000;
}

/* Neobrutalist Media & Text */
.wp-block-media-text {
	border: 2px solid #000000;
	border-radius: 10px;
	background-color: #ffffff;
	box-shadow: 4px 4px 0 0 #000000;
	overflow: hidden;
}

.wp-block-media-text__media img {
	border: none;
	border-radius: 0;
	box-shadow: none;
}

/* Neobrutalist Columns */
.wp-block-columns > .wp-block-column {
	border: 2px solid #000000;
	border-radius: 10px;
	background-color: #ffffff;
	padding: 1.5rem;
	box-shadow: 3px 3px 0 0 #000000;
}

/* Neobrutalist Table */
.wp-block-table table {
	border-collapse: separate;
	border-spacing: 0;
	border: 2px solid #000000;
	border-radius: 10px;
	overflow: hidden;
}

.wp-block-table th {
	background-color: var(--wp--preset--color--highlight);
	border: 2px solid #000000;
	padding: 0.75rem;
	font-weight: 700;
}

.wp-block-table td {
	border: 2px solid #000000;
	padding: 0.75rem;
	background-color: #ffffff;
}

.wp-block-table tr:nth-child(even) td {
	background-color: #f8f8f8;
}

/* Neobrutalist Blockquote - Single Post View */
.single .wp-block-post-content blockquote,
.page .wp-block-post-content blockquote {
	background-color: var(--wp--preset--color--highlight);
	border: 2px solid #000000;
	border-radius: 10px;
	box-shadow: 4px 4px 0 0 #000000;
	padding: 1.5rem;
	margin: 1.5rem 0;
}

/* Quote Post Type - Remove background/border/shadow from blockquotes, make text prominent */
.single.format-quote .wp-block-post-content blockquote,
.page.format-quote .wp-block-post-content blockquote,
.palomino-archive-posts > li.format-quote blockquote {
	background: none;
	border: none;
	box-shadow: none;
	border-radius: 0;
	padding: 0;
	margin: 0;
	font-size: 1.5rem;
	font-weight: 600;
	line-height: 1.4;
	color: #000000;
	font-style: italic;
}

/* Blockquote citations should not be italic */
.single.format-quote .wp-block-post-content blockquote cite,
.page.format-quote .wp-block-post-content blockquote cite,
.palomino-archive-posts > li.format-quote blockquote cite {
	font-style: normal;
}

/* Neobrutalist Pullquote */
.wp-block-pullquote {
	border: 4px solid #000000;
	border-radius: 10px;
	background-color: var(--wp--preset--color--highlight);
	box-shadow: 6px 6px 0 0 #000000;
	padding: 2rem;
}

.wp-block-pullquote blockquote {
	border: none;
	margin: 0;
	padding: 0;
}

.wp-block-pullquote cite {
	color: #000000;
	font-weight: 600;
	font-style: normal;
}

/* Neobrutalist Code Block */
.wp-block-code {
	border: 2px solid #000000;
	border-radius: 10px;
	background-color: #f8f8f8;
	box-shadow: 3px 3px 0 0 #000000;
	padding: 1rem;
}

.wp-block-code code {
	background-color: transparent;
	color: #000000;
	font-family: 'Courier New', Courier, monospace;
}

/* Neobrutalist Preformatted */
.wp-block-preformatted {
	border: 2px solid #000000;
	border-radius: 10px;
	background-color: #f8f8f8;
	box-shadow: 3px 3px 0 0 #000000;
	padding: 1rem;
	overflow-x: auto;
}

/* Neobrutalist Verse */
.wp-block-verse {
	border: 2px solid #000000;
	border-radius: 10px;
	background-color: #ffffff;
	box-shadow: 3px 3px 0 0 #000000;
	padding: 1.5rem;
	font-family: inherit;
}

/* Neobrutalist Search */
.wp-block-search .wp-block-search__button {
	background-color: var(--wp--preset--color--highlight);
	border: 2px solid #000000;
	border-radius: 10px;
	box-shadow: 3px 3px 0 0 #000000;
	color: #000000;
	font-weight: 600;
	padding: 0.75rem 1.5rem;
	transition: all 0.2s ease;
}

.wp-block-search .wp-block-search__button:hover {
	box-shadow: 1px 1px 0 0 #000000;
	transform: translate(2px, 2px);
}

.wp-block-search .wp-block-search__input {
	border: 2px solid #000000;
	border-radius: 10px;
	padding: 0.75rem;
	font-size: 1rem;
}

/* Neobrutalist Navigation - Simplified Header Style */
.wp-block-navigation ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.wp-block-navigation .wp-block-navigation-item {
	margin: 0;
}

.wp-block-navigation .wp-block-navigation-item__content {
	padding: 0.75rem 1.5rem;
	border: 2px solid #000000;
	border-radius: 0;
	background-color: #ffffff;
	box-shadow: none;
	text-decoration: none;
	color: #000000 !important;
	font-weight: 600;
	transition: all 0.2s ease;
	display: block;
	border-left-width: 0;
}

.wp-block-navigation .wp-block-navigation-item:first-child .wp-block-navigation-item__content {
	border-left-width: 2px;
	border-radius: 10px 0 0 10px;
}

.wp-block-navigation .wp-block-navigation-item:last-child .wp-block-navigation-item__content {
	border-radius: 0 10px 10px 0;
}

.wp-block-navigation .wp-block-navigation-item__content:hover,
.wp-block-navigation .wp-block-navigation-item__content:focus {
	background-color: var(--wp--preset--color--background);
	color: #000000 !important;
	box-shadow: none;
	transform: none;
}

/* Neobrutalist List */
.wp-block-list li {
	margin-bottom: 0.5rem;
}

.wp-block-list li::marker {
	color: var(--wp--preset--color--highlight);
	font-weight: 700;
}

/* Neobrutalist Details/Summary */
details.wp-block-details {
	border: 2px solid #000000;
	border-radius: 10px;
	background-color: #ffffff;
	box-shadow: 3px 3px 0 0 #000000;
	padding: 1rem;
	margin-bottom: 1.5rem;
}

details.wp-block-details summary {
	font-weight: 700;
	cursor: pointer;
	padding: 0.5rem;
	border-radius: 5px;
	transition: background-color 0.2s ease;
}

details.wp-block-details summary:hover {
	background-color: var(--wp--preset--color--background);
}

/* Neobrutalist Calendar */
.wp-block-calendar table {
	border: 2px solid #000000;
	border-radius: 10px;
	box-shadow: 3px 3px 0 0 #000000;
	overflow: hidden;
}

.wp-block-calendar th {
	background-color: var(--wp--preset--color--highlight);
	border: 1px solid #000000;
	font-weight: 700;
}

.wp-block-calendar td {
	border: 1px solid #000000;
}

/* Neobrutalist Archives/Categories */
.wp-block-archives,
.wp-block-categories {
	list-style: none;
	padding: 0;
}

.wp-block-archives li,
.wp-block-categories li {
	margin-bottom: 0.5rem;
}

.wp-block-archives li a,
.wp-block-categories li a {
	display: inline-block;
	padding: 0.5rem 1rem;
	border: 2px solid #000000;
	border-radius: 10px;
	background-color: #ffffff;
	box-shadow: 2px 2px 0 0 #000000;
	text-decoration: none;
	color: #000000;
	transition: all 0.2s ease;
}

.wp-block-archives li a:hover,
.wp-block-categories li a:hover {
	background-color: var(--wp--preset--color--highlight);
	box-shadow: 1px 1px 0 0 #000000;
	transform: translate(1px, 1px);
}

/* Post Meta Styling (author, date, categories, tags) */
.post-meta-top,
.post-meta-bottom {
	font-size: 0.875rem;
	font-weight: 600;
	padding: 0 !important;
	box-shadow: none !important;
	background: transparent !important;
}

.post-meta-top .wp-block-post-author,
.post-meta-top .wp-block-post-date,
.post-meta-bottom .wp-block-post-terms {
	font-size: 0.875rem;
	font-weight: 600;
}

/* Comment meta wrapper (avatar + name/date group) - targets only the inner meta groups */
.wp-block-comment-template li > .wp-block-group > .wp-block-group {
	padding: 0 !important;
	box-shadow: none !important;
	background: transparent !important;
	border: none !important;
}

/* Inner vertical group containing author name and date in comments */
.wp-block-comment-template li > .wp-block-group > .wp-block-group .wp-block-group {
	padding: 0 !important;
	box-shadow: none !important;
	background: transparent !important;
	border: none !important;
}

/* Archive/Feed Post Titles - Remove top margin */
.palomino-archive-posts .wp-block-post-title {
	margin-top: 0;
}

/* Archive/Feed Posts - Remove hover effects */
.palomino-archive-posts > li {
	transition: none !important;
}

.palomino-archive-posts > li:hover {
	transform: none !important;
	box-shadow: 4px 4px 0 0 #000000 !important;
}

/* Disable hover color changes on hyperlinks */
a:hover,
a:focus {
	color: inherit;
}

.wp-block-post-content a:hover,
.wp-block-post-content a:focus,
.entry-content a:hover,
.entry-content a:focus {
	color: inherit;
}

/* Sidebar Styling */
/* Prevent double borders on sidebar wrapper */
.wp-block-column:has(.palomino-sidebar) {
	border: none !important;
	box-shadow: none !important;
	padding: 0 !important;
	background: transparent !important;
}

/* Also prevent borders on main content column */
.wp-block-columns .wp-block-column {
	border: none !important;
	box-shadow: none !important;
	background: transparent !important;
}

/* Ensure sidebar blocks have drop shadows */
.palomino-sidebar > .wp-block-group {
	box-shadow: 4px 4px 0 0 #000000 !important;
}

.palomino-sidebar .wp-block-latest-posts li,
.palomino-sidebar .wp-block-categories li,
.palomino-sidebar .wp-block-archives li {
	margin-bottom: 0.5rem;
	list-style: none;
}

.palomino-sidebar .wp-block-latest-posts,
.palomino-sidebar .wp-block-categories,
.palomino-sidebar .wp-block-archives {
	padding-left: 0;
}

.palomino-sidebar .wp-block-latest-posts a,
.palomino-sidebar .wp-block-categories a,
.palomino-sidebar .wp-block-archives a {
	color: #000000;
	text-decoration: underline;
	font-weight: 400;
	display: inline !important;
	padding: 0 !important;
	border: none !important;
	border-radius: 0 !important;
	background-color: transparent !important;
	box-shadow: none !important;
	transition: none !important;
}

.palomino-sidebar .wp-block-latest-posts a:hover,
.palomino-sidebar .wp-block-categories a:hover,
.palomino-sidebar .wp-block-archives a:hover {
	color: var(--wp--preset--color--highlight);
	background-color: transparent !important;
	box-shadow: none !important;
	transform: none !important;
}

.palomino-sidebar .wp-block-latest-posts__post-date {
	display: block;
	font-size: 0.875rem;
	color: #666666;
	margin-top: 0.25rem;
}

.palomino-sidebar h3 {
	margin-bottom: var(--wp--preset--spacing--40);
}

/* Query Pagination - Neobrutalist Styling */
.wp-block-query-pagination {
	margin-top: var(--wp--preset--spacing--60);
	gap: var(--wp--preset--spacing--30);
}

.wp-block-query-pagination-numbers,
.wp-block-query-pagination-previous,
.wp-block-query-pagination-next {
	display: inline-block;
}

.wp-block-query-pagination a,
.wp-block-query-pagination .page-numbers {
	display: inline-block;
	padding: 0.75rem 1.25rem;
	background-color: #000000;
	color: #ffffff;
	border: 2px solid #000000;
	border-radius: 10px;
	box-shadow: 4px 4px 0 0 #000000;
	text-decoration: none;
	font-weight: 700;
	font-size: 1rem;
	transition: all 0.2s ease;
	margin: 0 0.25rem;
}

.wp-block-query-pagination a:hover,
.wp-block-query-pagination a:focus {
	box-shadow: 2px 2px 0 0 #000000;
	transform: translate(2px, 2px);
	color: #ffffff;
}

.wp-block-query-pagination .page-numbers.current {
	background-color: var(--wp--preset--color--highlight);
	color: #000000;
	border: 2px solid #000000;
	box-shadow: 4px 4px 0 0 #000000;
	padding: 0.75rem 1.25rem;
	font-weight: 700;
}

.wp-block-query-pagination .page-numbers.dots {
	border: none;
	box-shadow: none;
	background: transparent;
	color: #ffffff;
	font-weight: 700;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
	.wp-block-columns > .wp-block-column {
		margin-bottom: 1rem;
	}

	.wp-block-navigation .wp-block-navigation-item__content {
		padding: 0.5rem 0.75rem;
	}
}
