/* ==========================================================================
   bzLLG Homes — Front-end Styles
   Plugin Version: 0.1
   ========================================================================== */

/* --- Listing wrapper — columns driven by --bzllg-homes-cols custom property --- */
.bzllg-homes-listing {
	display: grid;
	grid-template-columns: repeat(var(--bzllg-homes-cols, 1), 1fr);
	gap: 28px;
	margin: 20px 0;
}

@media (max-width: 600px) {
	.bzllg-homes-listing {
		grid-template-columns: repeat(var(--bzllg-homes-cols-mobile, 1), 1fr);
	}
}

/* --- Single card --- */
.bzllg-home-card {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: 24px;
	background: #ffffff;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
	overflow: hidden;
	padding: 0;
}

/* --- Image column (left, ~40%) --- */
.bzllg-home-image {
	flex: 0 0 40%;
	max-width: 40%;
}

.bzllg-home-image .bzllg-home-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	min-height: 220px;
}

/* Placeholder when no featured image is set */
.bzllg-home-img--placeholder {
	width: 100%;
	min-height: 220px;
	background: #f0f0f0;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* --- Details column (right) --- */
.bzllg-home-details {
	flex: 1;
	padding: 12px 24px 12px 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-family: 'Open Sans', sans-serif;
}

/* --- Text fields --- */
.bzllg-home-name {
	font-size: 1.2rem;
	font-weight: 700;
	margin: 0;
	color: #1a1a1a;
}

.bzllg-home-price {
	font-size: 2rem;
	font-weight: 800;
	color: #1a1a1a;
	margin: 0;
}

.bzllg-home-agent,
.bzllg-home-broker {
	font-size: 1rem;
	margin: 0;
	color: #333;
}

/* --- Button --- */
.bzllg-home-btn,
.bzllg-home-btn a {
	display: inline-block;
	margin-top: 0px;
	padding: 10px 10px;
	background: #255104;
	color: #ffffff !important;
	text-decoration: none;
	border-radius: 5px;
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.03em;
	transition: background 0.2s ease;
	align-self: flex-start;
}

.bzllg-home-btn:hover {
	background: #2c6e49;
	color: #ffffff !important;
}

.bzllg-home-btn::after,
.bzllg-home-btn a::after {
	content: none !important;
}

/* --- "No homes found" message --- */
.bzllg-homes-none {
	font-style: italic;
	color: #888;
}

/* ==========================================================================
   Responsive: stack vertically on small screens
   ========================================================================== */
@media (max-width: 600px) {
	.bzllg-home-card {
		flex-direction: column;
		gap: 5px;
	}

	.bzllg-home-image {
		flex: 0 0 auto;
		width: 100%;
		max-width: 100%;
	}

	.bzllg-home-image .bzllg-home-img {
		width: 100%;
		height: 180px;
		min-height: unset;
		object-fit: cover;
	}

	.bzllg-home-img--placeholder {
		min-height: 180px;
	}

	.bzllg-home-details {
		padding: 0 16px 16px;
	}

	.bzllg-home-name {
		font-size: 1em;
	}

	.bzllg-home-price {
		font-size: 1.4rem;
	}

	.bzllg-home-agent strong {
		display: block;
	}
}

/* ==========================================================================
   bzLLG Businesses — Grid & Card Styles
   ========================================================================== */

/* --- Grid wrapper — columns driven by --bzllg-biz-cols custom property --- */
.bzllg-businesses-grid {
	display: grid;
	grid-template-columns: repeat(var(--bzllg-biz-cols, 2), 1fr);
	gap: 28px;
	margin: 20px 0;
}

/* --- Single business card --- */
.bzllg-biz-card {
	display: flex;
	flex-direction: column;
	background: #ffffff;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
	overflow: hidden;
	max-width: 500px;
}

/* --- Image (top of card, 4:3 aspect ratio) --- */
.bzllg-biz-image {
	width: 100%;
	flex-shrink: 0;
	position: relative;
	padding-bottom: 75%;
	/* 4:3 ratio */
	height: 0;
	overflow: hidden;
}

.bzllg-biz-image .bzllg-biz-img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Placeholder when no image is set */
.bzllg-biz-img--placeholder {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: #f0f0f0;
}

/* --- Details (below image) --- */
.bzllg-biz-details {
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	font-family: 'Open Sans', sans-serif;
	flex: 1;
}

/* --- Business name --- */
.bzllg-biz-name {
	font-size: 1.3rem;
	font-weight: 700;
	margin: 0 0 4px;
	color: #1a1a1a;
}

/* --- Description --- */
.bzllg-biz-description {
	font-size: 0.95rem;
	color: #444;
	margin: 0;
	line-height: 1.6;
}

/* --- Visit Website button --- */
.bzllg-biz-btn,
.bzllg-biz-btn a {
	display: inline-block;
	margin-top: 14px;
	padding: 10px 10px;
	background: #255104;
	color: #ffffff !important;
	text-decoration: none;
	border-radius: 5px;
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.03em;
	transition: background 0.2s ease;
	align-self: flex-start;
}

.bzllg-biz-btn:hover {
	background: #2c6e49;
	color: #ffffff !important;
}

.bzllg-biz-btn::after,
.bzllg-biz-btn a::after {
	content: none !important;
}

/* ==========================================================================
   Responsive: single column on small screens
   ========================================================================== */
@media (max-width: 600px) {
	.bzllg-businesses-grid {
		grid-template-columns: repeat(var(--bzllg-biz-cols-mobile, 1), 1fr);
	}
}

/* ==========================================================================
   bzLLG Partners — Responsive Logo Grid
   ========================================================================== */

/* --- Grid wrapper — columns driven by --bzllg-partner-cols custom property --- */
.bzllg-partners-wrap {
	display: grid;
	grid-template-columns: repeat(var(--bzllg-partner-cols, 4), 1fr);
	gap: 20px;
	align-items: center;
	margin: 20px 0;
}

/* --- Single partner item --- */
.bzllg-partner-item {
	display: flex;
	align-items: center;
	justify-content: center;
}

/* --- Logo image — fills column width --- */
.bzllg-partner-item .bzllg-partner-logo {
	display: block;
	width: 100%;
	height: auto;
	object-fit: contain;
}

/* Placeholder when no logo is set */
.bzllg-partner-logo--placeholder {
	width: 100%;
	aspect-ratio: 2 / 1;
	background: #f0f0f0;
}

@media (max-width: 600px) {
	.bzllg-partners-wrap {
		grid-template-columns: repeat(var(--bzllg-partner-cols-mobile, 1), 1fr);
	}
}

/* ==========================================================================
   bzLLG Map — Leaflet Container & Pins
   ========================================================================== */

.bzllg-map-wrap {
	margin: 20px 0;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}

.bzllg-map-wrap>div {
	width: 100%;
	/* Height is set inline via shortcode attr */
	z-index: 1;
	/* Keep leaflet beneath WP admin bar dropping down */
}

/* --- Custom DivIcon Pins --- */
.bzllg-map-pin {
	width: 32px;
	height: 32px;
	border-radius: 50% 50% 50% 0;
	transform: rotate(-45deg);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 16px;
	font-weight: bold;
	box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
	border: 2px solid #fff;
}

/* The inner icon needs rotating back so it sits upright */
.bzllg-map-pin::after {
	transform: rotate(45deg);
}

.bzllg-map-pin--home {
	background-color: #1a3c5e;
	/* Blue */
}

.bzllg-map-pin--home::after {
	content: "\2302";
	/* House icon */
}

.bzllg-map-pin--biz {
	background-color: #255104;
	/* Green */
}

.bzllg-map-pin--biz::after {
	content: "\1F6E0";
	/* Hammer/Wrench or similar biz icon */
}

/* --- Map Popups --- */
.bzllg-map-popup {
	font-family: 'Open Sans', sans-serif;
	font-size: 14px;
	line-height: 1.4;
	color: #333;
}

.bzllg-map-popup strong {
	font-size: 15px;
	color: #1a1a1a;
	display: block;
	margin-bottom: 4px;
}

.bzllg-map-popup a {
	display: inline-block;
	margin-top: 6px;
	color: #255104;
	font-weight: 600;
	text-decoration: none;
}

.bzllg-map-popup a:hover {
	text-decoration: underline;
}