/* ===== Universal site search overlay (Hastings) =====
   Full-screen dialog opened from #nav_search_open or the mobile-menu search
   button. Shares the site palette (--main-color / --secondary-color /
   --dark-color / --reg / --title) and the hamburger overlay's animation feel. */

.ss-overlay {
	position: fixed;
	inset: 0;
	z-index: 9999999;
	display: flex;
	justify-content: center;
	align-items: flex-start;
	padding: 6vh 20px 20px;
	box-sizing: border-box;
	background: rgba(21, 48, 72, 0.72);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.3s ease, visibility 0s linear 0.35s;
}
.ss-overlay.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transition: opacity 0.3s ease;
}
.ss-overlay.is-closing {
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.35s ease;
}

.ss-panel {
	position: relative;
	width: 100%;
	max-width: 900px;
	max-height: 88vh;
	background: #ffffff;
	border-radius: 6px;
	box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transform: translateY(-24px) scale(0.98);
	opacity: 0;
	transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.3s ease;
}
.ss-overlay.is-open .ss-panel {
	transform: translateY(0) scale(1);
	opacity: 1;
}

/* ---- Search bar ---- */
.ss-form {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 20px;
	background: #ffffff;
	border-bottom: 1px solid #ececec;
	flex: 0 0 auto;
}
.ss-form-icon {
	font-size: 20px;
	color: var(--main-color);
	flex: 0 0 auto;
}
.ss-input {
	flex: 1 1 auto;
	min-width: 0;
	border: 0;
	outline: 0;
	background: transparent;
	font-family: var(--reg);
	font-size: 20px;
	line-height: 1.4;
	color: #222222;
	padding: 6px 0;
}
.ss-input::placeholder {
	color: #9aa2ad;
}
.ss-input::-webkit-search-cancel-button {
	-webkit-appearance: none;
	appearance: none;
}
.ss-clear,
.ss-close {
	flex: 0 0 auto;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background: #f1f2f4;
	color: #555555;
	font-size: 15px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.ss-clear:hover,
.ss-close:hover {
	background: var(--main-color);
	color: #ffffff;
}
.ss-close:hover {
	transform: rotate(90deg);
}
.ss-clear[hidden] {
	display: none;
}
.ss-hint {
	flex: 0 0 auto;
	font-family: var(--reg);
	font-size: 11px;
	letter-spacing: 0.5px;
	color: #98a0aa;
	border: 1px solid #e1e4e8;
	border-radius: 4px;
	padding: 3px 6px;
	white-space: nowrap;
}

/* ---- Results region ---- */
.ss-body {
	flex: 1 1 auto;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	background: #ffffff;
}
.ss-status {
	padding: 0 22px;
	font-family: var(--reg);
	font-size: 13px;
	color: #8a929c;
	min-height: 0;
}
.ss-status:not(:empty) {
	padding: 12px 22px 2px;
}

.ss-group {
	padding: 2px 0 6px;
}
.ss-group + .ss-group {
	border-top: 1px solid #f2f3f5;
}
.ss-group-title {
	margin: 0;
	padding: 16px 22px 8px;
	font-family: var(--title);
	font-weight: 600;
	font-size: 19px;
	line-height: 1.2;
	color: var(--dark-color);
	display: flex;
	align-items: baseline;
	gap: 8px;
}
.ss-count {
	font-family: var(--reg);
	font-size: 12px;
	font-weight: 600;
	color: var(--main-color);
	background: rgba(48, 62, 90, 0.07);
	border-radius: 20px;
	padding: 2px 8px;
	line-height: 1.4;
}

.ss-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.ss-item {
	position: relative;
}
.ss-item-link {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0 10px;
	padding: 10px 12px;
	border-left: 3px solid transparent;
	border-radius: 4px;
	color: inherit;
	text-decoration: none;
	transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.ss-item-link:hover,
.ss-item-link:focus,
.ss-item.is-active .ss-item-link {
	background: #f6f5f9;
	border-left-color: var(--main-color);
	transform: translateX(2px);
	outline: none;
}

.ss-thumb {
	flex: 0 0 58px;
	width: 58px;
	height: 58px;
	border-radius: 4px;
	overflow: hidden;
	background: #eef0f2;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--main-color);
	font-size: 20px;
}
.ss-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ss-text {
	flex: 1 1 auto;
	min-width: 0;
}
.ss-title {
	display: block;
	font-family: var(--reg);
	font-weight: 700;
	font-size: 16px;
	line-height: 1.32;
	color: var(--dark-color);
}
.ss-sub {
	display: block;
	font-family: var(--reg);
	font-size: 12.5px;
	font-weight: 600;
	color: var(--main-color);
	margin-top: 2px;
}
.ss-snippet {
	display: block;
	font-family: var(--reg);
	font-size: 13px;
	line-height: 1.5;
	color: #5b6470;
	margin-top: 3px;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

mark.ss-hl {
	background: rgba(171, 127, 175, 0.28);
	color: inherit;
	padding: 0 1px;
	border-radius: 2px;
	font-weight: 700;
}

/* ---- "search all properties" action ---- */
.ss-suggestion {
	padding: 14px 22px 18px;
	border-top: 1px solid #f2f3f5;
}
.ss-suggestion a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: var(--reg);
	font-size: 14px;
	font-weight: 700;
	color: #ffffff;
	background: var(--main-color);
	border-radius: 50px;
	padding: 11px 22px;
	text-decoration: none;
	transition: transform 0.15s ease, opacity 0.15s ease;
}
.ss-suggestion a:hover {
	transform: translateY(-1px);
	opacity: 0.92;
}

/* ---- Idle / empty states ---- */
.ss-default {
	padding: 16px 22px 22px;
	border-top: 1px solid #f2f3f5;
	display: none;
}
.ss-overlay.is-idle .ss-default {
	display: block;
}
.ss-default-label {
	display: block;
	font-family: var(--reg);
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.6px;
	color: #98a0aa;
	margin-bottom: 10px;
}
.ss-quicklinks {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.ss-quicklinks a {
	font-family: var(--reg);
	font-size: 14px;
	font-weight: 600;
	color: var(--dark-color);
	background: #f4f5f7;
	border: 1px solid #e6e8ec;
	border-radius: 40px;
	padding: 8px 16px;
	text-decoration: none;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.ss-quicklinks a:hover {
	background: var(--main-color);
	border-color: var(--main-color);
	color: #ffffff;
}

.ss-empty {
	display: none;
	padding: 34px 24px 40px;
	text-align: center;
	font-family: var(--reg);
	color: #66707b;
	font-size: 15px;
	line-height: 1.6;
}
.ss-overlay.is-empty .ss-empty {
	display: block;
}
.ss-empty strong {
	color: var(--dark-color);
}

/* ---- Responsive ---- */
@media (max-width: 700px) {
	.ss-overlay {
		padding: 0;
	}
	.ss-panel {
		max-width: 100%;
		height: 100%;
		max-height: 100%;
		border-radius: 0;
		transform: translateY(18px);
	}
	.ss-form {
		padding: 12px 14px;
		gap: 8px;
	}
	.ss-input {
		font-size: 18px;
	}
	.ss-hint {
		display: none;
	}
	.ss-group-title {
		padding: 14px 16px 6px;
		font-size: 17px;
	}
	.ss-item-link {
		margin: 0 8px;
		gap: 12px;
	}
	.ss-suggestion,
	.ss-default,
	.ss-empty {
		padding-left: 16px;
		padding-right: 16px;
	}
}
@media (max-width: 480px) {
	.ss-thumb {
		display: none;
	}
	.ss-title {
		font-size: 15px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ss-overlay,
	.ss-panel,
	.ss-item-link,
	.ss-close,
	.ss-suggestion a {
		transition: none !important;
		animation: none !important;
	}
}
