.wpmp {
	--wpmp-accent: #0f766e;
	--wpmp-border: #d9e1e7;
	--wpmp-muted: #64748b;
	font-family: inherit;
	margin: 1.5rem 0;
}

.wpmp * { box-sizing: border-box; }

.wpmp-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: .75rem;
	align-items: center;
	margin-bottom: .75rem;
}

.wpmp-search-label { flex: 1 1 220px; }

.wpmp-search {
	width: 100%;
	min-height: 42px;
	padding: .55rem .75rem;
	border: 1px solid var(--wpmp-border);
	border-radius: 7px;
}

.wpmp-categories {
	display: flex;
	flex-wrap: wrap;
	gap: .4rem;
}

.wpmp-categories label {
	display: inline-flex;
	align-items: center;
	gap: .3rem;
	padding: .35rem .6rem;
	border: 1px solid var(--wpmp-border);
	border-radius: 999px;
	cursor: pointer;
}

.wpmp-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	border: 1px solid var(--wpmp-border);
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
}

.wpmp-layout--with-list { grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr); }
.wpmp-map { width: 100%; min-height: 200px; background: #eef2f6; }

.wpmp-list-wrap {
	max-height: 520px;
	overflow: auto;
	border-left: 1px solid var(--wpmp-border);
}

.wpmp-count {
	position: sticky;
	top: 0;
	z-index: 1;
	margin: 0;
	padding: .55rem .75rem;
	color: var(--wpmp-muted);
	background: #f8fafc;
	border-bottom: 1px solid var(--wpmp-border);
	font-size: .82rem;
}

.wpmp-list { display: flex; flex-direction: column; }

.wpmp-list-item {
	display: flex;
	flex-direction: column;
	gap: .2rem;
	width: 100%;
	padding: .8rem;
	text-align: left;
	color: inherit;
	background: #fff;
	border: 0;
	border-bottom: 1px solid var(--wpmp-border);
	cursor: pointer;
}

.wpmp-list-item:hover,
.wpmp-list-item:focus { background: #f0fdfa; outline: 2px solid transparent; }
.wpmp-list-item span, .wpmp-list-item small { color: var(--wpmp-muted); }
.wpmp-status { margin: .6rem 0 0; color: var(--wpmp-muted); }
.wpmp-popup { min-width: 190px; }
.wpmp-popup-title { margin: 0 0 .4rem; font-size: 1rem; }
.wpmp-popup-image { display: block; width: 100%; max-height: 140px; margin-bottom: .5rem; object-fit: cover; border-radius: 5px; }
.wpmp-popup-address { margin: .3rem 0; color: var(--wpmp-muted); }
.wpmp-popup-description p { margin: .4rem 0; }
.wpmp-popup-links { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .6rem; }
.wpmp-custom-marker { background: transparent; border: 0; }
.wpmp-custom-marker img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center bottom; }

.wpmp .wpmp-map-controls { background: #fff; }

.wpmp .wpmp-map-control {
	appearance: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	min-width: 30px;
	min-height: 30px;
	margin: 0;
	padding: 0;
	color: #222;
	background: #fff;
	border: 0;
	border-radius: 0;
	cursor: pointer;
}

.wpmp .wpmp-map-control:first-child { border-radius: 4px 4px 0 0; }
.wpmp .wpmp-map-control:last-child { border-radius: 0 0 4px 4px; }
.wpmp .wpmp-map-control:only-child { border-radius: 4px; }
.wpmp .wpmp-map-control + .wpmp-map-control { border-top: 1px solid #ccc; }
.wpmp .wpmp-map-control:hover,
.wpmp .wpmp-map-control:focus-visible { color: #000; background: #f4f4f4; }
.wpmp .wpmp-map-control:focus-visible { position: relative; z-index: 1; outline: 2px solid #2563eb; outline-offset: 2px; }
.wpmp .wpmp-map-control:disabled { opacity: .6; cursor: wait; }
.wpmp .wpmp-map-control.is-active { color: #fff; background: var(--wpmp-accent); }
.wpmp .wpmp-map-control svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 720px) {
	.wpmp-layout--with-list { grid-template-columns: 1fr; }
	.wpmp-list-wrap { max-height: 320px; border-top: 1px solid var(--wpmp-border); border-left: 0; }
}
