/**
 * Crezly Motivated-Seller Score.
 *
 * Scoped under .czss- so nothing here can leak into the Houzez theme. Layout
 * uses CSS grid with an explicit mobile breakpoint: the screener is a table on
 * a desktop and a stack of cards on a phone, because a five-column table on a
 * 375px screen is unreadable and horizontal scrolling on a listing page is
 * worse.
 */

.czss-screener {
	--czss-bg: #fff;
	--czss-fg: #1a1d21;
	--czss-muted: #6b7280;
	--czss-line: #e5e7eb;
	--czss-accent: #1e5eff;
	--czss-radius: 10px;

	color: var(--czss-fg);
	font-size: 15px;
	line-height: 1.5;
}

/* ---------- header ---------- */

.czss-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 6px;
}

.czss-count {
	font-size: 15px;
	font-weight: 600;
	margin: 0;
}

.czss-count span {
	color: var(--czss-muted);
	font-weight: 400;
}

.czss-note {
	color: var(--czss-muted);
	font-size: 13px;
	margin: 0 0 18px;
}

/* ---------- filters ---------- */

.czss-filters {
	background: #f8f9fb;
	border: 1px solid var(--czss-line);
	border-radius: var(--czss-radius);
	display: grid;
	gap: 12px;
	grid-template-columns: 2.2fr 1fr 1.3fr auto;
	align-items: end;
	margin-bottom: 18px;
	padding: 14px 16px;
}

.czss-filters label {
	display: flex;
	flex-direction: column;
	font-size: 12px;
	font-weight: 600;
	gap: 5px;
	letter-spacing: 0.02em;
	margin: 0;
	text-transform: uppercase;
	color: var(--czss-muted);
}

.czss-filters input,
.czss-filters select {
	background: var(--czss-bg);
	border: 1px solid var(--czss-line);
	border-radius: 7px;
	color: var(--czss-fg);
	font-size: 14px;
	height: 40px;
	padding: 0 10px;
	width: 100%;
	box-sizing: border-box;
}

.czss-filters input:focus,
.czss-filters select:focus {
	border-color: var(--czss-accent);
	outline: 2px solid rgba(30, 94, 255, 0.15);
	outline-offset: 0;
}

.czss-filters button {
	background: var(--czss-accent);
	border: 0;
	border-radius: 7px;
	color: #fff;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	height: 40px;
	padding: 0 20px;
	white-space: nowrap;
}

.czss-filters button:hover {
	background: #1749cc;
}

.czss-reset {
	align-self: center;
	color: var(--czss-muted);
	font-size: 13px;
	text-decoration: underline;
	white-space: nowrap;
}

/* ---------- table ---------- */

.czss-table {
	border-collapse: separate;
	border-spacing: 0;
	width: 100%;
	margin: 0;
	font-size: 14px;
}

.czss-table thead th {
	background: transparent;
	border-bottom: 1px solid var(--czss-line);
	color: var(--czss-muted);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	padding: 0 12px 8px;
	text-align: left;
	text-transform: uppercase;
	white-space: nowrap;
}

.czss-table tbody tr {
	border-bottom: 1px solid var(--czss-line);
}

.czss-table tbody tr:hover {
	background: #f8f9fb;
}

.czss-table td {
	padding: 14px 12px;
	vertical-align: middle;
	border-bottom: 1px solid var(--czss-line);
}

.czss-col-score {
	width: 74px;
}

.czss-col-trend {
	width: 70px;
	text-align: right;
}

/* ---------- the parcel cell ---------- */

.czss-addr {
	color: var(--czss-fg);
	display: block;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
}

.czss-addr:hover {
	color: var(--czss-accent);
}

.czss-sub {
	color: var(--czss-muted);
	display: block;
	font-size: 12.5px;
	margin-top: 2px;
}

.czss-bbl {
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 11.5px;
}

/* ---------- score badge ---------- */

.czss-badge {
	align-items: center;
	border-radius: 8px;
	display: inline-flex;
	font-size: 16px;
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	height: 42px;
	justify-content: center;
	width: 46px;
}

.czss-band-high {
	background: #fdeaea;
	color: #b42318;
}

.czss-band-elevated {
	background: #fef3e2;
	color: #b54708;
}

.czss-band-moderate {
	background: #fefbe8;
	color: #a16207;
}

.czss-band-low {
	background: #eef2f6;
	color: #475467;
}

/* ---------- signal chips ---------- */

.czss-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
}

.czss-chip {
	background: #eef2f6;
	border-radius: 20px;
	color: #344054;
	font-size: 11.5px;
	font-weight: 600;
	padding: 3px 9px;
	white-space: nowrap;
}

.czss-chip-pts {
	color: var(--czss-muted);
	font-weight: 400;
}

.czss-none {
	color: var(--czss-muted);
	font-size: 13px;
}

/* ---------- trend ---------- */

.czss-up {
	color: #b42318;
	font-weight: 600;
	white-space: nowrap;
}

.czss-down {
	color: #067647;
	font-weight: 600;
	white-space: nowrap;
}

.czss-flat {
	color: var(--czss-muted);
}

/* ---------- confidence ---------- */

.czss-limited {
	background: #eef2f6;
	border-radius: 4px;
	color: var(--czss-muted);
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.04em;
	margin-left: 6px;
	padding: 2px 5px;
	text-transform: uppercase;
	vertical-align: middle;
}

/* ---------- locked / teaser ---------- */

.czss-blur {
	background: #eef2f6;
	color: transparent;
	position: relative;
	text-shadow: 0 0 11px rgba(52, 64, 84, 0.85);
	user-select: none;
}

.czss-locked {
	background: linear-gradient(180deg, #f8f9fb 0%, #eef2f6 100%);
	border: 1px solid var(--czss-line);
	border-radius: var(--czss-radius);
	margin-top: 18px;
	padding: 22px;
	text-align: center;
}

.czss-locked p {
	margin: 0 0 14px;
}

.czss-cta {
	background: var(--czss-accent);
	border-radius: 7px;
	color: #fff;
	display: inline-block;
	font-weight: 600;
	padding: 11px 22px;
	text-decoration: none;
}

.czss-cta:hover {
	background: #1749cc;
	color: #fff;
}

/* ---------- empty state ---------- */

.czss-empty {
	background: #f8f9fb;
	border: 1px dashed var(--czss-line);
	border-radius: var(--czss-radius);
	color: var(--czss-muted);
	padding: 34px 20px;
	text-align: center;
}

.czss-empty strong {
	color: var(--czss-fg);
	display: block;
	font-size: 16px;
	margin-bottom: 6px;
}

/* ---------- pagination ---------- */

.czss-pagination {
	align-items: center;
	display: flex;
	gap: 14px;
	justify-content: center;
	margin-top: 22px;
}

.czss-pagination a {
	border: 1px solid var(--czss-line);
	border-radius: 7px;
	color: var(--czss-fg);
	font-size: 14px;
	font-weight: 600;
	padding: 8px 14px;
	text-decoration: none;
}

.czss-pagination a:hover {
	border-color: var(--czss-accent);
	color: var(--czss-accent);
}

.czss-pagination span {
	color: var(--czss-muted);
	font-size: 13.5px;
}

/* ---------- property-page panel ---------- */

.czss-panel {
	border: 1px solid var(--czss-line);
	border-radius: var(--czss-radius);
	margin: 26px 0;
	padding: 20px;
}

.czss-panel h3 {
	font-size: 17px;
	margin: 0 0 4px;
}

.czss-panel ul {
	list-style: none;
	margin: 14px 0 0;
	padding: 0;
}

.czss-panel li {
	border-top: 1px solid var(--czss-line);
	display: flex;
	gap: 12px;
	justify-content: space-between;
	padding: 9px 0;
}

.czss-panel li span:last-child {
	color: var(--czss-muted);
	flex: 1;
	text-align: right;
}

.czss-disclaimer {
	color: var(--czss-muted);
	font-size: 12px;
	margin-top: 16px;
}

/* ---------- mobile ---------- */

@media (max-width: 900px) {
	.czss-filters {
		grid-template-columns: 1fr 1fr;
	}

	.czss-filters .czss-filters-search {
		grid-column: 1 / -1;
	}

	.czss-filters button {
		grid-column: 1 / -1;
	}
}

@media (max-width: 640px) {
	/*
	 * Cards, not a squeezed table. Each row becomes a block and each cell
	 * carries its own label, so nothing depends on a header that has scrolled
	 * out of view.
	 */
	.czss-table,
	.czss-table tbody,
	.czss-table tr,
	.czss-table td {
		display: block;
		width: 100%;
	}

	.czss-table thead {
		display: none;
	}

	.czss-table tbody tr {
		border: 1px solid var(--czss-line);
		border-radius: var(--czss-radius);
		margin-bottom: 12px;
		padding: 14px;
		position: relative;
	}

	.czss-table td {
		border: 0;
		padding: 3px 0;
	}

	.czss-col-score {
		position: absolute;
		right: 14px;
		top: 14px;
		width: auto;
	}

	.czss-col-parcel {
		padding-right: 60px;
	}

	.czss-col-trend {
		text-align: left;
	}

	.czss-table td[data-label]::before {
		color: var(--czss-muted);
		content: attr(data-label) ": ";
		font-size: 11px;
		font-weight: 700;
		letter-spacing: 0.04em;
		text-transform: uppercase;
	}
}

/* ---------- property-page panel internals ---------- */

/*
 * The panel and the screener share .czss-head, but the panel is a single
 * badge-plus-title row rather than a split header, so it opts out of the
 * space-between layout.
 */
.czss-panel .czss-head {
	align-items: center;
	gap: 10px;
	justify-content: flex-start;
	margin-bottom: 10px;
}

.czss-of {
	color: var(--czss-muted, #6b7280);
	font-size: 13px;
	margin-left: -4px;
}

.czss-title {
	font-size: 16px;
	font-weight: 700;
}

.czss-trend {
	font-size: 13px;
}

.czss-signals {
	list-style: none;
	margin: 14px 0 0;
	padding: 0;
}

.czss-signals li {
	align-items: baseline;
	border-top: 1px solid var(--czss-line, #e5e7eb);
	display: flex;
	gap: 10px;
	padding: 9px 0;
}

.czss-signals strong {
	color: #b42318;
	flex: 0 0 34px;
	font-variant-numeric: tabular-nums;
}

.czss-reason {
	color: var(--czss-muted, #6b7280);
	flex: 1;
	font-size: 13px;
	text-align: right;
}

.czss-more {
	margin: 12px 0 0;
}

.czss-more a {
	color: var(--czss-accent, #1e5eff);
	font-size: 13.5px;
	font-weight: 600;
	text-decoration: none;
}

/*
 * The panel renders outside .czss-screener, so it cannot inherit the custom
 * properties defined there. Repeat them on the panel itself.
 */
.czss-panel {
	--czss-muted: #6b7280;
	--czss-line: #e5e7eb;
	--czss-accent: #1e5eff;
	--czss-radius: 10px;
}

/* ==========================================================================
   Page layout
   ========================================================================== */

/*
 * The theme puts page content in a col-lg-8 beside a sidebar, which squeezes a
 * four-column data table into two thirds of the width and leaves it butted
 * straight up against the page title. On the screener page only, take the full
 * width and drop the sidebar — a listing table needs the room, and the sidebar
 * on this page carries city filters that duplicate the screener's own.
 */
.czss-screener-page .bt-content-wrap {
	flex: 0 0 100%;
	max-width: 100%;
}

.czss-screener-page .bt-sidebar-wrap {
	display: none;
}

.czss-screener-page .page-content-wrap {
	padding-top: 0;
}

/* Breathing room under the page title, and above the footer. */
.czss-screener {
	padding: 28px 0 40px;
}

.czss-intro {
	color: var(--czss-muted);
	font-size: 14px;
	margin: 0 0 18px;
	max-width: 62ch;
}

/* ==========================================================================
   Mobile
   ========================================================================== */

@media (max-width: 900px) {
	.czss-screener {
		padding: 18px 0 30px;
	}
}

@media (max-width: 640px) {
	.czss-screener {
		font-size: 14.5px;
		padding: 14px 0 26px;
	}

	/*
	 * One field per row. Two-up controls at this width leave the selects too
	 * narrow to read their own option text.
	 */
	.czss-filters {
		gap: 10px;
		grid-template-columns: 1fr;
		padding: 12px;
	}

	/* 44px is the minimum comfortable touch target. */
	.czss-filters input,
	.czss-filters select,
	.czss-filters button {
		font-size: 16px; /* iOS zooms the page on focus below 16px. */
		height: 46px;
	}

	.czss-head {
		margin-bottom: 10px;
	}

	.czss-count {
		font-size: 14px;
	}

	.czss-addr {
		font-size: 15.5px;
		line-height: 1.35;
	}

	.czss-sub {
		font-size: 12px;
		line-height: 1.45;
	}

	.czss-badge {
		font-size: 15px;
		height: 38px;
		width: 42px;
	}

	.czss-chips {
		margin-top: 4px;
	}

	.czss-pagination a {
		padding: 11px 16px;
	}

	.czss-panel {
		padding: 16px;
	}

	.czss-signals li {
		flex-wrap: wrap;
	}

	.czss-reason {
		flex: 1 0 100%;
		text-align: left;
	}
}

/* Very narrow phones: keep the score badge from crowding the address. */
@media (max-width: 380px) {
	.czss-col-parcel {
		padding-right: 52px;
	}

	.czss-badge {
		height: 34px;
		width: 38px;
		font-size: 14px;
	}
}
