/* Publiczna mapa /mapa – Made in Karpaty (mobile-first, responsywna) */

#mapa-sekcja { padding: 1.5rem 0 2.5rem; }
#mapa-sekcja .mik-map-intro { max-width: 52rem; margin: 0 auto 1.25rem; text-align: center; color: #555; }

/* ---------- kontener mapy ---------- */
.mik-map-wrap {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #dfe3e6;
  border-radius: .5rem;
  overflow: hidden;
  scroll-margin-top: 90px;
}
.mik-map-stage { position: relative; display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }

#mik-map {
  position: relative;
  isolation: isolate;          /* panele Leaflet (z-index do 1000) nie nachodzą na menu strony */
  width: 100%;
  height: 70vh;
  height: 70dvh;
  min-height: 380px;
  max-height: 760px;
  background: #e9ecef;
  font-family: inherit;
}

/* ---------- filtry ---------- */
.mik-map-filters {
  display: flex;
  gap: .5rem;
  padding: .6rem .75rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: #f8f9fa;
  border-bottom: 1px solid #dfe3e6;
  scrollbar-width: thin;
}
.mik-map-filters[hidden] { display: none; }
.mik-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 40px;
  padding: .3rem .85rem;
  border: 1px solid #ced4da;
  border-radius: 2rem;
  background: #fff;
  color: #2d2d2d;
  font: inherit;
  font-size: .9rem;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}
.mik-chip:focus-visible { outline: 3px solid #fad41f; outline-offset: 2px; }
.mik-chip .mik-dot { width: .8rem; height: .8rem; border-radius: 50%; background: var(--c, #1f4e3d); flex: 0 0 auto; }
.mik-chip[aria-pressed="false"] { opacity: .55; background: #f1f3f5; }
.mik-chip[aria-pressed="false"] .mik-dot { background: #adb5bd; }
.mik-chip-all { font-weight: 700; }

/* ---------- markery ---------- */
.mik-pin-wrap { background: none; border: 0; }
.mik-pin {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50% 50% 50% 0;
  background: var(--c, #1f4e3d);
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .45);
  transform: rotate(-45deg);
}
.mik-pin i { transform: rotate(45deg); color: #fff; font-size: 14px; }
.mik-user {
  width: 16px; height: 16px; border-radius: 50%;
  background: #1a73e8; border: 3px solid #fff; box-shadow: 0 0 0 2px rgba(26, 115, 232, .35);
}

/* ---------- popup ---------- */
.mik-popup { font-family: inherit; }
.mik-popup img { display: block; width: 100%; max-height: 130px; object-fit: cover; border-radius: .25rem; margin-bottom: .5rem; }
.mik-popup h3 { margin: 0 0 .25rem; font-size: 1.05rem; line-height: 1.3; }
.mik-popup .mik-popup-grp { font-size: .78rem; color: #666; margin-bottom: .25rem; }
.mik-popup p { margin: .3rem 0; font-size: .9rem; line-height: 1.4; }
.mik-popup .mik-popup-adres { color: #555; font-size: .82rem; }
.leaflet-container a.mik-popup-link,
.mik-popup-link {
  display: inline-block;
  margin-top: .4rem;
  padding: .4rem .8rem;
  border-radius: .3rem;
  background: var(--primary-color, #1f4e3d);
  color: #fff !important;
  font-size: .88rem;
  text-decoration: none;
}
.leaflet-popup-content { margin: 12px 14px; }
.leaflet-popup-content-wrapper { border-radius: .5rem; }

/* ---------- kontrolki ---------- */
.leaflet-bar a.mik-ctrl {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; line-height: 1; font-size: 15px; color: #333; cursor: pointer;
}
.leaflet-bar a.mik-ctrl:focus-visible { outline: 3px solid #fad41f; }

/* podpowiedź „dwoma palcami” (urządzenia dotykowe) */
.mik-map-hint {
  position: absolute; inset: 0; z-index: 1100;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem; text-align: center; color: #fff; font-size: 1rem;
  background: rgba(0, 0, 0, .55);
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.mik-map-hint.is-visible { opacity: 1; }

/* ---------- pełny ekran ---------- */
body.mik-lock { overflow: hidden; }
.mik-map-wrap.is-full {
  position: fixed; inset: 0; z-index: 2000;
  height: 100vh; height: 100dvh;
  margin: 0; border: 0; border-radius: 0;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.mik-map-wrap.is-full #mik-map { flex: 1 1 auto; height: auto; max-height: none; min-height: 0; }

/* ---------- lista miejsc ---------- */
.mik-list-title { margin: 2rem 0 1rem; font-size: 1.5rem; }
.mik-place {
  height: 100%;
  padding: .85rem 1rem;
  border: 1px solid #dfe3e6;
  border-left: 5px solid var(--c, #1f4e3d);
  border-radius: .4rem;
  background: #fff;
}
.mik-place[hidden] { display: none; }
.mik-place h3 { margin: 0 0 .25rem; font-size: 1.05rem; line-height: 1.3; }
.mik-place h3 a { color: inherit; text-decoration: none; }
.mik-place h3 a:hover { text-decoration: underline; }
.mik-place .mik-place-meta { font-size: .85rem; color: #666; margin-bottom: .5rem; }
.mik-place .mik-show {
  min-height: 40px; padding: .3rem .8rem;
  border: 1px solid var(--primary-color, #1f4e3d); border-radius: .3rem;
  background: #fff; color: var(--primary-color, #1f4e3d); font: inherit; font-size: .88rem; cursor: pointer;
}
.mik-place .mik-show:hover, .mik-place .mik-show:focus-visible { background: var(--primary-color, #1f4e3d); color: #fff; }
.mik-empty { text-align: center; color: #666; padding: 1.5rem 0; }

/* ---------- telefony ---------- */
@media (max-width: 575.98px) {
  #mapa-sekcja { padding: 1rem 0 2rem; }
  /* mapa na pełną szerokość ekranu (wyrównanie do krawędzi) */
  .mik-map-wrap {
    margin-left: calc(var(--bs-gutter-x, 1.5rem) * -.5);
    margin-right: calc(var(--bs-gutter-x, 1.5rem) * -.5);
    border-left: 0; border-right: 0; border-radius: 0;
  }
  #mik-map { height: 62vh; height: 62dvh; min-height: 340px; }
  .leaflet-bar a.mik-ctrl,
  .leaflet-touch .leaflet-bar a { width: 40px; height: 40px; line-height: 40px; }
  .leaflet-bar a.mik-ctrl { line-height: 1; font-size: 17px; }
  .mik-list-title { font-size: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  .mik-map-hint { transition: none; }
}
