body {
  padding-top: 0;
  margin: 0;
}
body.overflow-hiden {
  overflow: hidden;
}
#map{
  height: 100dvh;
  width: 100dvw;
}

.delivery-info{
  display: flex;
  flex-direction: column;
  gap: 0.36em;
  flex: 1;
  font-size: 14px;
  width: 9em;
  background-color: rgba(255, 255, 255, 0.45);
  border-radius: 0.75em;
  padding: 0.75em;
  line-height: 1.25em;
  transition: font-size 0.3s ease;
}

/* center to marker */
.delivery-info {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  text-align: center;
  /* Optional: allow map interactions through it */
}

.delivery-info__title{
  font-size: 1em;
  font-weight: 600;
  line-height: 1.12em;
}
.delivery-info__short{
  font-size: 1em;
  font-weight: 600;
  line-height: 1.12em;
  display: none;
}
.delivery-info__description{
  font-size: 0.75em;
  line-height: 1.12em;
  font-weight: 400;
}

/* Authored line breaks are carried as <br> from descriptionHtml() in public.js.
   Nothing on this subtree may re-enable wrapping — not white-space, not
   text-wrap — or Leaflet's popup width measurement collapses to the longest
   word. See the comment on that function. */

/* Sizes come from labelScale() in public.js as an inline font-size; these rules
   only carry the states that hiding a node would otherwise require — the
   markers are created once and must not be rebuilt on zoom. */
.delivery-info.is-compact .delivery-info__description {
  display: none;
}

/* The 9em column above exists to wrap the description into a readable block.
   With the description hidden there is nothing to wrap, and the fixed width
   leaves a backdrop ten times wider than a «№7» — neighbouring districts then
   collide as translucent rectangles long before their glyphs would touch.
   max-content, not auto: for an absolutely positioned box with left set, auto
   means shrink-to-fit, and the containing block is Leaflet's 12x12 icon, so the
   available width is ~2px and min-content wins. min-content breaks at spaces,
   not at letters — "Район 7" would stack onto two lines and a four-word name
   onto four. In the abbreviated 8-9 band "№7" has no space to break on, so auto
   would be identical there; the difference only shows at zoom 10-11.
   max-width keeps a very long title from growing past today's box. */
.delivery-info.is-compact {
  width: max-content;
  max-width: 9em;
  padding: 0.3em 0.5em;
}

.delivery-info.is-hidden {
  display: none;
}

.delivery-info.is-abbreviated .delivery-info__title {
  display: none;
}

.delivery-info.is-abbreviated .delivery-info__short {
  display: block;
}
