* {
  touch-action: none;
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
}

#map {
  width: 100dvw;
  height: 100dvh;
}

#overlay {
  display: none;
}

.overlay-line {
  color: #e8e8eb;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  line-height: 1.25;
  background: rgba(16, 16, 20, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0.375rem;
  padding: 0.25rem 0.5rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  opacity: 0;
  transform: translate3d(0, 8px, 0);
  will-change: transform, opacity;
}

@keyframes riseFade {
  0% {
    opacity: 0;
    transform: translate3d(0, 8px, 0);
  }

  10% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }

  90% {
    opacity: 1;
    transform: translate3d(0, -16px, 0);
  }

  100% {
    opacity: 0;
    transform: translate3d(0, -24px, 0);
  }
}

.overlay-line.show {
  animation: riseFade 5s ease-in forwards;
}

.overlay-line.exit {
  transition: opacity .15s ease, transform .15s ease;
  opacity: 0 !important;
  transform: translate3d(0, -6px, 0) !important;
}

/* Canvas overlay sits above map */
#overlay-canvas {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100dvw;
  height: auto;
  /* height controlled by script to show exactly 5 lines */
  pointer-events: none;
  z-index: 900;
  display: block;
}

.github-link {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
  color: #fff;
  padding: 0.75rem;
  transition: opacity 0.2s ease;
  text-decoration: none;
}

.github-link:hover {
  opacity: 0.7;
}

.geo-popup .maplibregl-popup-content {
  background: rgba(16, 16, 20, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.75rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #e8e8eb;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji";
  font-weight: 400;
  font-size: 14px;
  display: inline-flex;
  align-items: flex-start;
  gap: 0.5rem;
  white-space: nowrap;
  pointer-events: none;
  width: max-content;
  overflow: visible;
}

.geo-popup {
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.1s ease-out;
  pointer-events: none !important;
  max-width: none;
  /* override MapLibre's default 240px max-width */
}

.geo-popup .maplibregl-popup-content,
.geo-popup .maplibregl-popup-tip {
  pointer-events: none;
  transform: translateY(8px);
  transition: transform 0.18s ease-out, opacity 0.12s ease-out;
  will-change: transform, opacity;
}

.geo-popup.fade-in {
  opacity: 1;
}

.geo-popup.fade-in .maplibregl-popup-content,
.geo-popup.fade-in .maplibregl-popup-tip {
  transform: translateY(0px);
}

/* Hierarchy for country / region / city */
.geo-popup .maplibregl-popup-content {
  font-weight: 700;
  color: #ffff00;
  text-shadow:
    1px 1px #000;
}

.geo-popup .maplibregl-popup-content img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 0.5rem;
  object-fit: cover;
  z-index: -1;
}


#bmc-wbtn {
  right: 28px !important;
  top: 82px !important;
  left: auto !important;
  bottom: auto !important;
  width: 40px !important;
  height: 40px !important;
  background-color: #FFF !important;

  img {
    width: 24px !important;
    height: 24px !important;
  }
}

#ip2attrib {
  position: fixed;
  bottom: 40px;
  right: 9px;
  min-height: 25px;
  background-color: hsla(0, 0%, 100%, 1.0);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
  font-size: 12px;
  color: #000000BF;
  line-height: 0.9;

  div {
    padding-right: 28px;
    padding-left: 10px;
  }

  a {
    color: inherit;
    text-decoration: none;

    &:hover {
      text-decoration: underline;
    }
  }

  summary {
    display: block;
    background-color: hsla(0, 0%, 100%, 1.0);
  }
}
