/**
 * WP Dealership Directory - Vercel Light Design System
 * Clean, minimal, high-contrast black/white flat aesthetics inspired by Geist / Vercel.
 * Strictly scoped to .wpdlr-container to prevent any CSS leaks or conflicts.
 */

.wpdlr-container {
	width: 100%;
	max-width: 1240px;
	margin: 0 auto;
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
	-webkit-font-smoothing: antialiased;
	background: transparent;
	padding: 24px 0;
	color: #09090b;
}

.wpdlr-container * {
	box-sizing: border-box;
}

/* Filter Bar (Vercel Segmented Control) */
.wpdlr-filter-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin-bottom: 40px;
	padding: 4px;
	background: #f4f4f5;
	border: 1px solid #e4e4e7;
	border-radius: 9999px;
	width: fit-content;
	max-width: 100%;
	margin-left: auto;
	margin-right: auto;
}

.wpdlr-filter-pill {
	background: transparent;
	color: #52525b;
	border: none;
	border-radius: 9999px;
	padding: 7px 16px;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.15s ease;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	line-height: 1.2;
	box-shadow: none !important;
}

.wpdlr-filter-pill:hover {
	color: #09090b;
}

.wpdlr-filter-pill.is-active {
	background: #ffffff;
	color: #09090b;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
	font-weight: 600;
}

.wpdlr-pill-count {
	font-size: 11px;
	background: #e4e4e7;
	color: #71717a;
	padding: 1px 7px;
	border-radius: 9999px;
	font-weight: 500;
}

.wpdlr-filter-pill.is-active .wpdlr-pill-count {
	background: #f4f4f5;
	color: #09090b;
}

/* Campus Section */
.wpdlr-campus-section {
	margin-bottom: 48px;
}

.wpdlr-campus-section:last-child {
	margin-bottom: 10px;
}

.wpdlr-campus-header {
	text-align: center;
	margin-bottom: 24px;
}

.wpdlr-campus-title {
	font-size: 20px;
	font-weight: 600;
	margin: 0;
	letter-spacing: -0.02em;
	color: #09090b !important;
}

/* Optional Dark theme campus title */
.wpdlr-theme-dark .wpdlr-campus-title {
	color: #ffffff !important;
}

/* Cards Grid */
.wpdlr-grid {
	display: grid;
	gap: 24px;
	width: 100%;
}

.wpdlr-grid.wpdlr-cols-1 {
	grid-template-columns: 1fr;
}

.wpdlr-grid.wpdlr-cols-2 {
	grid-template-columns: repeat(2, 1fr);
}

.wpdlr-grid.wpdlr-cols-3 {
	grid-template-columns: repeat(3, 1fr);
}

.wpdlr-grid.wpdlr-cols-4 {
	grid-template-columns: repeat(4, 1fr);
}

/* Responsive Grid Breakpoints */
@media (max-width: 1024px) {
	.wpdlr-grid.wpdlr-cols-3,
	.wpdlr-grid.wpdlr-cols-4 {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 680px) {
	.wpdlr-grid,
	.wpdlr-grid.wpdlr-cols-2,
	.wpdlr-grid.wpdlr-cols-3,
	.wpdlr-grid.wpdlr-cols-4 {
		grid-template-columns: 1fr !important;
	}

	.wpdlr-filter-bar {
		border-radius: 12px;
		width: 100%;
	}

	.wpdlr-container {
		padding: 10px 4px !important;
	}
}

/* Single Dealership Card - Vercel Minimalist Light Card */
.wpdlr-card {
	background-color: #ffffff;
	color: #09090b;
	border-radius: var(--wpdlr-card-radius, 8px);
	overflow: hidden;
	box-shadow: none !important;
	border: 1px solid #e4e4e7;
	display: flex;
	flex-direction: column;
	transition: border-color 0.3s ease;
}

.wpdlr-card:hover {
	border-color: #a1a1aa;
}

/* 1. Dealership Photo (Top edge-to-edge full width) */
.wpdlr-card-media {
	width: 100% !important;
	min-width: 100% !important;
	max-width: 100% !important;
	height: 195px;
	background-color: #fafafa;
	overflow: hidden;
	border-bottom: 1px solid #f4f4f5;
	display: block !important;
	padding: 0 !important;
	margin: 0 !important;
}

.wpdlr-card-img {
	width: 100% !important;
	min-width: 100% !important;
	max-width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
	display: block !important;
	border: none !important;
	border-radius: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* 2. Brand Logo (Auto-adjust height with uploaded image, full height, no cropping) */
.wpdlr-card-logo-wrap {
	width: 100% !important;
	min-width: 100% !important;
	max-width: 100% !important;
	height: auto !important;
	min-height: auto !important;
	background-color: #ffffff;
	overflow: hidden;
	border-bottom: 1px solid #f4f4f5;
	display: block !important;
	padding: 0 !important;
	margin: 0 !important;
}

.wpdlr-card-logo {
	width: 100% !important;
	min-width: 100% !important;
	max-width: 100% !important;
	height: auto !important;
	object-fit: contain !important;
	display: block !important;
	border: none !important;
	border-radius: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* Card Body (Details) */
.wpdlr-card-body {
	padding: 14px 20px 14px 20px;
	text-align: center;
	flex-grow: 1;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
}

.wpdlr-card-title {
	font-size: 16px;
	font-weight: 600;
	color: #09090b !important;
	margin: 0 0 6px 0;
	line-height: 1.35;
	letter-spacing: -0.015em;
}

.wpdlr-card-address {
	font-size: 13px;
	color: #71717a;
	line-height: 1.5;
	margin-bottom: 14px;
}

/* 3 Phones Block */
.wpdlr-card-phones {
	margin-top: auto;
	padding-top: 6px;
	margin-bottom: 6px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.wpdlr-phone-row {
	font-size: 12.5px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
}

.wpdlr-phone-label {
	color: #a1a1aa;
	font-weight: 600;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.wpdlr-phone-link,
.wpdlr-card a.wpdlr-phone-link,
.wpdlr-phone-row a {
	color: #18181b !important;
	font-weight: 500;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	text-decoration: none !important;
	border-bottom: none !important;
	box-shadow: none !important;
	outline: none;
	transition: color 0.15s ease, opacity 0.15s ease;
}

.wpdlr-phone-link:hover,
.wpdlr-phone-link:focus,
.wpdlr-card a.wpdlr-phone-link:hover,
.wpdlr-card a.wpdlr-phone-link:focus,
.wpdlr-phone-row a:hover,
.wpdlr-phone-row a:focus {
	color: #000000 !important;
	text-decoration: none !important;
	border-bottom: none !important;
	box-shadow: none !important;
	opacity: 0.8;
}

/* Card Footer: Vercel Style CTA Buttons */
.wpdlr-card-footer {
	padding: 0 20px 20px 20px;
	margin-top: auto;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.wpdlr-card-cta-btn {
	display: block;
	width: 100%;
	background-color: var(--wpdlr-btn-bg, #0c783c);
	color: var(--wpdlr-btn-text, #ffffff) !important;
	text-align: center;
	font-size: 16px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	text-decoration: none !important;
	padding: 11px 16px;
	border-radius: var(--wpdlr-btn-radius, 24px);
	transition: filter 0.15s ease, opacity 0.15s ease, background-color 0.15s ease;
	border: 1px solid var(--wpdlr-btn-bg, #0c783c);
	cursor: pointer;
	box-shadow: none !important;
}

.wpdlr-card-cta-btn:hover {
	filter: brightness(0.88);
	opacity: 0.96;
	color: var(--wpdlr-btn-text, #ffffff) !important;
}

.wpdlr-card-cta-btn:active {
	filter: brightness(0.76);
}

/* Fallback message */
.wpdlr-no-dealerships {
	padding: 40px 20px;
	text-align: center;
	color: #71717a;
	font-size: 14px;
}
