/**
 * RLH Grid Styles
 * Styles for rotated battle grids with pan/zoom
 */

/* Map Wrapper & Canvas */
#mapWrapper {
	flex: 1;
	position: relative;
	background-color: #0d0d0d;
	overflow: hidden;
	cursor: grab;
	display: flex;
	align-items: center;
	justify-content: center;
}

#mapCanvas {
	position: relative;
	width: auto;
	height: auto;
	transform-origin: center center;
	/* Performance optimizations for pan/zoom */
	will-change: transform;
	contain: layout style paint;
	/* Add padding so rotated grid corners aren't clipped */
	padding: 600px; /* Enough space for 40x40 grid rotated 45deg */
}

.battle-grid {
	position: relative;
	display: grid;
	grid-template-columns: repeat(40, 44px);
	grid-template-rows: repeat(40, 44px);
	gap: 1px;
	background-color: #333;
	transform: rotate(45deg);
	/* Performance optimizations for rotated grid */
	transform-style: flat;
	will-change: transform;
	contain: layout style paint;
}

.grid-item {
	width: 44px;
	height: 44px;
	background-color: #1a1a1a;
	border: 0.1px solid #222;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	overflow: visible;
	/* Performance optimizations */
	contain: layout style paint;
	will-change: background-color;
}

.grid-item:hover {
	background-color: #252525;
}

