/* Lokator apoteka — mapa + lista + pretraga. Tokeni iz style.css. */
.apoteke-locator .apoteke-searchbar {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 760px;
    margin: 0 auto 1.75rem;
}
.apoteke-locator .apoteke-search-wrap {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}
.apoteke-locator .apoteke-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-light);
    pointer-events: none;
}
.apoteke-locator #apoteke-search {
    flex: 1 1 auto;
    width: 100%;
    padding: 0.95rem 1rem 0.95rem 3rem;
    border: 1px solid var(--cream-300);
    border-radius: 12px;
    font-size: 1rem;
    font-family: var(--font-body);
    background: var(--cream-50);
}
.apoteke-locator #apoteke-search:focus {
    outline: 2px solid var(--forest-700);
    outline-offset: 1px;
    border-color: var(--forest-700);
}
.apoteke-locator .apoteke-locate-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    white-space: nowrap;
    padding: 0.85rem 1.1rem;
    border: 1px solid var(--forest-800);
    border-radius: 12px;
    background: var(--forest-800);
    color: var(--cream-50);
    font-family: var(--font-body);
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.15s ease;
}
.apoteke-locator .apoteke-locate-btn:hover { background: var(--forest-700); }
.apoteke-locator .apoteke-locate-btn.is-loading { opacity: 0.7; pointer-events: none; }

.apoteke-locator .apoteke-layout {
    display: grid;
    grid-template-columns: minmax(280px, 380px) 1fr;
    gap: 1.25rem;
    align-items: start;
}
.apoteke-locator .apoteke-list-wrap { min-width: 0; }
.apoteke-locator .apoteke-list-count {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-light);
    margin: 0 0 0.6rem;
}
.apoteke-locator .apoteke-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.6rem;
    max-height: 620px;
    overflow-y: auto;
    scrollbar-width: thin;
}
.apoteke-locator .apoteka-card {
    background: var(--cream-50);
    border: 1px solid var(--cream-200);
    border-radius: 12px;
    padding: 0.9rem 1rem;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.apoteke-locator .apoteka-card:hover,
.apoteke-locator .apoteka-card:focus-visible {
    border-color: var(--forest-700);
    box-shadow: 0 8px 22px -14px rgba(15, 54, 34, 0.25);
    outline: none;
}
.apoteke-locator .apoteka-card.is-active {
    border-color: var(--ochre-500);
    box-shadow: 0 0 0 2px var(--ochre-400) inset;
}
.apoteke-locator .apoteka-card[hidden] { display: none; }
.apoteke-locator .apoteka-card-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
}
.apoteke-locator .apoteka-name {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--forest-800);
}
.apoteke-locator .apoteka-city {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-light);
    white-space: nowrap;
}
.apoteke-locator .apoteka-address {
    margin: 0.4rem 0 0;
    font-size: 0.875rem;
    color: var(--color-text);
}
.apoteke-locator .apoteka-card-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.apoteke-locator .apoteka-phone {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--forest-700);
}
.apoteke-locator .apoteka-distance {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--ochre-600, #b5751f);
    font-weight: 600;
}
.apoteke-locator .apoteka-card.is-no-geo { opacity: 0.85; }
.apoteke-locator .apoteka-card.is-no-geo .apoteka-name::after {
    content: ' · ' attr(data-no-geo-label);
}
.apoteke-locator .apoteke-empty { padding: 2rem 1rem; text-align: center; color: var(--color-text-light); }

.apoteke-locator .apoteke-map-wrap { position: sticky; top: 1rem; }
.apoteke-locator .apoteke-map {
    width: 100%;
    height: 620px;
    border-radius: 14px;
    border: 1px solid var(--cream-200);
    background: var(--cream-100);
    z-index: 0;
}
.apoteke-locator .apoteke-noscript { padding: 1rem; color: var(--color-text-light); }

/* Brendirani marker (divIcon) */
.apoteke-pin {
    display: block;
    width: 30px;
    height: 30px;
    color: var(--forest-800, #0f3622);
}
.apoteke-pin.is-active { color: var(--ochre-500, #d08a1e); }

/* Leaflet popup u stilu teme */
.apoteke-locator .leaflet-popup-content-wrapper { border-radius: 12px; }
.apoteke-popup strong { font-family: var(--font-heading); color: var(--forest-800); display: block; margin-bottom: 0.2rem; }
.apoteke-popup .addr { font-size: 0.85rem; color: var(--color-text); margin: 0 0 0.4rem; }
.apoteke-popup a { font-size: 0.8rem; color: var(--forest-700); }

@media (max-width: 900px) {
    .apoteke-locator .apoteke-layout { grid-template-columns: 1fr; }
    .apoteke-locator .apoteke-map-wrap { position: static; order: -1; }
    .apoteke-locator .apoteke-map { height: 380px; }
    .apoteke-locator .apoteke-list { max-height: none; }
}
@media (max-width: 560px) {
    .apoteke-locator .apoteke-searchbar { flex-wrap: wrap; }
    .apoteke-locator .apoteke-locate-btn { width: 100%; justify-content: center; }
}
