/* Maps: the Map view, the tile map and the Place editor (assets/js/ext/maps.js). */

.pm-map { position: relative; overflow: hidden; background: #e8eef0; border-radius: 6px; touch-action: none; cursor: grab; user-select: none; outline-offset: 2px; }
.pm-map.no-tiles { background: repeating-linear-gradient(0deg, transparent 0 39px, var(--border) 39px 40px), repeating-linear-gradient(90deg, transparent 0 39px, var(--border) 39px 40px), var(--bg-side); }
.pm-map.dragging { cursor: grabbing; }
.pm-map:focus-visible { outline: 2px solid var(--accent); }
.pm-tiles, .pm-pins { position: absolute; inset: 0; }
.pm-tile { position: absolute; left: 0; top: 0; width: 256px; height: 256px; max-width: none; pointer-events: none; }
.pm-tile.failed { visibility: hidden; }
.pm-pin, .pm-cluster { position: absolute; left: 0; top: 0; border: 0; padding: 0; cursor: pointer; }
.pm-pin { width: 26px; height: 34px; margin: -34px 0 0 -13px; background: none; }
.pm-pin::before { content: ''; position: absolute; left: 3px; top: 0; width: 20px; height: 20px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); transform-origin: 10px 10px;
  background: var(--c-red); box-shadow: 0 1px 3px rgba(0, 0, 0, .35); }
.pm-pin-dot { position: absolute; left: 9px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.pm-pin.hl::before { background: var(--accent); transform: rotate(-45deg) scale(1.25); }
.pm-pin.hl { z-index: 2; }
.pm-cluster { min-width: 34px; height: 34px; margin: -17px 0 0 -17px; padding: 0 8px; border-radius: 17px; font-weight: 600; font-size: 13px; color: #fff;
  background: var(--c-blue); box-shadow: 0 0 0 4px rgba(51, 126, 169, .3), 0 1px 3px rgba(0, 0, 0, .3); }
.pm-cluster.hl { background: var(--accent); }
.pm-zoom { position: absolute; right: 8px; top: 8px; display: flex; flex-direction: column; box-shadow: var(--shadow); border-radius: 6px; overflow: hidden; }
.pm-zbtn { width: 30px; height: 30px; border: 0; background: var(--bg-elev); color: var(--fg); font-size: 18px; line-height: 1; cursor: pointer; }
.pm-zbtn:hover { background: var(--bg-hover); }
.pm-zbtn + .pm-zbtn { border-top: 1px solid var(--border); }
.pm-attrib { position: absolute; right: 0; bottom: 0; padding: 1px 6px; font-size: 11px; color: #333; background: rgba(255, 255, 255, .8); border-top-left-radius: 4px; cursor: default; }
.pm-hint { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 15px; background: rgba(0, 0, 0, .35); opacity: 0; transition: opacity .2s; pointer-events: none; }
.pm-map.show-hint .pm-hint { opacity: 1; }

.pm-view { display: flex; flex-direction: column; gap: 8px; }
.pm-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pm-head select.input { width: auto; padding: 2px 6px; }
.pm-body { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 10px; height: 480px; }
.pm-main { height: 100%; }
.pm-side { display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--border); border-radius: 6px; }
.pm-list { list-style: none; margin: 0; padding: 4px; overflow: auto; flex: 1; }
.pm-item { display: flex; align-items: center; gap: 2px; border-radius: 4px; }
.pm-item:hover { background: var(--bg-hover); }
.pm-item-btn { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 5px 6px; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; font: inherit; border-radius: 4px; }
.pm-item-title, .pm-item-where { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-item.unpinned .pm-item-where { font-style: italic; }
.pm-item-edit { opacity: 0; }
.pm-item:hover .pm-item-edit, .pm-item-edit:focus { opacity: 1; }
.pm-none { padding: 8px; }
.pm-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.pm-side .dblist-new { margin: 4px; }
@media (max-width: 760px) {
  .pm-body { grid-template-columns: 1fr; height: auto; }
  .pm-main { height: 360px; }
  .pm-side { max-height: 260px; }
}

.pm-cell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-editor { display: flex; flex-direction: column; gap: 8px; }
.pm-editor .row-gap .input { flex: 1; }
.pm-mini { height: 190px; }
.pm-results { display: flex; flex-direction: column; max-height: 170px; overflow: auto; }
.pm-results:empty { display: none; }
.pm-result .mi-label { white-space: normal; }
.pm-status:empty { display: none; }
.pm-editor-foot { align-items: center; flex-wrap: wrap; }
