body.asa-explore-search {
	--asa-search-accent: #7044e8;
	--asa-search-ink: #26164e;
	--asa-search-muted: #686375;
	--asa-search-line: #e9e4f1;
	--asa-search-ground: #fbfaff;
	--asa-search-surface: #fff;
	background: var(--asa-search-ground);
}

body.asa-explore-search #c27-explore-listings {
	width: min(100% - 40px, 1420px);
	margin-inline: auto;
	padding-block: 14px 34px;
	direction: rtl;
}

body.asa-explore-search #c27-explore-listings .asa-explore-intro {
	max-width: none;
	margin: 0 0 18px;
	padding: 20px 24px;
	border: 1px solid var(--asa-search-line);
	border-inline-start: 4px solid var(--asa-search-accent);
	border-radius: 16px;
	background: var(--asa-search-surface);
	box-shadow: 0 8px 24px rgb(38 22 78 / 4%);
}

body.asa-explore-search .asa-explore-intro h1 {
	margin: 0 0 6px;
	color: var(--asa-search-ink);
	font-size: clamp(22px, 2vw, 30px);
	font-weight: 800;
	line-height: 1.5;
}

body.asa-explore-search .asa-explore-intro p {
	max-width: 78ch;
	margin: 0;
	color: var(--asa-search-muted);
	font-size: 15px;
	line-height: 1.9;
}

body.asa-explore-search #c27-explore-listings .explore-types {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 16px;
	padding: 7px;
	border: 1px solid var(--asa-search-line);
	border-radius: 14px;
	background: var(--asa-search-surface);
}

body.asa-explore-search #c27-explore-listings .explore-types .item a {
	min-height: 44px;
	border-radius: 10px;
	color: var(--asa-search-muted);
	font-weight: 700;
	transition: background-color 140ms ease, color 140ms ease;
}

body.asa-explore-search #c27-explore-listings .explore-types .item.active a {
	background: #f0eaff;
	color: var(--asa-search-ink);
}

body.asa-explore-search #finderSearch {
	border-inline-end: 1px solid var(--asa-search-line);
	background: var(--asa-search-surface);
}

body.asa-explore-search #finderSearch .finder-tabs-wrapper {
	padding: 12px 14px 0;
}

body.asa-explore-search #finderSearch .sidebar-tabs {
	width: fit-content;
	max-width: 100%;
	margin: 0;
	padding: 4px;
	border: 1px solid var(--asa-search-line);
	border-radius: 12px;
	background: #f8f6fc;
}

body.asa-explore-search #finderSearch .sidebar-tabs li a {
	min-height: 40px;
	padding: 9px 14px;
	border-radius: 9px;
	color: var(--asa-search-muted);
	font-size: 14px;
	font-weight: 700;
}

body.asa-explore-search #finderSearch .sidebar-tabs li.active a {
	background: var(--asa-search-surface);
	color: var(--asa-search-ink);
	box-shadow: 0 1px 3px rgb(38 22 78 / 10%);
}

body.asa-explore-search #finderSearch .search-filters .form-group {
	margin: 0 0 14px;
}

body.asa-explore-search #finderSearch .search-filters label,
body.asa-explore-search #finderSearch .search-filters .form-group > label {
	color: var(--asa-search-ink);
	font-size: 14px;
	font-weight: 700;
}

body.asa-explore-search #finderSearch input:not([type="checkbox"]):not([type="radio"]),
body.asa-explore-search #finderSearch .select2-selection {
	min-height: 46px;
	border-color: #dcd5e8;
	border-radius: 10px;
	background-color: #fff;
}

body.asa-explore-search #finderSearch input:focus,
body.asa-explore-search #finderSearch .select2-container--open .select2-selection {
	border-color: var(--asa-search-accent);
	box-shadow: 0 0 0 3px rgb(112 68 232 / 12%);
}

body.asa-explore-search #finderSearch .c27-explore-search-button {
	min-height: 48px;
	justify-content: center;
	border-radius: 10px;
	background: var(--asa-search-accent);
	color: #fff;
	font-weight: 800;
}

body.asa-explore-search #finderSearch .reset-results-27 {
	min-height: 42px;
	justify-content: center;
	border-radius: 10px;
	color: var(--asa-search-ink);
	font-weight: 700;
}

body.asa-explore-search #finderListings .fl-head {
	min-height: 56px;
	border-bottom: 1px solid var(--asa-search-line);
	background: transparent;
}

body.asa-explore-search #finderListings .fl-results-no {
	color: var(--asa-search-ink);
	font-size: 16px;
	font-weight: 700;
}

body.asa-explore-search #finderListings .lf-item-container {
	margin: 0 0 12px;
	border: 1px solid var(--asa-search-line);
	border-radius: 14px;
	background: var(--asa-search-surface);
	box-shadow: 0 3px 12px rgb(38 22 78 / 4%);
	transition: border-color 140ms ease, box-shadow 140ms ease;
}

@media (hover: hover) {
	body.asa-explore-search #finderListings .lf-item-container:hover {
		border-color: #cfc2ec;
		box-shadow: 0 8px 20px rgb(38 22 78 / 8%);
	}
}

body.asa-explore-search #finderMap .map {
	border: 1px solid var(--asa-search-line);
	border-radius: 14px;
	background: #f1eff4;
}

body.asa-explore-search #finderMap .leaflet-control-zoom a {
	color: var(--asa-search-ink);
}

/* Keep directory controls on the RTL edge and remove the oversized search prompt. */
body.asa-explore-search #c27-explore-listings .explore-types {
	direction: rtl;
	justify-content: flex-start;
	margin-inline: 0 0;
}

body.asa-explore-search #finderSearch .finder-tabs-wrapper {
	direction: rtl;
	text-align: right;
}

body.asa-explore-search #finderSearch .wp-search-filter > label {
	display: none !important;
}

body.asa-explore-search #finderSearch .wp-search-filter input {
	direction: rtl;
	text-align: right;
}

body.asa-explore-search .explore-head-search input::placeholder {
	color: transparent !important;
	opacity: 0 !important;
}

body.asa-explore-search .explore-mobile-nav .nav-tabs {
	direction: rtl;
	justify-content: flex-start;
}

body.asa-explore-search .asa-active-filter-count {
	display: inline-flex;
	min-width: 20px;
	height: 20px;
	align-items: center;
	justify-content: center;
	margin-inline-start: 7px;
	padding-inline: 5px;
	border-radius: 999px;
	background: #eee8ff;
	color: var(--asa-search-ink);
	font-size: 12px;
	font-weight: 800;
	line-height: 1;
}

body.asa-explore-search .asa-active-filter-count[hidden] {
	display: none;
}

@media (max-width: 767px) {
	body.asa-explore-search #c27-explore-listings {
		width: 100%;
		padding: 8px 12px 28px;
	}

	body.asa-explore-search #c27-explore-listings .asa-explore-intro {
		margin: 0 0 10px;
		padding: 14px 16px;
		border-radius: 13px;
	}

	body.asa-explore-search .asa-explore-intro h1 {
		font-size: 21px;
	}

	body.asa-explore-search .asa-explore-intro p {
		font-size: 13px;
		line-height: 1.8;
	}

	body.asa-explore-search #c27-explore-listings .explore-types {
		gap: 4px;
		margin: 0 -12px 10px;
		padding: 6px 10px;
		border-radius: 0;
		border-inline: 0;
		border-top: 0;
		background: var(--asa-search-surface);
		overflow-x: auto;
		overscroll-behavior-inline: contain;
		white-space: nowrap;
	}

	body.asa-explore-search #c27-explore-listings .explore-types .item {
		flex: 0 0 auto;
	}

	body.asa-explore-search #c27-explore-listings .explore-types {
		justify-content: flex-start;
		padding-inline: 8px;
	}

	body.asa-explore-search #finderSearch {
		max-height: min(64vh, 560px);
		overscroll-behavior: contain;
		border-inline-end: 0;
		border-radius: 0 0 14px 14px;
		box-shadow: 0 12px 30px rgb(38 22 78 / 12%);
	}

	body.asa-explore-search #finderSearch .finder-tabs-wrapper {
		padding: 10px 12px 0;
	}

	body.asa-explore-search #finderSearch .sidebar-tabs li a {
		min-height: 42px;
		padding: 9px 12px;
	}

	body.asa-explore-search #finderSearch .search-filters .form-group {
		margin-bottom: 12px;
	}

	body.asa-explore-search #finderMap {
		height: clamp(300px, 48vh, 420px);
		max-height: 420px;
	}

	body.asa-explore-search #finderMap .map {
		height: 100% !important;
		min-height: 300px;
		border-radius: 12px;
	}

	body.asa-explore-search .explore-mobile-nav .nav-tabs {
		display: flex;
		flex-direction: row;
		justify-content: flex-start;
	}

	body.asa-explore-search #finderListings .lf-item-container {
		margin-bottom: 10px;
		border-radius: 12px;
	}

	body.asa-explore-search .explore-mobile-nav {
		border: 1px solid var(--asa-search-line);
		border-radius: 12px 12px 0 0;
		background: #fff;
		box-shadow: 0 -4px 16px rgb(38 22 78 / 8%);
	}

	body.asa-explore-search .explore-mobile-nav .nav-tabs li a {
		min-height: 48px;
		color: var(--asa-search-muted);
		font-weight: 700;
	}

	body.asa-explore-search .explore-mobile-nav .nav-tabs li.active a {
		color: var(--asa-search-accent);
	}
}

@media (prefers-reduced-motion: reduce) {
	body.asa-explore-search #c27-explore-listings .explore-types .item a,
	body.asa-explore-search #finderListings .lf-item-container {
		transition: none;
	}
}

/* Desktop directory: reserve less width for filters and keep the map visible beside results. */
@media (min-width: 992px) {
	body.asa-explore-search #c27-explore-listings {
		--asa-search-filter-width: clamp(270px, 25vw, 330px);
		--asa-search-results-width: clamp(340px, 34vw, 450px);
		position: relative !important;
		height: auto !important;
		min-height: calc(100vh - 89px) !important;
		overflow: visible !important;
	}

	body.asa-explore-search #c27-explore-listings .fc-default {
		position: relative !important;
		height: clamp(520px, 70vh, 760px) !important;
		min-height: 520px;
		overflow: visible !important;
	}

	body.asa-explore-search #finderSearch {
		width: var(--asa-search-filter-width) !important;
		max-width: none !important;
		max-height: none !important;
		right: 0 !important;
		left: auto !important;
	}

	body.asa-explore-search #finderListings {
		width: var(--asa-search-results-width) !important;
		max-width: none !important;
		right: var(--asa-search-filter-width) !important;
		left: auto !important;
		overflow-y: auto !important;
	}

	body.asa-explore-search #finderMap {
		width: calc(100% - var(--asa-search-filter-width) - var(--asa-search-results-width)) !important;
		min-width: 0;
		max-width: none !important;
		right: auto !important;
		left: 0 !important;
	}

	body.asa-explore-search #c27-explore-listings .explore-types {
		position: relative;
		z-index: 5;
		width: calc(var(--asa-search-filter-width) + var(--asa-search-results-width) - 30px);
		margin-inline: 0 auto;
		background: var(--asa-search-surface);
	}
}

/* Keep the Explore tabs reachable on phones and leave room for the fixed tab bar. */
@media (max-width: 767px) {
	body.asa-explore-search {
		padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px));
	}

	body.asa-explore-search .explore-mobile-nav {
		position: fixed !important;
		z-index: 1000 !important;
		inset-inline: 12px;
		bottom: max(8px, env(safe-area-inset-bottom, 0px));
		display: block !important;
		width: auto;
		margin: 0 !important;
		padding: 5px;
		border: 1px solid var(--asa-search-line);
		border-radius: 14px;
		background: #fff;
		box-shadow: 0 8px 28px rgb(38 22 78 / 18%);
	}

	body.asa-explore-search .explore-mobile-nav .nav-tabs {
		display: flex;
		gap: 6px;
		margin: 0;
	}

	body.asa-explore-search .explore-mobile-nav .nav-tabs li,
	body.asa-explore-search .explore-mobile-nav .nav-tabs li.active {
		display: block !important;
		flex: 1 1 50%;
		margin: 0;
	}

	body.asa-explore-search .explore-mobile-nav .nav-tabs li a {
		min-height: 44px;
		margin: 0 !important;
		border-radius: 10px;
		box-shadow: none;
	}
}


/* Keep hidden Leaflet tile overflow from widening the mobile document; preserve the fixed off-canvas menu. */
@media (max-width: 767px) {
	html:has(body.asa-explore-search) {
		overflow-x: clip;
	}
}
