/* Map page: full-viewport layout for iOS Safari (scoped — do not put on global pages) */
html,
body {
  margin: 0;
  padding: 0;
  height: 100vh; /* fallback for older browsers */
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  background: #000;
  color-scheme: dark;
  scrollbar-gutter: stable;
}

body {
  position: relative;
  display: block;
  max-width: 100%;
}

/* Overlay header: transparent with soft top darkening */
.navbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.78) 0%,
    rgba(0, 0, 0, 0.42) 50%,
    rgba(0, 0, 0, 0) 100%
  );
  padding-top: calc(20px + env(safe-area-inset-top, 0px));
  box-shadow: none;
}

.navbar .menu-mobile .logo h3,
.navbar .links .link {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
}

/* Keep header spacing identical to other pages without showing the language button */
.lang-switcher--spacer {
  visibility: hidden;
  pointer-events: none;
}

/* Map fills the entire viewport under the overlay header */
#embedded-page {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100vh; /* fallback */
  height: 100dvh;
  display: block;
  overflow: hidden;
  overscroll-behavior: none;
  background: #000;
  z-index: 0;
}

#embedded-page iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Copyright watermark — equal inset from left and bottom */
.map-copyright {
  --map-copyright-inset: 12px;
  position: absolute;
  left: max(var(--map-copyright-inset), env(safe-area-inset-left, 0px));
  bottom: max(var(--map-copyright-inset), env(safe-area-inset-bottom, 0px));
  z-index: 2;
  margin: 0;
  padding: 0;
  color: rgba(210, 208, 208, 0.55);
  font-size: 13px;
  line-height: 1.3;
  pointer-events: none;
  user-select: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

.map-copyright span {
  color: inherit;
}

@media screen and (max-width: 819px) {
  .map-copyright {
    --map-copyright-inset: 10px;
    font-size: 11px;
    max-width: calc(100% - 24px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media screen and (max-width: 380px) {
  .map-copyright {
    font-size: 10px;
  }
}

/* Keep mobile dropdowns readable over the map */
@media screen and (max-width: 867px) {
  .navbar {
    padding-top: calc(20px + env(safe-area-inset-top, 0px));
  }

  .navbar .links {
    background: rgba(36, 39, 43, 0.94);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
}
