/*
 * Blog listing/search sidebar - flat style, mirroring the shop's
 * `.gcf-product-sidebar` (see gcf-core/assets/css/products.css) instead of the
 * parent theme's card-style `aside.widget`. Scoped to
 * `body.gcf-blog-sidebar-page` so it never hits the Programs sidebar, which
 * shares the `.sidebar-widget` wrapper.
 */

body.gcf-blog-sidebar-page .sidebar-widget {
	display: flex;
	flex-direction: column;
	gap: 28px;
}

body.gcf-blog-sidebar-page aside.widget {
	background: none;
	padding: 0;
	border-radius: 0;
	margin-bottom: 0;
}

body.gcf-blog-sidebar-page aside.widget .wp-block-heading {
	margin: 0 0 10px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #5c6270;
}

/*
 * Scoped to `.sidebar-widget` (not just `body.gcf-blog-sidebar-page`): the
 * Blog page's OWN header search pill (`.gcf-blog-search`, styled by
 * gcf-core/assets/css/posts.css) is an Elementor widget in the page's hero
 * section, not inside the sidebar — but it also carries `type="search"` and
 * sits under the same body class, so the unscoped selector previously
 * overrode that pill's `border: none; background: transparent;` with this
 * bordered/rounded/white-background look, making it read as two overlapping
 * fields.
 */
body.gcf-blog-sidebar-page .sidebar-widget input[type="search"] {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid #21293b1a;
	border-radius: 8px;
	background: #ffffff;
	font-size: 14px;
	color: #21293b;
	transition: border-color 180ms ease, box-shadow 180ms ease;
}

body.gcf-blog-sidebar-page .sidebar-widget input[type="search"]:focus {
	outline: none;
	border-color: #0093d0;
	box-shadow: 0 0 0 3px rgba(0, 147, 208, 0.18);
}

.gcf-blog-cats {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.gcf-blog-cats .chip {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 12px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 500;
	color: #21293b;
	text-decoration: none;
	cursor: pointer;
	transition: background 150ms ease, color 150ms ease;
}

.gcf-blog-cats .chip:hover {
	background: #f6f6f6;
}

.gcf-blog-cats .chip.is-active {
	background: #eaf6fc;
	color: #0093d0;
}

.gcf-blog-cats__count {
	font-size: 12px;
	color: #5c6270;
}

.gcf-blog-cats .chip.is-active .gcf-blog-cats__count {
	color: #0093d0;
}

.gcf-blog-count {
	margin: 10px 0 0;
	font-size: 13px;
	color: rgba(255, 255, 255, 0.85);
}

/* !important is the only thing that beats the parent's
   `aside.widget ul { padding-left: 20px !important; list-style: inherit !important }`. */
body.gcf-blog-sidebar-page .wp-block-latest-posts {
	margin: 0;
	list-style: none !important;
	padding: 0 !important;
}

body.gcf-blog-sidebar-page .wp-block-latest-posts a {
	font-size: 14px;
	color: #21293b;
	text-decoration: none;
	transition: color 150ms ease;
}

body.gcf-blog-sidebar-page .wp-block-latest-posts a:hover {
	color: #0093d0;
}

@media (max-width: 991px) {
	body.gcf-blog-sidebar-page .sidebar-widget {
		margin-top: 30px;
	}
}
