.map-resize {
  position: absolute;
  inset: 0;
  z-index: 7;
  overflow: hidden;
  pointer-events: none;
}

.map-resize__existing, .map-resize__addition {
  position: absolute;
  border: 2px solid #f9e4a3;
}

.map-resize__existing { box-shadow: 0 0 0 1px #273921dd; }
.map-resize__addition { border-style: dashed; background: #e6cd713b; }

.map-resize__handle {
  position: absolute;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  color: #fff9df;
  background: #314137ed;
  box-shadow: 0 1px 6px #29351b86;
  touch-action: none;
  pointer-events: auto;
  cursor: ew-resize;
}

.map-resize__handle:is(:hover, :focus-visible, [data-dragging="true"]),
#expand-map[aria-pressed="true"] {
  background: #e5c677;
  color: #233222;
}

.map-resize__handle[data-map-edge="minX"] svg { rotate: 180deg; }
.map-resize__handle[data-map-edge="minZ"] svg { rotate: -90deg; }
.map-resize__handle[data-map-edge="maxZ"] svg { rotate: 90deg; }
.map-resize__handle:is([data-map-edge="minZ"], [data-map-edge="maxZ"]) { cursor: ns-resize; }

.map-resize__info {
  position: absolute;
  inset: max(68px, calc(env(safe-area-inset-top) + 60px)) auto auto 12px;
  display: grid;
  align-items: start;
  justify-items: start;
  gap: 4px;
  padding: 9px 12px;
  border-radius: 10px;
  background: #303f34e8;
  color: #fff8e5;
  font-size: 12px;
}

.map-resize__dimensions { font-size: 16px; font-variant-numeric: tabular-nums; font-weight: 700; }
.map-resize__done { margin-top: 3px; pointer-events: auto; }

#editor[data-resizing-map="true"] .view-buttons > :not(#expand-map) { display: none; }
#editor:has(.scene-menu:not([hidden])) .map-resize { visibility: hidden; }
