/**
 * Geo Finder — style frontendu.
 * Wszystkie selektory używają BEM (.geo-finder__element--modifier),
 * by minimalizować ryzyko konfliktów ze stylami motywu.
 */

.geo-finder {
    --gf-surface: #fff;
    --gf-surface-muted: #f7f7f5;
    --gf-text: #171717;
    --gf-muted: #666;
    --gf-border: #deded8;
    --gf-accent: #1d1d1b;
    --gf-accent-hover: #000;
    --gf-focus: #2271b1;
    font-family: inherit;
    color: var(--gf-text);
    box-sizing: border-box;
    position: relative;
    width: 100%;
}
.geo-finder *, .geo-finder *::before, .geo-finder *::after { box-sizing: inherit; }

/* Pasek wyszukiwania i filtrów — neutralny, typograficzny styl pasujący do WM. */
.geo-finder__controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
    padding: 12px;
    background: var(--gf-surface);
    border: 1px solid var(--gf-border);
    border-radius: 2px;
}
.geo-finder__search {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.geo-finder__search-input,
.geo-finder__radius-select,
.geo-finder__filter {
    min-height: 42px;
    border: 1px solid var(--gf-border);
    border-radius: 2px;
    background: var(--gf-surface);
    color: var(--gf-text);
    font: inherit;
    font-size: 14px;
}
.geo-finder__search-input {
    flex: 1 1 260px;
    padding: 9px 12px;
}
.geo-finder__search-btn,
.geo-finder__clear-search-btn,
.geo-finder__geo-btn {
    min-height: 42px;
    padding: 9px 18px;
    border: 1px solid var(--gf-accent);
    border-radius: 2px;
    background: var(--gf-accent);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .02em;
}
.geo-finder__clear-search-btn[hidden] { display: none; }
.geo-finder__clear-search-btn,
.geo-finder__geo-btn {
    background: var(--gf-surface);
    color: var(--gf-text);
}
.geo-finder__search-btn:hover,
.geo-finder__search-btn:focus-visible { background: var(--gf-accent-hover); border-color: var(--gf-accent-hover); }
.geo-finder__geo-btn:hover,
.geo-finder__geo-btn:focus-visible { background: var(--gf-surface-muted); }
.geo-finder__radius {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 0 0 4px;
    font-size: 13px;
    color: var(--gf-muted);
    white-space: nowrap;
}
.geo-finder__radius-select {
    min-width: 86px;
    padding: 8px 10px;
}
.geo-finder__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.geo-finder__filter {
    min-width: 140px;
    padding: 8px 10px;
}

/* Layout: mapa + lista */
.geo-finder__layout { display: flex; gap: 16px; align-items: stretch; width: 100%; }
.geo-finder__layout--both { flex-direction: column; }
.geo-finder__layout--both .geo-finder__map-wrap { width: 100%; min-width: 0; }
.geo-finder__layout--both .geo-finder__list { width: 100%; min-width: 0; overflow: visible; }
.geo-finder__layout--map .geo-finder__map-wrap { width: 100%; }
.geo-finder__layout--list .geo-finder__list { width: 100%; }
@media (max-width: 1024px) {
    .geo-finder__map { height: var(--gf-map-height-tablet, 650px) !important; }
}

@media (max-width: 768px) {
    .geo-finder__layout { flex-direction: column; }
    .geo-finder__layout--both .geo-finder__map-wrap,
    .geo-finder__layout--both .geo-finder__list { flex: 1 1 auto; min-width: 0; }
    .geo-finder__map { height: var(--gf-map-height-mobile, 460px) !important; }
}

/* Mapa */
.geo-finder__map { width: 100%; min-height: 240px; border-radius: 6px; overflow: hidden; }

.geo-finder-user-marker {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #2271b1;
    border: 3px solid #fff;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.25);
}


/* 1.0.9 — Leaflet layout hardening.
 * Niektóre motywy i page buildery nadpisują style obrazków lub pozycjonowania.
 * To powoduje niepełne/porozrzucane kafelki. Poniższe reguły są celowo
 * zawężone do kontenera Geo Finder, żeby nie wpływać na inne mapy w serwisie.
 */
.geo-finder .leaflet-container {
    width: 100%;
    height: 100%;
    min-height: inherit;
    position: relative;
    overflow: hidden;
}
.geo-finder .leaflet-pane,
.geo-finder .leaflet-tile,
.geo-finder .leaflet-marker-icon,
.geo-finder .leaflet-marker-shadow,
.geo-finder .leaflet-tile-container,
.geo-finder .leaflet-pane > svg,
.geo-finder .leaflet-pane > canvas,
.geo-finder .leaflet-zoom-box,
.geo-finder .leaflet-image-layer,
.geo-finder .leaflet-layer {
    position: absolute;
    left: 0;
    top: 0;
}
.geo-finder .leaflet-tile {
    max-width: none !important;
    max-height: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    box-shadow: none !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}
.geo-finder .leaflet-container img,
.geo-finder .leaflet-container svg {
    max-width: none !important;
}
.geo-finder .leaflet-container .leaflet-control img {
    max-width: 100% !important;
}

/* Lista wyników — karty zamiast surowych wierszy. */
.geo-finder__list-status {
    min-height: 1.4em;
    padding: 4px 2px 10px;
    color: var(--gf-muted);
    font-size: 13px;
}
.geo-finder__list-items { list-style: none; padding: 0; margin: 0; }
.geo-finder__list-item {
    position: relative;
    padding: 18px 20px;
    border: 1px solid var(--gf-border);
    border-left: 4px solid var(--gf-card-accent, var(--gf-accent));
    border-radius: 2px;
    background: var(--gf-surface);
    box-shadow: 0 2px 9px rgba(0, 0, 0, 0.045);
    transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}
.geo-finder__list-item:hover {
    border-color: #c8c8c1;
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}
.geo-finder__list-item--active {
    background: #fafaf8;
    border-color: var(--gf-card-accent, var(--gf-accent));
}
.geo-finder__list-item-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.geo-finder__list-item-title {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 8px;
    margin: 0;
    color: var(--gf-text);
    font-size: 16px;
    line-height: 1.35;
    font-weight: 750;
}
.geo-finder__list-item-title > span:last-child {
    min-width: 0;
    overflow-wrap: break-word;
}
.geo-finder__list-item-distance {
    flex: 0 0 auto;
    color: var(--gf-muted);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}
.geo-finder__list-item-details {
    display: grid;
    gap: 7px;
    margin-top: 12px;
}
.geo-finder__list-item-meta {
    display: grid;
    grid-template-columns: minmax(74px, auto) 1fr;
    gap: 8px;
    margin: 0;
    color: var(--gf-muted);
    font-size: 13px;
    line-height: 1.45;
}
.geo-finder__list-item-label {
    color: var(--gf-text);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .045em;
    text-transform: uppercase;
}
.geo-finder__list-item-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #ecece7;
}
.geo-finder__list-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 6px 11px;
    border: 1px solid var(--gf-accent);
    border-radius: 2px;
    background: var(--gf-surface);
    color: var(--gf-text) !important;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
    cursor: pointer;
}
.geo-finder__list-action--primary {
    background: var(--gf-accent);
    color: #fff !important;
}
.geo-finder__list-action:hover,
.geo-finder__list-action:focus-visible { background: var(--gf-surface-muted); }
.geo-finder__list-action--primary:hover,
.geo-finder__list-action--primary:focus-visible { background: var(--gf-accent-hover); border-color: var(--gf-accent-hover); }

/* 2.33.13: klientowe stronicowanie listy; mapa zachowuje komplet punktów. */
.geo-finder__pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 18px;
}
.geo-finder__pagination[hidden] { display: none !important; }
.geo-finder__pagination-button {
    min-height: 40px;
    padding: 8px 14px;
    border: 1px solid var(--gf-accent);
    border-radius: 3px;
    background: var(--gf-surface);
    color: var(--gf-text);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.geo-finder__pagination-button:hover:not(:disabled),
.geo-finder__pagination-button:focus-visible:not(:disabled) { background: var(--gf-surface-muted); }
.geo-finder__pagination-button:disabled { opacity: .45; cursor: default; }
.geo-finder__pagination-status { color: var(--gf-muted); font-size: 13px; font-weight: 700; white-space: nowrap; }

/* Popup mapy — własna powierzchnia, żeby motyw nie „przeświecał” przez Leafleta. */
.geo-finder .leaflet-popup-content-wrapper {
    background: var(--gf-surface) !important;
    color: var(--gf-text) !important;
    border: 1px solid rgba(0, 0, 0, .14) !important;
    border-radius: 4px !important;
    box-shadow: 0 8px 26px rgba(0, 0, 0, .22) !important;
}
.geo-finder .leaflet-popup-tip {
    background: var(--gf-surface) !important;
    box-shadow: 3px 3px 8px rgba(0, 0, 0, .10) !important;
}
.geo-finder .leaflet-popup-content {
    margin: 15px 18px !important;
    min-width: min(280px, calc(100vw - 72px));
    max-width: min(390px, calc(100vw - 72px));
    color: var(--gf-text) !important;
    font: inherit !important;
    font-size: 14px !important;
    line-height: 1.45 !important;
}
.geo-finder-popup { min-width: 0; max-width: 390px; }
@media (max-width: 600px) {
    .geo-finder .leaflet-popup-content { max-height: min(48vh, 340px); overflow-y: auto; overscroll-behavior: contain; }
    .geo-finder .leaflet-popup-content img { max-width: 100%; height: auto; }
}
.geo-finder .leaflet-popup-content .geo-finder-popup { width: auto; }
.geo-finder-popup-title,
.geo-finder-popup-meta { overflow-wrap: anywhere; word-break: break-word; }
.geo-finder-popup-title {
    margin: 0 0 10px;
    color: var(--gf-text);
    font-size: 17px;
    line-height: 1.3;
    font-weight: 750;
    white-space: normal;
}
.geo-finder-popup-excerpt { color: var(--gf-muted); font-style: italic; }
.geo-finder-popup-meta { margin: 0 0 7px; color: #444; font-size: 13px; line-height: 1.5; }
.geo-finder-popup-meta strong { color: var(--gf-text); }
.geo-finder-popup-meta a:not(.geo-finder-contact-button) { color: var(--gf-text); text-decoration-thickness: 1px; text-underline-offset: 2px; }
.geo-finder-popup-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding-top: 11px;
    border-top: 1px solid #ecece7;
}
.geo-finder-popup-actions a,
.geo-finder .geo-finder-contact-button {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 10px;
    border: 1px solid var(--gf-accent);
    border-radius: 2px;
    background: var(--gf-accent);
    color: #fff !important;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
}
.geo-finder-popup-actions a:hover,
.geo-finder .geo-finder-contact-button:hover { background: var(--gf-accent-hover); border-color: var(--gf-accent-hover); }

/* ----- 0.4/1.1.2: Niestandardowe ikony markerów (emoji + kolor) ----- */
.geo-finder-marker-wrap {
    background: transparent !important;
    border: 0 !important;
    width: 34px !important;
    height: 42px !important;
}
.geo-finder-marker {
    width: 34px;
    height: 42px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    transform-origin: 50% 50%;
    border: 2px solid rgba(0,0,0,0.25);
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    line-height: 1;
}
.geo-finder-marker > span {
    transform: rotate(45deg);
    font-size: 18px;
    line-height: 1;
}
.geo-finder-marker__dot {
    display: block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.35);
}
/* Fallback bezpieczeństwa, gdy gdzieś poza głównym kodem pojawi się domyślny marker Leaflet. */
.geo-finder .leaflet-marker-icon[alt="Marker"] {
    min-width: 25px !important;
    min-height: 41px !important;
}

/* Ikona obok tytułu na liście wyników */
.geo-finder__list-item-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    color: #fff;
    font-size: 13px;
    margin-right: 6px;
    vertical-align: middle;
}

/* ============================================================
 *  0.5 — Toolbar mapy (share, fullscreen, print)
 * ============================================================ */

.geo-finder__map-wrap {
    position: relative;
    scroll-margin-top: var(--geo-finder-scroll-offset, 24px);
}

.geo-finder__toolbar {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 1000; /* powyżej kafelków Leaflet, poniżej popupów */
    display: flex;
    gap: 4px;
    background: rgba(255,255,255,0.95);
    padding: 4px;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.geo-finder__tool {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    transition: background 0.15s, border-color 0.15s;
}
.geo-finder__tool:hover {
    background: #f5f5f5;
    border-color: #b0b0b0;
}
.geo-finder__tool:focus-visible {
    outline: 2px solid var(--gf-focus);
    outline-offset: 1px;
}
.geo-finder__tool--done {
    background: #d1e7dd;
    border-color: #198754;
}

/* ============================================================
 *  2.23.2 — Tryb pełnoekranowy
 *  Fullscreen API pokazuje czarne ::backdrop, jeśli element nie przykrywa
 *  viewportu. Układ ma jawny podział: kontrolki / mapa / przewijana lista.
 * ============================================================ */

.geo-finder--fullscreen,
.geo-finder:fullscreen,
.geo-finder:-webkit-full-screen {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483000 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 12px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px;
    overflow: hidden !important;
    background: var(--gf-surface) !important;
    color: var(--gf-text) !important;
}
.geo-finder:fullscreen::backdrop { background: var(--gf-surface); }
.geo-finder:-webkit-full-screen::backdrop { background: var(--gf-surface); }

.geo-finder--fullscreen .geo-finder__controls,
.geo-finder:fullscreen .geo-finder__controls,
.geo-finder:-webkit-full-screen .geo-finder__controls {
    flex: 0 0 auto;
    margin: 0;
}

.geo-finder--fullscreen .geo-finder__layout,
.geo-finder:fullscreen .geo-finder__layout,
.geo-finder:-webkit-full-screen .geo-finder__layout {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
}

.geo-finder--fullscreen .geo-finder__layout--both,
.geo-finder:fullscreen .geo-finder__layout--both,
.geo-finder:-webkit-full-screen .geo-finder__layout--both {
    display: grid !important;
    grid-template-rows: minmax(260px, 1fr) minmax(110px, auto);
    gap: 10px;
}

.geo-finder--fullscreen .geo-finder__layout--map,
.geo-finder:fullscreen .geo-finder__layout--map,
.geo-finder:-webkit-full-screen .geo-finder__layout--map {
    display: block !important;
}

.geo-finder--fullscreen .geo-finder__map-wrap,
.geo-finder:fullscreen .geo-finder__map-wrap,
.geo-finder:-webkit-full-screen .geo-finder__map-wrap {
    width: 100% !important;
    height: 100% !important;
    min-width: 0;
    min-height: 0;
}

.geo-finder--fullscreen .geo-finder__map,
.geo-finder:fullscreen .geo-finder__map,
.geo-finder:-webkit-full-screen .geo-finder__map {
    width: 100% !important;
    height: 100% !important;
    min-height: 260px !important;
}

.geo-finder--fullscreen .geo-finder__list,
.geo-finder:fullscreen .geo-finder__list,
.geo-finder:-webkit-full-screen .geo-finder__list {
    width: 100% !important;
    max-height: 34vh;
    min-height: 0;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    padding: 2px;
    background: var(--gf-surface);
}

/* ============================================================
 *  0.5 — Historia wyszukiwań (dropdown pod inputem)
 * ============================================================ */

.geo-finder__search {
    position: relative; /* anchor dla dropdownu */
}

.geo-finder__history-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 2px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1500;
    max-height: 280px;
    overflow-y: auto;
}
.geo-finder__history-head {
    padding: 6px 12px;
    background: #f6f7f7;
    color: #666;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #eee;
}
.geo-finder__history-item,
.geo-finder__history-clear {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: 0;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    color: #1a1a1a;
}
.geo-finder__history-item:hover,
.geo-finder__history-clear:hover {
    background: #f0f6fc;
}
.geo-finder__history-clear {
    border-top: 1px solid #eee;
    color: #b32d2e;
    font-size: 12px;
}

/* ============================================================
 *  0.5 — Wydruk: ukrywamy UI, zostaje mapa + lista
 * ============================================================ */

@media print {
    /* Strona drukowana ma marginesy zarządzane przez przeglądarkę. */
    @page {
        margin: 1cm;
    }

    /* Ukryj wszystko poza wtyczką. */
    body * {
        visibility: hidden;
    }
    .geo-finder, .geo-finder * {
        visibility: visible;
    }
    .geo-finder {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        background: #fff;
    }

    /* Ukryj kontrolki interaktywne — w wydruku nie mają sensu. */
    .geo-finder__controls,
    .geo-finder__toolbar,
    .geo-finder__pagination,
    .leaflet-control-zoom,
    .leaflet-control-attribution {
        display: none !important;
    }

    /* Mapa: zachowaj rozmiar, list pod nią. */
    .geo-finder__layout--both {
        display: block !important;
    }
    .geo-finder__map-wrap,
    .geo-finder__map {
        width: 100% !important;
    }
    .geo-finder__map {
        height: 50vh !important;
        page-break-after: avoid;
        margin-bottom: 12px;
    }
    .geo-finder__list {
        max-height: none !important;
        overflow: visible !important;
        page-break-inside: auto;
    }
    .geo-finder__list-item {
        page-break-inside: avoid;
        border-bottom: 1px solid #ddd;
        padding: 8px 0;
    }

    /* Markery — kolor tła może nie być drukowany domyślnie; wymuszamy. */
    .geo-finder-marker,
    .geo-finder__list-item-icon {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* 1.0: Accessibility — widoczne focus indicators (WCAG 2.1 AA: 2.4.7 Focus Visible) */
.geo-finder button:focus-visible,
.geo-finder input:focus-visible,
.geo-finder select:focus-visible,
.geo-finder a:focus-visible {
    outline: 2px solid var(--gf-focus);
    outline-offset: 2px;
}

/* Tryb wysokiego kontrastu (Windows High Contrast Mode) */
@media (prefers-contrast: more) {
    .geo-finder__tool { border: 1px solid currentColor; }
    .geo-finder__list-item { border-left: 3px solid currentColor; }
}

/* Reduce motion (respektuj preferencje systemu) */
@media (prefers-reduced-motion: reduce) {
    .geo-finder * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Skip-link dla keyboard users — pojawia się gdy mapa otrzymuje focus */
.geo-finder__skip-to-list {
    position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.geo-finder__skip-to-list:focus {
    position: static; width: auto; height: auto; padding: 4px 8px; background: var(--gf-accent); color: #fff;
}

/* Screen reader only — wzorzec WordPress */
.geo-finder .screen-reader-text {
    border: 0; clip: rect(1px, 1px, 1px, 1px); -webkit-clip-path: inset(50%); clip-path: inset(50%);
    height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important;
}

/* 1.1.0 — stabilizacja renderowania mapy w motywach z agresywnym CSS. */
.geo-finder__map {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    background: #f3f4f5;
    contain: layout paint;
}
.geo-finder .leaflet-container {
    font: inherit;
    isolation: isolate;
}
.geo-finder .leaflet-container .leaflet-pane,
.geo-finder .leaflet-container .leaflet-map-pane,
.geo-finder .leaflet-container .leaflet-tile-pane,
.geo-finder .leaflet-container .leaflet-overlay-pane,
.geo-finder .leaflet-container .leaflet-marker-pane,
.geo-finder .leaflet-container .leaflet-shadow-pane,
.geo-finder .leaflet-container .leaflet-tooltip-pane,
.geo-finder .leaflet-container .leaflet-popup-pane {
    z-index: auto;
}
.geo-finder .leaflet-container .leaflet-tile-pane { z-index: 200; }
.geo-finder .leaflet-container .leaflet-overlay-pane { z-index: 400; }
.geo-finder .leaflet-container .leaflet-shadow-pane { z-index: 500; }
.geo-finder .leaflet-container .leaflet-marker-pane { z-index: 600; }
.geo-finder .leaflet-container .leaflet-tooltip-pane { z-index: 650; }
.geo-finder .leaflet-container .leaflet-popup-pane { z-index: 700; }
.geo-finder .leaflet-container .leaflet-control-container,
.geo-finder .leaflet-container .leaflet-control { z-index: 800; }


/* 1.1.3 — panel diagnostyki frontendu, widoczny tylko dla administratora z ?geo_finder_debug=1. */
.geo-finder-debug-panel {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 900;
    max-width: 320px;
    padding: 10px 12px;
    border: 1px solid rgba(0,0,0,0.2);
    border-radius: 6px;
    background: rgba(255,255,255,0.96);
    color: #1d2327;
    box-shadow: 0 3px 12px rgba(0,0,0,0.18);
    font: 12px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.geo-finder-debug-panel strong {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
}
.geo-finder-debug-panel dl {
    display: grid;
    grid-template-columns: 82px 1fr;
    gap: 3px 8px;
    margin: 0 0 6px;
}
.geo-finder-debug-panel dt {
    margin: 0;
    font-weight: 600;
}
.geo-finder-debug-panel dd {
    margin: 0;
    overflow-wrap: anywhere;
}
.geo-finder-debug-panel small {
    display: block;
    color: #646970;
}

/* ----- 1.1.6: kropka w ikonie listy, gdy marker ma kolor bez emoji ----- */
.geo-finder__list-item-dot {
    display: block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.35);
}

/* 2.8.0: lista wyników w kolumnach (atrybut columns="2|3|4"). */
.geo-finder__list-items--cols-2,
.geo-finder__list-items--cols-3,
.geo-finder__list-items--cols-4 { display: grid; gap: 14px; }
.geo-finder__list-items--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.geo-finder__list-items--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.geo-finder__list-items--cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.geo-finder__list-items > .geo-finder__list-item:only-child { grid-column: 1 / -1; }
@media (max-width: 1100px) {
	.geo-finder__list-items--cols-3,
	.geo-finder__list-items--cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
	.geo-finder__list-items--mobile-cols-1 { grid-template-columns: minmax(0, 1fr) !important; }
	.geo-finder__list-items--mobile-cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

/* 2.33.14: opcjonalny obraz/plakat w konfigurowalnej karcie listy. */
.geo-finder__list-item-thumb {
	margin: 0 0 10px;
	border-radius: 6px;
	overflow: hidden;
	background: #f0f0f1;
}
.geo-finder__list-item-thumb img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 260px;
	object-fit: cover;
}
.geo-finder__list-item-excerpt { margin: 8px 0 0; }


/* 2.23.2: na telefonie karta nie udaje tabeli; akcje pozostają duże i klikalne. */
@media (max-width: 700px) {
    .geo-finder__controls { padding: 10px; }
    .geo-finder__search-btn,
    .geo-finder__clear-search-btn,
    .geo-finder__geo-btn { flex: 1 1 auto; }
    .geo-finder__radius { width: 100%; padding-left: 0; }
    .geo-finder__list-item { padding: 15px; }
    .geo-finder__list-item-head { display: block; }
    .geo-finder__list-item-distance { margin-top: 5px; }
    .geo-finder__list-item-meta { grid-template-columns: 1fr; gap: 2px; }
    .geo-finder__list-action { flex: 1 1 130px; min-height: 40px; }
    .geo-finder__pagination { gap: 8px; }
    .geo-finder__pagination-button { flex: 1 1 0; padding-inline: 10px; }
    .geo-finder--fullscreen,
    .geo-finder:fullscreen,
    .geo-finder:-webkit-full-screen { padding: 8px !important; }
    .geo-finder--fullscreen .geo-finder__layout--both,
    .geo-finder:fullscreen .geo-finder__layout--both,
    .geo-finder:-webkit-full-screen .geo-finder__layout--both {
        grid-template-rows: minmax(220px, 1fr) minmax(120px, 32vh);
    }
}

/* 2.12.0: zdjęcie wyróżniające w okienku. */
.geo-finder-popup-thumb img { max-width: 100%; height: auto; border-radius: 4px; display: block; }

/* ============================================================
 * 2.23.3 — poprawki po teście mobilnym (Brave / Android)
 * ============================================================ */

/* Pole czasu nie może polegać na placeholderze: mobilne przeglądarki
 * zwykle go nie pokazują dla input[type="time"]. */
.geo-finder__time-filter {
    display: inline-grid;
    grid-template-columns: auto minmax(110px, 1fr) minmax(110px, 1fr);
    align-items: end;
    gap: 6px 8px;
    min-width: 280px;
}
.geo-finder__time-filter-title {
    align-self: center;
    color: var(--gf-muted);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.geo-finder__time-field {
    display: grid;
    gap: 3px;
    margin: 0;
    color: var(--gf-muted);
    font-size: 11px;
    font-weight: 600;
}
.geo-finder__time-field .geo-finder__filter {
    width: 100%;
    min-width: 0;
}

/* Zależne poziomy struktury są pokazywane dopiero wtedy, gdy można je wybrać.
 * Skraca to formularz szczególnie na telefonie. */
.geo-finder__filter--structure:disabled {
    display: none;
}

/* Dodatkowa warstwa ochronna. Gdy motyw lub inna wtyczka uszkodzi/wytnie
 * bazowy CSS Leafleta, kontrolki nadal zachowują używalny układ. */
.geo-finder .leaflet-control-container .leaflet-top,
.geo-finder .leaflet-control-container .leaflet-bottom {
    position: absolute;
    z-index: 1000;
    pointer-events: none;
}
.geo-finder .leaflet-control-container .leaflet-top { top: 0; }
.geo-finder .leaflet-control-container .leaflet-right { right: 0; }
.geo-finder .leaflet-control-container .leaflet-bottom { bottom: 0; }
.geo-finder .leaflet-control-container .leaflet-left { left: 0; }
.geo-finder .leaflet-control-container .leaflet-control {
    position: relative;
    z-index: 800;
    float: left;
    clear: both;
    pointer-events: auto;
}
.geo-finder .leaflet-control-container .leaflet-top .leaflet-control { margin-top: 10px; }
.geo-finder .leaflet-control-container .leaflet-bottom .leaflet-control { margin-bottom: 10px; }
.geo-finder .leaflet-control-container .leaflet-left .leaflet-control { margin-left: 10px; float: left; }
.geo-finder .leaflet-control-container .leaflet-right .leaflet-control { margin-right: 10px; float: right; }
.geo-finder .leaflet-control-zoom {
    overflow: hidden;
    border: 2px solid rgba(0, 0, 0, .2);
    border-radius: 4px;
    background: #fff;
}
.geo-finder .leaflet-control-zoom a {
    display: block;
    width: 30px;
    height: 30px;
    border-bottom: 1px solid #ccc;
    background: #fff;
    color: #000 !important;
    font: 700 18px/30px Arial, Helvetica, sans-serif;
    text-align: center;
    text-decoration: none !important;
}
.geo-finder .leaflet-control-zoom a:last-child { border-bottom: 0; }
.geo-finder .leaflet-control-attribution {
    margin: 0;
    padding: 2px 5px;
    background: rgba(255, 255, 255, .82);
    color: #333;
    font-size: 11px;
    line-height: 1.4;
}
.geo-finder .leaflet-control-attribution a {
    color: #0078a8;
    text-decoration: none;
}

@media (max-width: 700px) {
    .geo-finder__time-filter {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        min-width: 0;
    }
    .geo-finder__time-filter-title {
        grid-column: 1 / -1;
    }

    /* Na telefonie główna akcja jest pełna, dwie drugorzędne mieszczą się
     * obok siebie, jeśli szerokość na to pozwala. */
    .geo-finder__list-action--primary {
        flex: 1 0 100%;
    }
    .geo-finder__list-action:not(.geo-finder__list-action--primary) {
        flex: 1 1 calc(50% - 4px);
    }
}


/* 2.31.1 — tooltip Leafleta potrzebuje własnej szerokości w panelu o zerowej szerokości. */
.geo-finder .leaflet-tooltip.geo-finder-marker-tooltip {
    width: max-content;
    max-width: min(280px, calc(100vw - 32px));
    white-space: normal;
    overflow-wrap: break-word;
    font-weight: 600;
    line-height: 1.25;
    pointer-events: none;
}

/* 2.33.6: informacja o aktywnej polityce harmonogramu. */
.geo-finder__schedule-hint { margin: 0; color: var(--gf-muted); font-size: 13px; }

/* 2.33.15: plakaty są opcjonalnymi elementami konfigurowalnego popupu. */
.geo-finder-popup-poster img {
    display: block;
    width: auto;
    max-width: min(100%, 280px);
    max-height: 320px;
    margin: 0 auto;
    object-fit: contain;
    border-radius: 6px;
}
