/* PureLeaf: a slippy map in pure Blazor. No JavaScript. */
.pl-map {
  position: relative;
  overflow: hidden;
  container: pl-map / size;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  outline: none;
  cursor: grab;
  background: var(--pl-background, #dfe6ec);
  -webkit-tap-highlight-color: transparent;
}
.pl-map.pl-dragging { cursor: grabbing; }
.pl-map:focus-visible { box-shadow: inset 0 0 0 3px var(--pl-focus, #0078d4); }

.pl-pane {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  will-change: transform;
}
.pl-tile-pane { z-index: 1; }
.pl-overlay-pane { z-index: 3; pointer-events: none; }

/* Transparent plane centred on the map: offsetX - 40000 = x relative to the centre. */
.pl-hit {
  position: absolute;
  z-index: 2;
  left: calc(50% - 40000px);
  top: calc(50% - 40000px);
  width: 80000px;
  height: 80000px;
}

.pl-tile-layer { position: absolute; left: 0; top: 0; width: 0; height: 0; }
.pl-backdrop { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.pl-tile {
  position: absolute;
  width: 256.5px;
  height: 256.5px;
  background-image: var(--pl-u);
  background-size: 256px 256px;
  background-repeat: no-repeat;
  animation: pl-tile-in .22s ease-out;
  filter: var(--pl-tile-filter, none);
}
.pl-tile.pl-static { animation: none; }
@keyframes pl-tile-in { from { opacity: 0; } }

.pl-zoom-anim { animation: pl-zoom .3s cubic-bezier(.2, .7, .3, 1); }
@keyframes pl-zoom { from { transform: scale(var(--pl-from)); } to { transform: none; } }

.pl-marker-layer { position: absolute; left: 0; top: 0; width: 0; height: 0; }
.pl-marker-layer.pl-fade-in { animation: pl-markers-in .35s ease-out; }
@keyframes pl-markers-in { from { opacity: 0; transform: scale(.96); } }
.pl-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
}
.pl-marker * { pointer-events: none; }
.pl-marker:hover { z-index: 10; }

.pl-zoom-control {
  position: absolute;
  z-index: 5;
  right: 16px;
  bottom: 44px;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
  cursor: default;
}
.pl-zoom-control button {
  width: 40px;
  height: 40px;
  border: 0;
  font: 500 20px/1 system-ui, sans-serif;
  color: var(--pl-control-fg, #1b1b1b);
  background: var(--pl-control-bg, rgba(255, 255, 255, .92));
  cursor: pointer;
}
.pl-zoom-control button + button { border-top: 1px solid rgba(127, 127, 127, .25); }
.pl-zoom-control button:hover:not(:disabled) { background: var(--pl-control-hover, #fff); }
.pl-zoom-control button:disabled { opacity: .4; cursor: default; }

.pl-attribution {
  position: absolute;
  z-index: 5;
  right: 0;
  bottom: 0;
  padding: 3px 8px;
  font: 11px/1.4 system-ui, sans-serif;
  color: var(--pl-attribution-fg, #333);
  background: var(--pl-attribution-bg, rgba(255, 255, 255, .75));
  border-top-left-radius: 8px;
  cursor: default;
  max-width: 70%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Before the map size is known, elements are tagged with their distance from the centre
   (in 128px steps) and container queries hide the ones outside a smaller map, so their
   background images are never downloaded. */
@container pl-map (max-width: 256px) { .pl-bx-1, .pl-bx-1 * { visibility: hidden; background-image: none !important; } }
@container pl-map (max-height: 256px) { .pl-by-1, .pl-by-1 * { visibility: hidden; background-image: none !important; } }
@container pl-map (max-width: 512px) { .pl-bx-2, .pl-bx-2 * { visibility: hidden; background-image: none !important; } }
@container pl-map (max-height: 512px) { .pl-by-2, .pl-by-2 * { visibility: hidden; background-image: none !important; } }
@container pl-map (max-width: 768px) { .pl-bx-3, .pl-bx-3 * { visibility: hidden; background-image: none !important; } }
@container pl-map (max-height: 768px) { .pl-by-3, .pl-by-3 * { visibility: hidden; background-image: none !important; } }
@container pl-map (max-width: 1024px) { .pl-bx-4, .pl-bx-4 * { visibility: hidden; background-image: none !important; } }
@container pl-map (max-height: 1024px) { .pl-by-4, .pl-by-4 * { visibility: hidden; background-image: none !important; } }
@container pl-map (max-width: 1280px) { .pl-bx-5, .pl-bx-5 * { visibility: hidden; background-image: none !important; } }
@container pl-map (max-height: 1280px) { .pl-by-5, .pl-by-5 * { visibility: hidden; background-image: none !important; } }
@container pl-map (max-width: 1536px) { .pl-bx-6, .pl-bx-6 * { visibility: hidden; background-image: none !important; } }
@container pl-map (max-height: 1536px) { .pl-by-6, .pl-by-6 * { visibility: hidden; background-image: none !important; } }
@container pl-map (max-width: 1792px) { .pl-bx-7, .pl-bx-7 * { visibility: hidden; background-image: none !important; } }
@container pl-map (max-height: 1792px) { .pl-by-7, .pl-by-7 * { visibility: hidden; background-image: none !important; } }
@container pl-map (max-width: 2048px) { .pl-bx-8, .pl-bx-8 * { visibility: hidden; background-image: none !important; } }
@container pl-map (max-height: 2048px) { .pl-by-8, .pl-by-8 * { visibility: hidden; background-image: none !important; } }
@container pl-map (max-width: 2304px) { .pl-bx-9, .pl-bx-9 * { visibility: hidden; background-image: none !important; } }
@container pl-map (max-height: 2304px) { .pl-by-9, .pl-by-9 * { visibility: hidden; background-image: none !important; } }
@container pl-map (max-width: 2560px) { .pl-bx-10, .pl-bx-10 * { visibility: hidden; background-image: none !important; } }
@container pl-map (max-height: 2560px) { .pl-by-10, .pl-by-10 * { visibility: hidden; background-image: none !important; } }
@container pl-map (max-width: 2816px) { .pl-bx-11, .pl-bx-11 * { visibility: hidden; background-image: none !important; } }
@container pl-map (max-height: 2816px) { .pl-by-11, .pl-by-11 * { visibility: hidden; background-image: none !important; } }
@container pl-map (max-width: 3072px) { .pl-bx-12, .pl-bx-12 * { visibility: hidden; background-image: none !important; } }
@container pl-map (max-height: 3072px) { .pl-by-12, .pl-by-12 * { visibility: hidden; background-image: none !important; } }
@container pl-map (max-width: 3328px) { .pl-bx-13, .pl-bx-13 * { visibility: hidden; background-image: none !important; } }
@container pl-map (max-height: 3328px) { .pl-by-13, .pl-by-13 * { visibility: hidden; background-image: none !important; } }
@container pl-map (max-width: 3584px) { .pl-bx-14, .pl-bx-14 * { visibility: hidden; background-image: none !important; } }
@container pl-map (max-height: 3584px) { .pl-by-14, .pl-by-14 * { visibility: hidden; background-image: none !important; } }
@container pl-map (max-width: 3840px) { .pl-bx-15, .pl-bx-15 * { visibility: hidden; background-image: none !important; } }
@container pl-map (max-height: 3840px) { .pl-by-15, .pl-by-15 * { visibility: hidden; background-image: none !important; } }
@container pl-map (max-width: 4096px) { .pl-bx-16, .pl-bx-16 * { visibility: hidden; background-image: none !important; } }
@container pl-map (max-height: 4096px) { .pl-by-16, .pl-by-16 * { visibility: hidden; background-image: none !important; } }
@container pl-map (max-width: 4352px) { .pl-bx-17, .pl-bx-17 * { visibility: hidden; background-image: none !important; } }
@container pl-map (max-height: 4352px) { .pl-by-17, .pl-by-17 * { visibility: hidden; background-image: none !important; } }
@container pl-map (max-width: 4608px) { .pl-bx-18, .pl-bx-18 * { visibility: hidden; background-image: none !important; } }
@container pl-map (max-height: 4608px) { .pl-by-18, .pl-by-18 * { visibility: hidden; background-image: none !important; } }
@container pl-map (max-width: 4864px) { .pl-bx-19, .pl-bx-19 * { visibility: hidden; background-image: none !important; } }
@container pl-map (max-height: 4864px) { .pl-by-19, .pl-by-19 * { visibility: hidden; background-image: none !important; } }
@container pl-map (max-width: 5120px) { .pl-bx-20, .pl-bx-20 * { visibility: hidden; background-image: none !important; } }
@container pl-map (max-height: 5120px) { .pl-by-20, .pl-by-20 * { visibility: hidden; background-image: none !important; } }
@container pl-map (max-width: 5376px) { .pl-bx-21, .pl-bx-21 * { visibility: hidden; background-image: none !important; } }
@container pl-map (max-height: 5376px) { .pl-by-21, .pl-by-21 * { visibility: hidden; background-image: none !important; } }
@container pl-map (max-width: 5632px) { .pl-bx-22, .pl-bx-22 * { visibility: hidden; background-image: none !important; } }
@container pl-map (max-height: 5632px) { .pl-by-22, .pl-by-22 * { visibility: hidden; background-image: none !important; } }
@container pl-map (max-width: 5888px) { .pl-bx-23, .pl-bx-23 * { visibility: hidden; background-image: none !important; } }
@container pl-map (max-height: 5888px) { .pl-by-23, .pl-by-23 * { visibility: hidden; background-image: none !important; } }
@container pl-map (max-width: 6144px) { .pl-bx-24, .pl-bx-24 * { visibility: hidden; background-image: none !important; } }
@container pl-map (max-height: 6144px) { .pl-by-24, .pl-by-24 * { visibility: hidden; background-image: none !important; } }
