/* Mapa publiczna. */
.layout { display: flex; height: calc(100% - 64px); }
.panel { width: 380px; flex: none; display: flex; flex-direction: column; background: var(--white); border-right: 1px solid var(--line); z-index: 2; }
.panel-toggle { display: none; }
.panel-body { display: flex; flex-direction: column; gap: 14px; padding: 20px; overflow: hidden; height: 100%; }
.lead { margin: 0; font-size: 15px; color: var(--muted); }
.lead strong { color: var(--dark-blue); font-size: 26px; font-weight: 700; display: block; line-height: 1.2; }

.search input {
  width: 100%; height: 44px; padding: 0 16px 0 42px; border: 1px solid var(--line); border-radius: 999px; background: var(--grey)
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%23575757' stroke-width='2'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='m13 13 4 4'/%3E%3C/svg%3E") no-repeat 16px center;
  outline: none; transition: border-color .15s, background-color .15s;
}
.search input:focus { border-color: var(--blue); background-color: var(--white); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--white); font-size: 13px; font-weight: 600; color: var(--dark-blue); cursor: pointer; transition: all .15s;
}
.chip .n { color: var(--muted); font-weight: 500; }
.chip[aria-pressed="false"] { opacity: .45; }
.chip:hover { border-color: var(--c, var(--blue)); }

.list { list-style: none; margin: 0 -8px; padding: 0; overflow-y: auto; flex: 1; }
.list li button {
  width: 100%; display: flex; gap: 12px; align-items: flex-start; padding: 10px 8px; border: 0; border-radius: 10px; background: transparent;
  text-align: left; cursor: pointer;
}
.list li button:hover, .list li button:focus-visible { background: var(--grey); outline: none; }
.list .dot { margin-top: 6px; }
.list .name { font-weight: 600; color: var(--dark-blue); }
.list .meta { font-size: 13px; color: var(--muted); }
.empty { color: var(--muted); font-size: 14px; }

.map-wrap { position: relative; flex: 1; }
#map { position: absolute; inset: 0; }

/* Karta punktu (popup) */
.maplibregl-popup-content { padding: 0; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; font-family: var(--font); }
.maplibregl-popup-close-button { width: 32px; height: 32px; font-size: 22px; color: var(--white); text-shadow: 0 1px 4px rgba(0, 0, 0, .5); z-index: 2; }
.card { width: 300px; }
.card-photo { position: relative; height: 170px; background: var(--grey); }
.card-photo img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; display: block; }
.card-photo .more { position: absolute; right: 10px; bottom: 10px; padding: 3px 10px; border-radius: 999px; background: rgba(0, 52, 84, .8); color: var(--white); font-size: 12px; font-weight: 600; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.card-title { margin: 0; font-size: 18px; font-weight: 700; color: var(--dark-blue); }
.card-region { margin: 0; font-size: 13px; color: var(--muted); }
.card-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.card-desc { margin: 4px 0 0; font-size: 14px; line-height: 1.45; }
.card .btn { margin-top: 8px; align-self: flex-start; }

/* Podgląd zdjęć */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; }
.lightbox::backdrop { background: rgba(0, 20, 34, .88); }
.lightbox img { display: block; max-width: 92vw; max-height: 86vh; border-radius: 10px; }
.lightbox-close, .lightbox-nav { position: fixed; border: 0; background: rgba(255, 255, 255, .14); color: var(--white); cursor: pointer; border-radius: 50%; width: 46px; height: 46px; font-size: 28px; line-height: 1; }
.lightbox-close { top: 18px; right: 18px; }
.lightbox-nav { top: 50%; transform: translateY(-50%); }
.lightbox-nav.prev { left: 18px; } .lightbox-nav.next { right: 18px; }
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(255, 255, 255, .28); }

.noscript { padding: 20px; }

@media (max-width: 860px) {
  .layout { flex-direction: column-reverse; height: calc(100% - 56px); }
  .panel { width: 100%; border-right: 0; border-top: 1px solid var(--line); max-height: 52px; transition: max-height .25s; }
  .panel.open { max-height: 62%; }
  .panel-toggle {
    display: flex; align-items: center; justify-content: center; gap: 8px; height: 52px; flex: none; border: 0; background: var(--white);
    font-weight: 600; color: var(--dark-blue); cursor: pointer;
  }
  .panel-toggle .count { color: var(--muted); font-weight: 500; }
  .panel-body { padding: 0 16px 16px; }
  .card { width: 260px; }
  .card-photo { height: 140px; }
}

/* Osadzenie na stronie (iframe, ?embed=1): bez paska górnego. */
.embed .topbar { display: none; }
.embed .layout { height: 100%; }
