.map-view {
	display: block;
}

.map-view-toolbar {
	display: flex;
	gap: 6px;
	margin-bottom: 8px;
	flex-wrap: wrap;
}

.map-view-btn {
	padding: 4px 10px;
	font-size: 13px;
	background: var(--surface-2, #2a2a2a);
	color: var(--text-1, #ddd);
	border: 1px solid var(--border-1, #444);
	border-radius: 4px;
	cursor: pointer;
}

.map-view-btn:hover {
	background: var(--surface-3, #333);
}

.map-view-btn.active {
	border-color: #3b82f6;
	color: #fff;
}

.map-view-wrapper {
	position: relative;
	display: inline-block;
	max-width: 100%;
	line-height: 0;
}

.map-view-canvas,
.map-view-poly-canvas {
	display: block;
	max-width: 100%;
	height: auto;
}

.map-view-poly-canvas {
	position: absolute;
	inset: 0;
	pointer-events: none;
	width: 100%;
	height: 100%;
}

.map-view-layer {
	position: absolute;
	inset: 0;
}

.map-view-editable .map-view-layer {
	cursor: crosshair;
}

.map-view-pins {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.map-view-pin {
	position: absolute;
	width: 24px;
	height: 24px;
	transform: translate(-50%, -50%);
	background-image: url('../images/interface/objecticons.webp');
	background-size: 192px 192px;
	background-position: -48px 0px;
	pointer-events: auto;
	filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.7));
	transition: transform 0.1s ease;
}

.map-view-pin:hover {
	transform: translate(-50%, -50%) scale(1.25);
}

.map-view-editable .map-view-pin {
	cursor: pointer;
}

.wcdb-tooltip.map-view-pin-tooltip {
	position: fixed;
	z-index: 99999;
	pointer-events: none;
	padding: 4px 8px;
	min-width: auto;
	max-width: none;
	white-space: nowrap;
	color: #ffd100;
	font-size: 13px;
}

.map-view-coords {
	position: absolute;
	top: 6px;
	left: 6px;
	padding: 2px 6px;
	font-size: 12px;
	line-height: 1.4;
	background: rgba(0, 0, 0, 0.7);
	color: #fff;
	border-radius: 3px;
	pointer-events: none;
	z-index: 2;
}

.map-view-loading {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 14px;
	color: var(--text-2, #aaa);
}
