/**
 * Blog mobile: Categories / Archives / Tags as toggle filters under hero;
 * Recent Post stays in sidebar at the bottom of the page.
 */

/* Desktop / tablet: hide mobile filter bar */
.wp-blog-filter-bar {
	display: none;
}

@media screen and (max-width: 47.375em) {
	.wp-blog-with-sidebar > .wp-blog-filter-bar,
	.wp-blog-with-sidebar .wp-blog-filter-bar {
		display: block;
		margin: 0 0 1.25rem;
		max-width: none;
		padding: 0;
		width: 100%;
	}

	.wp-blog-filter-toggles {
		display: flex !important;
		flex-wrap: wrap;
		gap: 0.5rem;
		justify-content: center;
		margin: 0 0 0.625rem;
		padding: 0;
		width: 100%;
	}

	.wp-blog-filter-toggle .wp-block-button__link {
		align-items: center;
		background-color: transparent !important;
		border: 1.5px dashed var(--wp--preset--color--foreground, #1a1a1a) !important;
		border-radius: 32px !important;
		color: var(--wp--preset--color--foreground, #1a1a1a) !important;
		display: flex;
		font-size: 14px;
		font-weight: 500;
		line-height: 1.2;
		min-height: 40px;
		padding: 8px 18px;
		text-decoration: none;
		transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
	}

	.wp-blog-filter-toggle.is-active .wp-block-button__link,
	.wp-blog-filter-toggle .wp-block-button__link:hover,
	.wp-blog-filter-toggle .wp-block-button__link:focus {
		background-color: var(--wp--preset--color--tan-brown, #8b6914) !important;
		border-color: var(--wp--preset--color--tan-brown, #8b6914) !important;
		border-style: solid !important;
		color: var(--wp--preset--color--light, #fff) !important;
	}

	.wp-blog-filter-panels {
		margin: 0;
		padding: 0;
		width: 100%;
	}

	.wp-blog-filter-panel {
		background: var(--wp--preset--color--peach-puff, #f2e8e3);
		border-radius: 10px;
		box-shadow: none;
		display: none;
		margin: 0;
		padding: 1rem 1.125rem;
		width: 100%;
	}

	.wp-blog-filter-panel.is-open {
		display: block;
	}

	.wp-blog-filter-panel.wp-block-widget-area ul {
		list-style: none;
		margin: 0;
		padding: 0;
	}

	.wp-blog-filter-panel.wp-block-widget-area li {
		margin-bottom: 0;
		padding-left: 20px;
		position: relative;
	}

	.wp-blog-filter-panel.wp-block-widget-area li::before {
		background-color: var(--wp--preset--color--tan-brown, #8b6914);
		border-radius: 50%;
		content: "";
		height: 6px;
		left: 0;
		position: absolute;
		top: 0.72em;
		width: 6px;
	}

	.wp-blog-filter-panel.wp-block-widget-area li + li {
		margin-top: 0.65rem;
	}

	.wp-blog-filter-panel.wp-block-widget-area a {
		color: inherit;
		text-decoration: none;
	}

	.wp-blog-filter-panel .wp-block-tag-cloud {
		display: flex;
		flex-wrap: wrap;
		gap: 0.5rem;
	}

	.wp-blog-filter-panel .wp-block-tag-cloud a {
		margin-bottom: 0;
	}

	/* Sidebar: only Recent Post visible at bottom */
	.wp-blog-with-sidebar .wp-block-column-sidebar .wp-block-widget-search,
	.wp-blog-with-sidebar .wp-block-column-sidebar .wp-block-widget-categories,
	.wp-blog-with-sidebar .wp-block-column-sidebar .wp-block-widget-archives,
	.wp-blog-with-sidebar .wp-block-column-sidebar .wp-block-widget-tags {
		display: none;
	}

	.wp-blog-with-sidebar .wp-block-column-sidebar .wp-block-sidebar {
		padding: 1.25rem;
	}

	.wp-blog-with-sidebar .wp-block-column-sidebar .wp-block-widget-recent-post {
		display: block;
	}

	.wp-blog-with-sidebar.wp-block-sidebar-on-left .wp-block-column.wp-block-column-sidebar {
		order: 2;
	}

	.wp-blog-with-sidebar.wp-block-sidebar-on-left > .wp-block-column:not(.wp-block-column-sidebar) {
		order: 1;
	}
}

/* Blog post cards: rounded corners below desktop breakpoint */
@media screen and (max-width: 63.9375em) {
	.wp-block-post-template > li .wp-block-post-wrapper {
		border-radius: 10px;
		overflow: hidden;
	}

	.wp-block-post-template > li:not(.has-post-thumbnail) .wp-block-post-container {
		border-radius: 10px;
	}

	.wp-block-post-template > li.has-post-thumbnail .wp-block-post-container {
		border-radius: 0 0 10px 10px;
	}

	.wp-block-post-template > li.has-post-thumbnail .wp-block-post-featured-image {
		border-radius: 10px 10px 0 0;
		overflow: hidden;
	}
}
