/**
 * Property Search - Search Box widget styles
 *
 * Self-contained port of the static site search box (the plugin does
 * not load Bootstrap, so the grid, form controls and select chevron
 * are recreated here). Colours are CSS custom properties written by
 * Elementor; values below are the design defaults / fallbacks.
 *
 * @package PropertySearch
 */

.ps-search-box-wrap {
	--ps-search-box-bg: #ffffff;
	--ps-search-box-border: rgba(0, 61, 43, 0.06);
	--ps-search-box-shadow: rgba(0, 61, 43, 0.12);
	--ps-search-tab-color: #50675e;
	--ps-search-tab-border: #dce8e2;
	--ps-search-tab-active-bg: #003d2b;
	--ps-search-tab-active-color: #ffffff;
	--ps-search-tab-hover-bg: #e8f5e9;
	--ps-search-label-color: #003d2b;
	--ps-search-input-bg: #ffffff;
	--ps-search-input-border: #e8ede9;
	--ps-search-input-text: #212529;
	--ps-search-placeholder: #6c757d;
	--ps-search-focus-border: #003d2b;
	--ps-search-focus-ring: rgba(0, 61, 43, 0.1);
	--ps-search-btn-bg: #003d2b;
	--ps-search-btn-hover-bg: #00291d;
	--ps-search-btn-color: #ffffff;
	--ps-search-btn-shadow: rgba(0, 61, 43, 0.2);

	position: relative;
	z-index: 20;
	width: 100%;
	/* Pulls the box over the hero slider, matching .search-box-wrap */
	margin-top: -55px;
	font-family: inherit;
	line-height: 1.5;
}

.ps-search-box-wrap,
.ps-search-box-wrap * {
	box-sizing: border-box;
}

/* Card --------------------------------------------------------------- */
.ps-search-box {
	background: var(--ps-search-box-bg);
	border: 1px solid var(--ps-search-box-border);
	border-radius: 20px;
	padding: 30px 35px;
	box-shadow: 0 15px 50px var(--ps-search-box-shadow);
}

/* Scroll reveal (mirrors .fade-up / .fade-up.show) ------------------- */
.ps-search-box.ps-reveal {
	opacity: 0;
	transform: translateY(40px);
	transition: opacity 0.7s ease, transform 0.7s ease;
}

.ps-search-box.ps-reveal.ps-show {
	opacity: 1;
	transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
	.ps-search-box.ps-reveal {
		opacity: 1;
		transform: none;
		transition: none;
	}

	.ps-search-tab,
	.ps-search-tab-indicator,
	.ps-search-tab-indicator::after {
		transition: none;
	}
}

/* Zone filters ------------------------------------------------------- */
.ps-search-zone-group {
	margin: 0 0 22px;
	padding: 16px 18px 18px;
	border: 1px solid #e4eee8;
	border-radius: 16px;
	background: #f7faf8;
}

.ps-search-zone-heading {
	display: flex;
	align-items: center;
	gap: 9px;
	margin: 0 0 13px;
	color: var(--ps-search-label-color);
	font-size: 0.9rem;
	font-weight: 700;
	line-height: 1.4;
}

.ps-search-zone-heading i {
	display: inline-flex;
	width: 24px;
	height: 24px;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: #e5f1e9;
	color: var(--ps-search-tab-active-bg);
	font-size: 0.76rem;
}

.ps-search-tabs {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	align-items: stretch;
	gap: 10px;
	margin: 0;
	padding: 0;
}

.ps-search-tab {
	position: relative;
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
	min-height: 50px;
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 9px 14px;
	border: 1px solid var(--ps-search-tab-border);
	border-radius: 12px;
	background: #ffffff;
	color: var(--ps-search-tab-color);
	font-family: inherit;
	font-size: 0.94rem;
	font-weight: 600;
	line-height: 1.35;
	text-align: left;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.ps-search-zone-input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.ps-search-tab-label {
	min-width: 0;
}

.ps-search-tab-indicator {
	position: relative;
	flex: 0 0 19px;
	width: 19px;
	height: 19px;
	border: 2px solid #71847b;
	border-radius: 50%;
	background: transparent;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ps-search-tab-indicator::after {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--ps-search-tab-active-color);
	content: '';
	transform: translate(-50%, -50%) scale(0);
	transition: transform 0.2s ease;
}

.ps-search-tab.active {
	border-color: var(--ps-search-tab-active-bg);
	background: var(--ps-search-tab-active-bg);
	color: var(--ps-search-tab-active-color);
	box-shadow: 0 4px 12px rgba(0, 61, 43, 0.14);
	font-weight: 700;
}

.ps-search-tab.active .ps-search-tab-indicator {
	border-color: var(--ps-search-tab-active-color);
}

.ps-search-tab.active .ps-search-tab-indicator::after {
	transform: translate(-50%, -50%) scale(1);
}

.ps-search-tab:hover:not(.active) {
	border-color: #c7d8cf;
	background: var(--ps-search-tab-hover-bg);
	transform: translateY(-1px);
}

.ps-search-tab:focus-within {
	outline: 3px solid var(--ps-search-focus-ring);
	outline-offset: 2px;
}

/* Field grid (Bootstrap row g-3 with col-lg-* widths) ---------------- */
.ps-search-grid {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: 16px;
	align-items: end;
}

.ps-search-field {
	min-width: 0;
}

.ps-search-col-district {
	grid-column: span 3;
}

.ps-search-col-taluka {
	grid-column: span 2;
}

.ps-search-col-village {
	grid-column: span 3;
}

.ps-search-col-budget {
	grid-column: span 2;
}

.ps-search-col-button {
	grid-column: span 2;
}

/* Labels ------------------------------------------------------------- */
.ps-search-label {
	display: block;
	font-weight: 600;
	font-size: 0.82rem;
	color: var(--ps-search-label-color);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 6px;
}

/* Inputs and selects ------------------------------------------------- */
.ps-search-control {
	width: 100%;
	background: var(--ps-search-input-bg);
	border: 2px solid var(--ps-search-input-border);
	border-radius: 12px;
	padding: 12px 16px;
	font-size: 0.95rem;
	font-family: inherit;
	line-height: 1.5;
	color: var(--ps-search-input-text);
	transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.ps-search-control::placeholder {
	color: var(--ps-search-placeholder);
	opacity: 1;
}

.ps-search-control:focus {
	border-color: var(--ps-search-focus-border);
	box-shadow: 0 0 0 3px var(--ps-search-focus-ring);
	outline: none;
}

/* Native select restyle with the Bootstrap chevron */
.ps-search-select {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	padding-right: 42px;
	background-color: var(--ps-search-input-bg);
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
	background-repeat: no-repeat;
	background-position: right 0.75rem center;
	background-size: 16px 12px;
	cursor: pointer;
}

.ps-search-select option {
	color: #212529;
}

/* Submit button ------------------------------------------------------ */
.ps-search-btn {
	width: 100%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: var(--ps-search-btn-bg);
	color: var(--ps-search-btn-color);
	border: none;
	border-radius: 12px;
	padding: 12px 30px;
	font-weight: 700;
	font-size: 1rem;
	font-family: inherit;
	line-height: 1.5;
	min-height: 48px;
	cursor: pointer;
	transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.ps-search-btn i,
.ps-search-btn svg {
	width: 1em;
	height: 1em;
}

.ps-search-btn:hover {
	background: var(--ps-search-btn-hover-bg);
	color: var(--ps-search-btn-color);
	transform: translateY(-2px);
	box-shadow: 0 8px 20px var(--ps-search-btn-shadow);
}

.ps-search-btn:focus-visible {
	outline: 2px solid var(--ps-search-btn-bg);
	outline-offset: 2px;
}

/* ------------------------------------------------------------------ */
/* Responsive (Bootstrap lg / md breakpoints)                          */
/* ------------------------------------------------------------------ */
@media (max-width: 991px) {
	.ps-search-tabs {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	/* col-md-6 fields, col-md-12 button */
	.ps-search-col-district,
	.ps-search-col-taluka,
	.ps-search-col-village,
	.ps-search-col-budget {
		grid-column: span 6;
	}

	.ps-search-col-button {
		grid-column: span 12;
	}
}

@media (max-width: 767px) {
	.ps-search-box {
		padding: 22px 18px;
	}

	.ps-search-zone-group {
		margin-bottom: 18px;
		padding: 14px 12px;
	}

	.ps-search-zone-heading {
		margin-bottom: 10px;
	}

	.ps-search-tabs {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
	}

	.ps-search-tab {
		min-height: 48px;
		gap: 8px;
		padding: 8px 10px;
		font-size: 0.87rem;
	}

	.ps-search-grid {
		grid-template-columns: 1fr;
	}

	.ps-search-col-district,
	.ps-search-col-taluka,
	.ps-search-col-village,
	.ps-search-col-budget,
	.ps-search-col-button {
		grid-column: span 1;
	}
}
