/*
 * Yollar üzrə xəritə — the temporary OpenStreetMap presentation (Views/RoadsMap/_OpenStreetMap.cshtml).
 * Loaded after leaflet.css and roads-map.css, on this page only. The frame follows the designed map stage it
 * stands in for (roads-map.css): white, rounded 16px on phones and 12px on desktop, the same side gutters and the
 * same 1440px column. The height is reserved in CSS before Leaflet runs, so nothing shifts when it does.
 */

.aayda-roads-osm {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 16px 16px 28px;
}

.aayda-roads-osm__map {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  height: 70vh;
  height: 70dvh;
  min-height: 360px;
  max-height: 760px;
  overflow: hidden;
  background: var(--aayda-colors-base-white);
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px #e2e7ec;
  /* Leaflet's own panes sit at z-index 400+; keep them under the site header's menus and dialogs. */
  isolation: isolate;
  z-index: 0;
}

.aayda-roads-osm__map:focus-visible {
  outline: 2px solid var(--aayda-colors-navy-900);
  outline-offset: 2px;
}

.aayda-roads-osm__fallback {
  margin: 0;
  padding: 24px;
  color: var(--aayda-colors-navy-900);
  font-family: var(--aayda-typography-font-primary);
}

/* The attribution stays visible and legible on every width, as the tile licence requires. */
.aayda-roads-osm .leaflet-control-attribution {
  font-family: var(--aayda-typography-font-primary);
  font-size: 11px;
  line-height: 16px;
}

.aayda-roads-osm .leaflet-control-zoom a {
  font-family: var(--aayda-typography-font-primary);
}

.aayda-roads-osm .leaflet-control-zoom a:focus-visible {
  outline: 2px solid var(--aayda-colors-navy-900);
  outline-offset: 0;
}

@media (min-width: 768px) {
  .aayda-roads-osm {
    padding: 24px 32px 48px;
  }

  .aayda-roads-osm__map {
    height: 72vh;
    height: 72dvh;
    min-height: 480px;
    max-height: 820px;
  }
}

@media (min-width: 1416px) {
  .aayda-roads-osm {
    max-width: 1440px;
    margin: 0 auto;
    padding: 48px 84px 120px;
  }

  .aayda-roads-osm__map {
    height: 760px;
    max-height: none;
    border-radius: 12px;
  }
}
