﻿.wpf-searchbox {
	position: relative;
	display: inline-flex;
	align-items: center;
	width: 40px;
	transition: width 0.3s ease;
	overflow: hidden;
	border: 1px solid #ccc;
	border-radius: 20px;
	background: #fff;
	cursor: pointer;
}

	.wpf-searchbox:hover,
	.wpf-searchbox:focus-within {
		width: 300px;
	}

/* Give input left padding to leave space for icon */
.wpf-search-input {
	flex: 1;
	border: none;
	outline: none;
	padding: 0.4rem 0.5rem 0.4rem 2rem; /* <-- 2rem left padding for icon space */
	font-size: 0.9rem;
	font-family: Jost;
	min-width: 0;
}

/* Absolutely position the icon so it never moves */
.wpf-search-button {
	position: absolute;
	left: 8px; /* shift further left visually */
	top: 50%;
	transform: translateY(-50%);
	border: none;
	background: none;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

	.wpf-search-button img {
		width: 20px;
		height: 20px;
		transition: filter 0.2s ease, opacity 0.2s ease;
	}

.wpf-searchbox:hover .wpf-search-button img,
.wpf-searchbox:focus-within .wpf-search-button img {
	filter: brightness(0.5);
}

/* === Base searchbox styles (used in header) stay as they are === */

/* === Expanded search box (for search results page) === */
.wpf-searchbox.wpf-searchbox--expanded {
	width: 100%; /* take full container width */
	max-width: 600px; /* optional cap so it doesn’t get huge on wide screens */
	border: 1px solid #ccc;
	border-radius: 20px;
	background: #fff;
	overflow: hidden;
	display: inline-flex;
	align-items: center;
	padding-right: 0.3rem;
	/* Remove animation */
	transition: none;
	cursor: text; /* not clickable background */
}

	.wpf-searchbox.wpf-searchbox--expanded:hover,
	.wpf-searchbox.wpf-searchbox--expanded:focus-within {
		width: 100%; /* ✅ prevent accidental shrink/expand */
	}

	.wpf-searchbox.wpf-searchbox--expanded .wpf-search-input {
		flex: 1;
		border: none;
		outline: none;
		padding: 0.4rem 0.5rem 0.4rem 2rem;
		font-size: 1rem;
		font-family: Jost, sans-serif;
		min-width: 0;
	}

	.wpf-searchbox.wpf-searchbox--expanded .wpf-search-button {
		position: absolute;
		left: 8px;
		top: 50%;
		transform: translateY(-50%);
		border: none;
		background: none;
		padding: 0;
		display: flex;
		align-items: center;
		justify-content: center;
		cursor: pointer;
	}

		.wpf-searchbox.wpf-searchbox--expanded .wpf-search-button img {
			width: 20px;
			height: 20px;
			transition: filter 0.2s ease;
		}

	.wpf-searchbox.wpf-searchbox--expanded:hover .wpf-search-button img,
	.wpf-searchbox.wpf-searchbox--expanded:focus-within .wpf-search-button img {
		filter: brightness(0.5);
	}


.wpf-search-results {
	margin: 0 auto;
	margin-top:20px;
}

.wpf-search-title {
	font-size: 1.5rem;
	margin-bottom: 1rem;
	text-align: left;
}

.wpf-search-inline {
	display: flex;
	margin-bottom: 2rem;
}

.wpf-search-inline-input {
	flex: 1;
	padding: 0.5rem;
	font-size: 1rem;
}

.wpf-search-inline-button {
	background: none;
	border: none;
	padding: 0.5rem;
	cursor: pointer;
}

.wpf-search-section h3 {
	margin-top: 2rem;
	margin-bottom: 0.5rem;
	font-size: 1.25rem;
	padding-bottom: 0.25rem;
}

.wpf-search-result {
	padding: 0.75rem 0;
	border-bottom: 1px solid #eee;
}

.wpf-search-link {
	font-weight: 400;
	font-size: 1.1rem;
	color: #0066cc;
	text-decoration: underline;
}

	.wpf-search-link:hover {
		text-decoration: underline;
	}

.wpf-search-snippet {
	margin: 0.25rem 0 0;
	color: #555;
	font-size: 0.9rem;
}

.wpf-search-description {
	margin: 0.25rem 0 0 0;
	font-size: 0.9rem;
	color: #555;
	line-height: 1.4;
}

	.wpf-search-description strong {
		font-weight: 600;
		color: #000;
	}

