/*
 * PropertyHive search archive integration.
 * The plugin owns queries and form values; the theme owns presentation only.
 */

.swre-property-archive.site-main {
	background: var(--swre-property-canvas);
	margin: 0;
	max-width: none;
	padding: 0 0 clamp(4rem, 8vw, 7rem);
}

.swre-property-archive__hero {
	margin-inline: auto;
	max-width: 1280px;
	padding: clamp(3rem, 7vw, 6rem) clamp(1rem, 4vw, 2.5rem) clamp(2rem, 4vw, 3.5rem);
}

.swre-property-archive__hero h1 {
	color: var(--swre-property-ink);
	font-family: var(--swrep-heading-font, Arial, Helvetica, sans-serif);
	font-size: clamp(2.5rem, 6vw, 5.25rem);
	line-height: 1.02;
	margin: 0;
}

.swre-property-archive__hero > p:last-child {
	color: var(--swre-property-muted);
	font-size: clamp(1rem, 1.6vw, 1.15rem);
	line-height: 1.6;
	margin: 1rem 0 0;
}

.swre-property-archive__layout {
	align-items: start;
}

.swre-property-archive__toolbar {
	align-items: flex-end;
	border-bottom: 1px solid var(--swre-property-line);
	display: flex;
	gap: 1.5rem;
	justify-content: space-between;
	margin-bottom: 1rem;
	padding-bottom: 1rem;
}

.swre-property-archive__count .propertyhive-result-count {
	color: var(--swre-property-ink);
	font-family: var(--swrep-heading-font, Arial, Helvetica, sans-serif);
	font-size: clamp(1.45rem, 2.8vw, 2.25rem);
	font-weight: 800;
	line-height: 1.2;
	margin: 0;
}

.swre-property-archive__ordering {
	align-items: center;
	display: flex;
	font-size: 0.8125rem;
	font-weight: 800;
	gap: 0.625rem;
}

.swre-property-archive__ordering .propertyhive-ordering {
	float: none;
	margin: 0;
}

.swre-property-archive__ordering .orderby {
	appearance: none;
	background: var(--swre-property-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23111111' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 0.9rem center / 0.875rem;
	border: 1px solid var(--swre-property-line);
	border-radius: 0;
	color: var(--swre-property-ink);
	min-height: 46px;
	padding: 0.65rem 2.6rem 0.65rem 0.875rem;
}

.swre-property-archive__chips {
	margin-bottom: 1rem;
}

.swre-property-archive .swre-property-results {
	clear: both;
}

/* PropertyHive's generated form keeps its indexed fields and dynamic options. */
.swre-property-archive-filters form.property-search-form,
body.propertyhive .swre-property-archive-filters form.property-search-form {
	display: grid !important;
	float: none;
	gap: 0.9rem;
	margin: 0;
	max-width: none;
	width: 100%;
}

.swre-property-archive-filters form.property-search-form > .control,
body.propertyhive .swre-property-archive-filters form.property-search-form > .control {
	display: grid !important;
	float: none;
	gap: 0.4rem;
	height: auto;
	min-width: 0;
	padding: 0;
	width: 100%;
}

.swre-property-archive-filters form.property-search-form > .control[style*="display: none"],
body.propertyhive .swre-property-archive-filters form.property-search-form > .control[style*="display: none"] {
	display: none !important;
}

.swre-property-archive-filters form.property-search-form .control > label:not(:has(input[type="radio"])) {
	color: var(--swre-property-ink);
	font-size: 0.75rem;
	font-weight: 850;
	line-height: 1.4;
	margin: 0;
}

.swre-property-archive-filters form.property-search-form select {
	appearance: none;
	background: var(--swre-property-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23111111' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 0.8rem center / 0.875rem;
	border: 1px solid var(--swre-property-line);
	border-radius: 0;
	color: var(--swre-property-ink);
	float: none;
	font: inherit;
	font-size: 0.8125rem;
	min-height: 46px;
	padding: 0.65rem 2.25rem 0.65rem 0.75rem;
	width: 100%;
}

.swre-property-archive-filters form.property-search-form .control-department {
	display: grid !important;
	gap: 0 !important;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.swre-property-archive-filters .control-department label {
	position: relative;
}

.swre-property-archive-filters .control-department input {
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	height: 1px;
	overflow: hidden;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

.swre-property-archive-filters .control-department label {
	align-items: center;
	background: var(--swre-property-surface);
	border: 1px solid var(--swre-property-line);
	color: var(--swre-property-muted);
	cursor: pointer;
	display: flex;
	font-size: 0.68rem;
	font-weight: 850;
	justify-content: center;
	line-height: 1.2;
	min-height: 46px;
	padding: 0.5rem 0.35rem;
	text-align: center;
}

.swre-property-archive-filters .control-department label + label {
	border-left: 0;
}

.swre-property-archive-filters .control-department label:has(input:checked) {
	background: var(--swre-property-gold);
	border-color: var(--swre-property-gold);
	color: var(--swre-property-ink);
}

.swre-property-archive-filters .control-department label:has(input:focus-visible) {
	outline: 3px solid var(--swrep-orange, #ee1c00);
	outline-offset: 3px;
	position: relative;
	z-index: 1;
}

.swre-property-archive-filters form.property-search-form > input[type="submit"] {
	background: var(--swre-property-gold);
	border: 1px solid var(--swre-property-gold);
	border-radius: 0;
	color: var(--swre-property-ink);
	cursor: pointer;
	font: inherit;
	font-size: 0.875rem;
	font-weight: 850;
	min-height: 48px;
	padding: 0.75rem 1rem;
	width: 100%;
}

.swre-property-archive-filters form.property-search-form > input[type="submit"]:hover {
	background: var(--swre-property-ink);
	border-color: var(--swre-property-ink);
	color: var(--swre-property-surface);
}

.swre-property-archive .propertyhive-pagination {
	float: none;
	margin-top: 2rem;
	text-align: left;
	width: 100%;
}

.swre-property-archive .propertyhive-pagination ul.page-numbers {
	display: flex;
	gap: 0.4rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.swre-property-archive .propertyhive-pagination li {
	margin: 0;
}

.swre-property-archive .propertyhive-pagination .page-numbers a,
.swre-property-archive .propertyhive-pagination .page-numbers span {
	align-items: center;
	background: var(--swre-property-surface);
	border: 1px solid var(--swre-property-line);
	color: var(--swre-property-ink);
	display: inline-flex;
	font-size: 0.875rem;
	font-weight: 800;
	height: 44px;
	justify-content: center;
	min-width: 44px;
	padding: 0.5rem;
	text-decoration: none;
}

.swre-property-archive .propertyhive-pagination .page-numbers .current,
.swre-property-archive .propertyhive-pagination .page-numbers a:hover {
	background: var(--swre-property-gold);
	border-color: var(--swre-property-gold);
}

@media (max-width: 1024px) {
	.swre-property-archive__hero {
		padding-top: 3.5rem;
	}
}

@media (max-width: 767px) {
	.swre-property-archive__hero {
		padding-bottom: 1.75rem;
		padding-top: 2.75rem;
	}

	.swre-property-archive__toolbar {
		align-items: stretch;
		flex-direction: column;
		gap: 1rem;
	}

	.swre-property-archive__ordering {
		align-items: stretch;
		flex-direction: column;
		gap: 0.35rem;
	}

	.swre-property-archive__ordering .orderby {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.swre-property-archive-filters form.property-search-form > input[type="submit"] {
		transition: none;
	}
}
