/* Civication – History Go miniatyr-kartlag + zoomkontroller */

#civiMapWorld svg { pointer-events: none; }

.civi-hg-place-miniature {
  pointer-events: auto;
  cursor: pointer;
}

.civi-hg-place-miniature:focus { outline: none; }

.civi-hg-place-miniature:hover,
.civi-hg-place-miniature:focus-visible {
  filter: brightness(1.15) drop-shadow(0 2px 3px rgba(0, 0, 0, 0.45));
}

.civi-hg-mini-shadow { fill: rgba(0, 0, 0, 0.26); }
.civi-hg-base   { fill: #c9b79c; stroke: #6f5a44; stroke-width: 0.6; }
.civi-hg-face   { fill: #b59a78; }
.civi-hg-roof   { fill: #7d5b46; stroke: #4f3a2c; stroke-width: 0.5; }
.civi-hg-window { fill: #cfe6f5; stroke: rgba(40, 60, 75, 0.45); stroke-width: 0.3; }
.civi-hg-door   { fill: #4a382c; }
.civi-hg-detail { stroke: #5a4636; stroke-width: 0.9; stroke-linecap: round; fill: none; }
.civi-hg-step   { fill: #b7a489; }
.civi-hg-awning { stroke: #b8443c; stroke-width: 1.2; fill: none; stroke-linecap: round; }
.civi-hg-flag   { fill: #c64b43; }
.civi-hg-rail   { stroke: #8a96a0; stroke-width: 0.8; stroke-linecap: round; }
.civi-hg-stone  { fill: #9aa0a4; stroke: #5b6064; stroke-width: 0.5; }
.civi-hg-field  { fill: #5fa36a; }
.civi-hg-fieldline { stroke: rgba(255, 255, 255, 0.7); stroke-width: 0.5; }
.civi-hg-fieldline-stroke { fill: none; stroke: rgba(255, 255, 255, 0.7); stroke-width: 0.5; }
.civi-hg-goal   { fill: rgba(255, 255, 255, 0.5); stroke: #4d5a52; stroke-width: 0.4; }
.civi-hg-green  { fill: #6aa66f; }
.civi-hg-tree   { fill: #4f8a55; }
.civi-hg-trunk  { fill: #6f5236; }
.civi-hg-sand   { fill: #d9c69a; }
.civi-hg-street { fill: #6e6f73; }
.civi-hg-water  { fill: #3d7299; }
.civi-hg-waterline { stroke: rgba(220, 244, 255, 0.5); stroke-width: 0.5; }
.civi-hg-quay   { fill: #8a7d68; }

.civi-hg-mini-ring {
  stroke: rgba(0, 0, 0, 0.45);
  stroke-width: 0.5;
}

.civi-hg-place-label {
  display: none !important;
}

.civi-hg-place-menu {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    max(18px, env(safe-area-inset-top))
    max(18px, env(safe-area-inset-right))
    max(18px, env(safe-area-inset-bottom))
    max(18px, env(safe-area-inset-left));
  color: #fff;
}

.civi-hg-place-menu[hidden] { display: none; }

.civi-hg-place-menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 8, 13, 0.72);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  cursor: pointer;
}

.civi-hg-place-menu-card {
  position: relative;
  width: min(520px, 100%);
  max-height: min(760px, calc(100dvh - 36px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(20px, 4vw, 30px);
  border: 1px solid rgba(232, 242, 250, 0.34);
  border-radius: 20px;
  background: linear-gradient(155deg, rgba(31, 43, 55, 0.97), rgba(10, 18, 27, 0.97));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.58);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.civi-hg-place-menu-kicker {
  margin: 0 0 6px;
  color: #bcd0df;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.civi-hg-place-menu-title {
  margin: 0 0 14px;
  color: #fff;
  font-size: clamp(1.45rem, 4vw, 2rem);
  line-height: 1.12;
}

/* Civication kartidentitet (fra read-modellen CivicationCityMap) */
.civi-hg-place-menu-role {
  margin: 0 0 18px;
}

.civi-hg-place-menu-role-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
}

.civi-hg-place-menu-role-name {
  color: #dfeaf2;
  font-size: 0.9rem;
  font-weight: 700;
}

.civi-hg-place-menu-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(127, 185, 138, 0.22);
  border: 1px solid rgba(127, 185, 138, 0.55);
  color: #bfe6c7;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.civi-hg-place-menu-role-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.civi-hg-place-menu-role-tags li {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(238, 247, 252, 0.08);
  border: 1px solid rgba(226, 239, 248, 0.24);
  color: #cddbe6;
  font-size: 0.72rem;
}

.civi-hg-place-menu-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.civi-hg-place-menu-actions button {
  min-height: 46px;
  padding: 10px 13px;
  border: 1px solid rgba(226, 239, 248, 0.42);
  border-radius: 12px;
  background: rgba(238, 247, 252, 0.09);
  color: #fff;
  font: inherit;
  font-weight: 750;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}

.civi-hg-place-menu-actions button:hover,
.civi-hg-place-menu-actions button:focus-visible {
  border-color: rgba(245, 250, 255, 0.82);
  background: rgba(218, 237, 249, 0.18);
  outline: none;
}

.civi-hg-place-menu-actions button:first-child {
  border-color: rgba(178, 220, 246, 0.68);
  background: rgba(75, 139, 178, 0.34);
}

.civi-hg-place-menu-section,
.civi-hg-place-menu-feedback {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(225, 239, 248, 0.2);
  border-radius: 13px;
  background: rgba(2, 9, 15, 0.32);
}

.civi-hg-place-menu-section[hidden],
.civi-hg-place-menu-feedback[hidden] { display: none; }

.civi-hg-place-menu-section h3 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 1rem;
}

.civi-hg-place-menu-section ul {
  margin: 0;
  padding-left: 20px;
}

.civi-hg-place-menu-section li + li { margin-top: 6px; }

.civi-hg-place-menu-empty {
  margin: 0;
  color: #c4d0d9;
}

.civi-hg-place-menu-feedback {
  color: #dceaf3;
  line-height: 1.45;
}

@media (max-width: 540px) {
  .civi-hg-place-menu {
    align-items: flex-end;
    padding-left: max(10px, env(safe-area-inset-left));
    padding-right: max(10px, env(safe-area-inset-right));
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }

  .civi-hg-place-menu-card {
    width: 100%;
    max-height: min(82dvh, calc(100dvh - env(safe-area-inset-top) - 18px));
    border-radius: 18px;
  }

  .civi-hg-place-menu-actions { grid-template-columns: 1fr; }
  .civi-hg-place-menu-actions button { text-align: center; }
}

.civi-map-zoom-controls {
  position: absolute;
  right: 16px;
  bottom: calc(var(--footer-h, 64px) + 24px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 6;
  pointer-events: none;
}

.civi-map-zoom-btn {
  pointer-events: auto;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(18, 26, 35, 0.78);
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}
.civi-map-zoom-btn:hover { background: rgba(34, 44, 56, 0.85); }
.civi-map-zoom-btn:active { transform: translateY(1px); }

body.civi-mapmode #civiMapWorld { touch-action: none; }
