/* Map element sizing */
.store-locator #map {
	height: 80vh;
	width: 100%;
}

/* =========================
   Layout (Desktop default)
   ========================= */
.store-locator .layout {
	display: grid;
	gap: 8px;
	grid-template-areas:
		"toolbar toolbar"
		"map     list";
	grid-template-columns: 1fr 300px;
	align-items: start;
}

/* Attach areas */
.store-locator .toolbar {
	grid-area: toolbar;
}
.store-locator #map {
	grid-area: map;
}
.store-locator #list {
	grid-area: list;
}

/* Sidebar list panel */
.store-locator #list {
	width: 300px;
	height: 80vh;
	overflow: auto;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 8px;
	font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
		sans-serif;
	background: #fff;
}

/* =========================
   Toolbar
   ========================= */
.store-locator .toolbar {
	background: rgba(255, 255, 255, 0.95);
	padding: 8px 0px 0px 0px;
	border-radius: 8px;
	font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
		sans-serif;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.store-locator .toolbar input {
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 8px 10px;
	min-width: 240px;
	outline: none;
	flex-grow: 1;
}

.store-locator .toolbar .count {
	font-size: 12px;
	background: #eee;
	padding: 2px 8px;
	border-radius: 999px;
	margin-left: auto;
	display: none;
}

.store-locator .toolbar-sep {
	width: 8px;
}
.store-locator .toolbar-label {
	font-weight: 600;
	color: #11819d;
	margin-left: 2px;
}

/* =========================
   Filter buttons
   ========================= */
.store-locator .filter-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	border: 1px solid #e5e7eb;
	background: #f3f4f6;
	padding: 6px 10px;
	border-radius: 3px;
	font-size: 13px;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
	user-select: none;
}
.store-locator .filter-btn:hover {
	background: #e5e7eb;
}
.store-locator .filter-btn:focus {
	outline: 2px solid #cfe9f0;
	outline-offset: 2px;
}
.store-locator .filter-btn .filter-icon {
	width: 18px;
	height: 18px;
}
.store-locator .filter-btn.active {
	background: #11819d;
	color: #fff;
	border-color: #11819d;
}

/* =========================
   Cards / List styling
   ========================= */
.store-locator .card {
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 10px;
	margin-bottom: 8px;
	cursor: pointer;
}
.store-locator .card:hover {
	background: #f9fafb;
}
.store-locator .card .title {
	font-weight: 600;
	margin-bottom: 4px;
}
.store-locator .card .line {
	font-size: 13px;
	color: #555;
}

.store-locator .white-box {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	padding: 12px 14px 12px 7px;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
	margin-bottom: 10px;
}

.store-locator .preview-business-name {
	font-size: 16px;
	font-weight: 600;
	margin-bottom: 6px;
	color: #11819d;
}

.store-locator .preview-card > .preview-address,
.store-locator .preview-card > .preview-hours,
.store-locator .preview-card > .preview-email,
.store-locator .preview-card > .preview-phone,
.store-locator .preview-card > .preview-summary {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 13px;
	color: #374151;
	margin: 2px 0;
	line-height: 1.4;
	word-break: break-word;
}

.store-locator .info-window-content {
	line-height: 1.5;
}

.store-locator .preview-card i,
.store-locator .white-box i,
.store-locator .info-window-content i {
	color: #11819d;
	min-width: 16px;
	margin-top: 2px;
	padding-left: 2px;
	text-align: center;
}

.store-locator .info-window-content a {
	color: #11819d;
	text-decoration: underline;
	cursor: pointer;
}
.store-locator .info-window-content a:hover {
	text-decoration: none;
	filter: brightness(1.1);
}

.store-locator .preview-card span {
	display: inline-block;
}

.store-locator .preview-card {
	cursor: pointer;
}
.store-locator .preview-card:hover {
	background: #f9fafb;
}

.store-locator .preview-title-row {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 6px;
}
.store-locator .preview-title-row img.title-icon {
	width: 18px;
	height: 18px;
	flex: 0 0 18px;
}
.store-locator .preview-title-row .preview-business-name {
	margin: 0;
}

.store-locator .preview-card.hover {
	background: #f9fafb;
	border-color: #11819d;
}

/* =========================
   Terms Modal
   ========================= */
.store-locator .terms-overlay {
	position: fixed;
	inset: 0;
	background: rgba(17, 17, 17, 0.5);
	display: grid;
	place-items: center;
	z-index: 9999;
}

.store-locator .terms-modal {
	width: min(92vw, 680px);
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
	padding: 18px;
	font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
		sans-serif;
}

.store-locator .terms-header {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
}
.store-locator .terms-header h2 {
	margin: 0;
	font-size: 18px;
	color: #11819d;
}
.store-locator .terms-header i {
	color: #11819d;
	font-size: 20px;
}

.store-locator .terms-body {
	color: #374151;
	font-size: 14px;
	line-height: 1.55;
	max-height: min(60vh, 420px);
	overflow: auto;
	padding-right: 4px;
}

.store-locator .terms-actions {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
	margin-top: 16px;
	flex-wrap: wrap;
}

.store-locator .btn {
	appearance: none;
	border-radius: 999px;
	padding: 10px 16px;
	font-size: 14px;
	cursor: pointer;
	border: 1px solid transparent;
	transition: transform 0.04s ease, box-shadow 0.15s ease,
		background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
	user-select: none;
}
.store-locator .btn:active {
	transform: translateY(1px);
}

.store-locator .btn-primary {
	background: #11819d;
	color: #fff;
	border-color: #11819d;
	box-shadow: 0 6px 18px rgba(17, 129, 157, 0.25);
}
.store-locator .btn-primary:hover {
	filter: brightness(1.05);
}

.store-locator .btn-ghost {
	background: #f3f4f6;
	color: #111827;
	border-color: #e5e7eb;
}
.store-locator .btn-ghost:hover {
	background: #e5e7eb;
}

.store-locator.modal-open {
	overflow: hidden;
}

/* =========================
   Mobile
   ========================= */
@media (max-width: 768px) {
	.store-locator .terms-actions {
		flex-direction: column;
		align-items: stretch;
	}
	.store-locator .terms-actions .btn {
		width: 100%;
	}
	.store-locator .layout {
		grid-template-areas:
			"map"
			"toolbar"
			"list";
		grid-template-columns: 1fr;
	}

	.store-locator #map {
		height: 60vh;
	}

	.store-locator #list {
		width: 100%;
		height: auto;
		max-height: 60vh;
	}

	.store-locator .toolbar {
		gap: 10px 10px;
		justify-content: center;
	}
	.store-locator .toolbar input {
		flex: 1 1 100%;
		min-width: 0;
	}
	.store-locator .toolbar-sep {
		display: none;
	}

	.store-locator .toolbar-label {
		display: none;
	}
	.store-locator .filter-btn {
		order: 2;
		flex-grow: 1;
		justify-content: center;
	}

	.store-locator .toolbar .count {
		order: 3;
		margin-left: 0;
		display: none;
	}
}

/* =========================
   Desktop guard (≥ 769px)
   ========================= */
@media (min-width: 769px) {
	.store-locator #list {
		width: 300px;
	}
}
