/* JUTC Vendor Map — front-end styles (store-locator layout) */

.jutc-vm-wrapper {
	--jutc-map-height: 600px;
	--jutc-accent: #2563eb;
	margin: 0 0 1.5em;
	font-family: inherit;
	color: #1f2937;
}

/* ---- Two-pane layout: map + legend on the left, list on the right ---- */
.jutc-vm-layout {
	display: flex;
	align-items: flex-start;
	gap: 16px;
}

.jutc-vm-main {
	flex: 1 1 60%;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.jutc-vm-map {
	width: 100%;
	height: var(--jutc-map-height);
	min-height: 320px;
	border-radius: 10px;
	overflow: hidden;
	background: #e5e7eb;
	z-index: 0;
}

/* ---- Sidebar list ---- */
.jutc-vm-sidebar {
	flex: 1 1 34%;
	min-width: 260px;
	max-width: 400px;
	height: var(--jutc-map-height); /* Match the map height; the list scrolls inside. */
	box-sizing: border-box; /* Keep total height equal to the map regardless of theme. */
	display: flex;
	flex-direction: column;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
}

.jutc-vm-controls {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 12px;
	border-bottom: 1px solid #eef2f7;
}

.jutc-vm-search,
.jutc-vm-parish {
	padding: 9px 12px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	font-size: 14px;
	background: #fff;
	color: #1f2937;
	min-height: 40px;
}

.jutc-vm-search {
	flex: 1 1 100%;
}

.jutc-vm-parish {
	flex: 1 1 100%;
}

.jutc-vm-count {
	padding: 8px 12px;
	font-size: 12px;
	color: #64748b;
	background: #f8fafc;
	border-bottom: 1px solid #eef2f7;
}

.jutc-vm-list {
	flex: 1 1 auto;
	overflow-y: auto;
	list-style: none;
	margin: 0;
	padding: 0;
	-webkit-overflow-scrolling: touch;
}

.jutc-vm-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px;
	border-bottom: 1px solid #f1f5f9;
	cursor: pointer;
	transition: background 0.12s ease;
}

.jutc-vm-item:hover,
.jutc-vm-item.is-active {
	background: #f1f6ff;
}

.jutc-vm-item.is-active {
	box-shadow: inset 3px 0 0 var(--jutc-accent);
}

/* Left indicator: a small teardrop pin in the category colour */
.jutc-vm-thumb {
	flex: 0 0 auto;
	width: 22px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.jutc-vm-thumb-pin {
	width: 16px;
	height: 16px;
	border-radius: 50% 50% 50% 0;
	transform: rotate(-45deg);
	border: 1.5px solid #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.jutc-vm-item-body {
	flex: 1 1 auto;
	min-width: 0;
	display: block;
}

.jutc-vm-item-title {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: #0f172a;
	line-height: 1.25;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.jutc-vm-item-sub {
	display: block;
	font-size: 12px;
	color: #64748b;
	line-height: 1.3;
	margin-top: 2px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.jutc-vm-list-empty {
	padding: 24px 16px;
	text-align: center;
	color: #94a3b8;
	font-size: 13px;
}

/* ---- Map key / legend below the map ---- */
.jutc-vm-legend {
	margin-top: 12px;
	background: #1f2937; /* Dark slate panel behind the whole map key. */
	padding: 14px 16px;
	border-radius: 10px;
}

.jutc-vm-legend-title {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #cbd5e1;
	margin-bottom: 10px;
}

.jutc-vm-legend-title .jutc-vm-key-hint {
	margin-left: auto;
	font-weight: 500;
	text-transform: none;
	letter-spacing: 0;
	color: #94a3b8;
	font-size: 11px;
}

/* Single column: keys stacked one per row. */
.jutc-vm-legend-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 6px;
}

.jutc-vm-legend-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 8px;
	border: 0 !important;
	background: transparent !important; /* Override theme button styling. */
	box-shadow: none !important;
	border-radius: 6px;
	cursor: pointer;
	font-size: 13px;
	color: #f1f5f9 !important;
	text-align: left;
	line-height: 1.2;
	width: 100%;
	transition: background 0.12s ease, opacity 0.12s ease;
}

.jutc-vm-legend-item:hover {
	background: rgba(255, 255, 255, 0.08) !important;
}

.jutc-vm-legend-item.is-off {
	opacity: 0.4;
}

.jutc-vm-legend-item.is-off .jutc-vm-legend-label {
	text-decoration: line-through;
}

/* Mini teardrop pin used as the key swatch */
.jutc-vm-key-pin {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	border-radius: 50% 50% 50% 0;
	transform: rotate(-45deg);
	border: 1.5px solid #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.jutc-vm-legend-label {
	flex: 1 1 auto;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.jutc-vm-legend-count {
	flex: 0 0 auto;
	color: #94a3b8;
	font-size: 12px;
	font-variant-numeric: tabular-nums;
}

/* ---- Custom teardrop map markers ---- */
.jutc-pin-wrap {
	background: transparent;
	border: 0;
}

.jutc-pin {
	width: 26px;
	height: 26px;
	border-radius: 50% 50% 50% 0;
	background: var(--c, #2563eb);
	transform: rotate(-45deg);
	border: 2px solid #fff;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
}

/* ---- States ---- */
.jutc-vm-loading,
.jutc-vm-error,
.jutc-vm-empty {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	min-height: 320px;
	padding: 20px;
	text-align: center;
	color: #64748b;
	font-size: 15px;
}

.jutc-vm-error {
	color: #b91c1c;
}

.jutc-vm-empty {
	background: #f1f5f9;
	border: 1px dashed #cbd5e1;
	border-radius: 10px;
}

/* ---- Popups ---- */
.jutc-vm-popup {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 14px;
	line-height: 1.35;
}

.jutc-vm-pop-name {
	font-size: 15px;
	color: #0f172a;
}

.jutc-vm-pop-addr {
	color: #475569;
}

.jutc-vm-pop-cat {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #334155;
	font-size: 13px;
}

.jutc-vm-pop-dot {
	display: inline-block;
	width: 11px;
	height: 11px;
	border-radius: 50%;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15) inset;
}

/* ---- Responsive: stack on narrow screens ---- */
@media ( max-width: 782px ) {
	.jutc-vm-layout {
		flex-direction: column;
	}
	.jutc-vm-sidebar {
		max-width: none;
		min-width: 0;
		height: 360px;
	}
	.jutc-vm-map {
		height: 380px;
	}
}
