/* ==========================================================================
   Bentlaire — Modernized Easy Property Listings search bar
   Scoped to .epl-search-container-modern so nothing else on the site is
   affected. Tokens follow the site's active design direction (Bentlaire
   Real Estate: navy #294356 / yellow #FFE91E accent / blue #2EA3F2 focus).
   ========================================================================== */

.epl-search-container-modern {
	--epl-bg: #FFFFFF;
	--epl-surface: #F6F6F6;
	--epl-ink: #333333;
	--epl-navy: #294356;
	--epl-accent: #FFE91E;
	--epl-focus: #2EA3F2;
	--epl-border: #E1E5E9;
	--epl-radius-sm: 6px;
	--epl-radius-md: 10px;
	--epl-radius-pill: 999px;
	--epl-font-heading: 'Aboreto', serif;
	--epl-font-body: 'Work Sans', sans-serif;

	max-width: 1100px;
	margin-left: auto;
	margin-right: auto;
	font-family: var(--epl-font-body);
	box-sizing: border-box;
}

.epl-search-container-modern *,
.epl-search-container-modern *::before,
.epl-search-container-modern *::after {
	box-sizing: border-box;
}

.epl-search-container-modern .epl-search-forms-wrapper {
	background: var(--epl-bg);
	border: 1px solid var(--epl-border);
	border-radius: var(--epl-radius-md);
	box-shadow: 0 10px 30px -12px rgba(41, 67, 86, 0.18);
	padding: 20px 24px 22px;
	overflow: visible;
}

.epl-search-container-modern .epl-search-form {
	overflow: visible;
	background: transparent;
}

.epl-search-container-modern .epl-search-modern-form {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

/* ---- Row layout ---- */
.epl-search-row-primary,
.epl-search-row-filters {
	display: grid;
	gap: 14px;
	align-items: end;
}

.epl-search-row-primary {
	grid-template-columns: 2fr 1fr;
}

.epl-search-row-filters {
	grid-template-columns: repeat(5, 1fr);
}

.epl-search-row-footer {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
}

/* ---- Field shell (applies to every EPL-rendered field) ---- */
.epl-search-container-modern .epl-search-row {
	margin: 0 !important;
	width: auto !important;
	float: none !important;
	display: block;
}

.epl-search-container-modern .epl-search-label {
	display: block !important;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--epl-navy);
	margin: 0 0 6px !important;
	opacity: 0.85;
}

.epl-search-container-modern .epl-search-row .field {
	display: flex;
	align-items: center;
	gap: 8px;
	background: var(--epl-surface);
	border: 1px solid var(--epl-border);
	border-radius: var(--epl-radius-sm);
	padding: 0 10px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.epl-search-container-modern .epl-search-row .field:focus-within {
	border-color: var(--epl-focus);
	background: var(--epl-bg);
	box-shadow: 0 0 0 3px rgba(46, 163, 242, 0.15);
}

/* ---- Inputs / selects ---- */
.epl-search-container-modern .in-field {
	all: unset;
	box-sizing: border-box;
	width: 100% !important;
	min-height: 44px;
	display: flex;
	align-items: center;
	font-family: var(--epl-font-body);
	font-size: 0.92rem;
	color: var(--epl-ink);
	text-transform: none;
	cursor: pointer;
}

.epl-search-container-modern input.in-field {
	cursor: text;
}

.epl-search-container-modern select.in-field {
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23294356' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8l5 5 5-5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 2px center;
	background-size: 16px;
	padding-right: 22px;
}

.epl-search-container-modern .in-field::placeholder {
	color: #8a93a0;
}

/* ---- Icons (Beds / Baths / Garage) ---- */
.epl-search-container-modern .epl-icon {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
	display: inline-block;
}

.epl-search-container-modern .epl-icon-bed {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='none' stroke='%23294356' stroke-width='2' stroke-miterlimit='10'%3E%3Cpath d='M28,16V9c0-1.1-0.9-2-2-2H6C4.9,7,4,7.9,4,9v7'/%3E%3Cpath d='M8,16v-2c0-1.1,0.9-2,2-2h4c1.1,0,2,0.9,2,2v2'/%3E%3Cpath d='M16,16v-2c0-1.1,0.9-2,2-2h4c1.1,0,2,0.9,2,2v2'/%3E%3Cpath d='M3,18v8h3v-2h20v2h3v-8c0-1.1-0.9-2-2-2H5C3.9,16,3,16.9,3,18z'/%3E%3C/svg%3E");
}

.epl-search-container-modern .epl-icon-bath {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23294356' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h16v3a4 4 0 0 1-4 4H8a4 4 0 0 1-4-4z'/%3E%3Cpath d='M4 12V7a2 2 0 0 1 2-2c.9 0 1.7.5 2 1.3'/%3E%3Cpath d='M8 19v2'/%3E%3Cpath d='M16 19v2'/%3E%3Cpath d='M4 12H2'/%3E%3C/svg%3E");
}

.epl-search-container-modern .epl-icon-car {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23294356' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 11l1.5-4.5A2 2 0 0 1 8.4 5h7.2a2 2 0 0 1 1.9 1.5L19 11'/%3E%3Crect x='3' y='11' width='18' height='6' rx='2'/%3E%3Ccircle cx='7.5' cy='17' r='1.5'/%3E%3Ccircle cx='16.5' cy='17' r='1.5'/%3E%3C/svg%3E");
}

/* ---- Checkbox group (Air Con / Pool / Security) ---- */
.epl-search-container-modern .epl-search-other {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 !important;
	width: auto !important;
	float: none !important;
}

.epl-search-container-modern .epl-search-row-checkbox {
	display: inline-flex !important;
	align-items: center;
	gap: 6px;
	width: auto !important;
	background: var(--epl-surface);
	border: 1px solid var(--epl-border);
	border-radius: var(--epl-radius-pill);
	padding: 8px 14px !important;
	margin: 0 !important;
}

.epl-search-container-modern .epl-search-row-checkbox .check-label {
	font-size: 0.82rem;
	color: var(--epl-ink);
	cursor: pointer;
}

.epl-search-container-modern .epl-search-row-checkbox input[type='checkbox'] {
	width: 15px !important;
	height: 15px;
	accent-color: var(--epl-navy);
	cursor: pointer;
}

/* ---- Submit ---- */
.epl-search-container-modern .epl-search-submit-row {
	margin: 0 0 0 auto !important;
	float: none !important;
	width: auto !important;
	display: flex;
	align-items: stretch;
}

.epl-search-btn-modern {
	appearance: none;
	border: none;
	cursor: pointer;
	background: #160D47;
	color: #FFFFFF;
	font-family: var(--epl-font-heading);
	font-weight: 400;
	font-size: 0.95rem;
	letter-spacing: 0.02em;
	border-radius: var(--epl-radius-pill);
	padding: 0 28px;
	min-height: 44px;
	min-width: 120px;
	white-space: nowrap;
	transition: background 0.15s ease, transform 0.05s ease;
}

.epl-search-btn-modern:hover {
	background: #0F0932;
}

.epl-search-btn-modern:active {
	transform: translateY(1px);
}

.epl-search-btn-modern:focus-visible {
	outline: 3px solid var(--epl-accent);
	outline-offset: 2px;
}

/* ---- Tabs (only present when a search instance covers multiple post types) ---- */
.epl-search-container-modern .epl-search-tabs {
	display: flex;
	gap: 4px;
	list-style: none;
	margin: 0 0 -1px;
	padding: 0;
}

.epl-search-container-modern .epl-search-tabs .tab-link {
	padding: 10px 18px;
	background: var(--epl-surface);
	border: 1px solid var(--epl-border);
	border-bottom: none;
	border-radius: var(--epl-radius-sm) var(--epl-radius-sm) 0 0;
	font-family: var(--epl-font-heading);
	font-size: 0.85rem;
	color: var(--epl-navy);
	cursor: pointer;
}

.epl-search-container-modern .epl-search-tabs .tab-link.epl-sb-current {
	background: var(--epl-bg);
	font-weight: 600;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
	.epl-search-row-primary {
		grid-template-columns: 1fr;
	}
	.epl-search-row-filters {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 640px) {
	.epl-search-container-modern .epl-search-forms-wrapper {
		padding: 16px;
	}
	.epl-search-row-filters {
		grid-template-columns: repeat(2, 1fr);
	}
	.epl-search-row-footer {
		flex-direction: column;
		align-items: stretch;
	}
	.epl-search-submit-row {
		margin: 4px 0 0 !important;
		width: 100%;
	}
	.epl-search-btn-modern {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.epl-search-btn-modern {
		transition: none;
	}
}
