/**
 * Listing grid layout — used by the closed sales grid, and by any future grid
 * module. The card itself comes from listing-card.css, declared as a dependency.
 *
 * Flex, not CSS grid: grid placement breaks inside Elementor (CLAUDE.md §2), so
 * columns are computed as flex-basis percentages from a --bbis-grid-* count set
 * inline per instance.
 */

.bbis.bbis .bbis-grid {
	--bbis-grid-gap: 20px;
	--bbis-grid-cols: var(--bbis-grid-mobile, 1);
	font-family: var(--bbis-font-body);
}

@media (min-width: 600px) {
	.bbis.bbis .bbis-grid { --bbis-grid-cols: var(--bbis-grid-tablet, 2); }
}

@media (min-width: 1024px) {
	.bbis.bbis .bbis-grid {
		--bbis-grid-gap: 24px;
		--bbis-grid-cols: var(--bbis-grid-desktop, 3);
	}
}

.bbis.bbis .bbis-grid__title {
	font-family: var(--bbis-font-head);
	font-size: clamp(1.35rem, 1.1rem + 1.1vw, 2rem);
	line-height: 1.15;
	margin: 0 0 18px;
}

.bbis.bbis .bbis-grid__list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--bbis-grid-gap);
}

.bbis.bbis .bbis-grid__list > .bbis-card__item {
	flex: 0 0 calc(
		(100% - (var(--bbis-grid-cols) - 1) * var(--bbis-grid-gap)) / var(--bbis-grid-cols)
	);
}

/* ============================================================ MLS legal ==
   Required attribution under any block of MLS listings. Matches the search
   page treatment so the notice reads the same wherever it appears: quiet,
   but present and never hidden. The MLS logo inside it is part of what the
   licence requires, so it is sized rather than suppressed. */

.bbis.bbis .bbis-legal {
	margin-top: 28px;
	padding-top: 18px;
	border-top: 1px solid var(--bbis-border);
	color: var(--bbis-muted);
	font-size: .72rem;
	line-height: 1.55;
}

.bbis.bbis .bbis-legal img {
	max-width: 160px;
	height: auto;
	margin-bottom: 8px;
	display: block;
}

.bbis.bbis .bbis-legal p { margin: 0 0 6px; }

