/*
 Theme Name: Mapa Stari Grad
 Theme URI: https://example.com/
 Description: Child tema za projekat interaktivne mape Mapa Stari Grad.
 Author: putovaoBiH
 Template: hello-elementor
 Version: 1.0
 Text Domain: mapa-stari-grad
*/

/* =========================================
   GLOBAL / LAYOUT
   ========================================= */

#main-content {
    margin: 0;
    padding: 0;
}

#mapa-app {
    width: 100%;
}

#mapa-page {
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

#mapa-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* MOBITEL (default) – mapa preko cijele širine */
#mapa-map {
    box-sizing: border-box;
    width: 100% !important;
	height: 70vh;
    margin: 0 !important;
    padding: 0 !important;
    left: 0 !important;
}

/* DESKTOP – mapa se pomjera udesno i sužava za širinu sidebara */
@media (min-width: 1024px) {
    #mapa-map {
        margin-left: 18vw !important;
        width: calc(100vw - 18vw) !important;
        height: calc(100vh - 120px) !important;
        position: relative;
        top: 0;
        margin-top: 0;
    }
}

.leaflet-container {
    width: 100%;
    height: 100%;
}

/* =========================================
   FILTERI – PARENT + CHILD RED, IKONICA + CARET
   ========================================= */

/* Glavni kontejner za filtere – fiksiran iznad mape */
#map-filters {
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    z-index: 999;
    box-sizing: border-box;

    display: flex;
    flex-direction: column; /* sada kolona: prvi red roditelji, drugi red djeca */
    gap: 4px;

    margin-top: 0;
    padding-top: 0;
    background: transparent;
    pointer-events: auto;
}

/* Svaki "red" filtera (parent row + child row) */
.mapa-filters-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;

    padding: 0 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.mapa-filters-row::-webkit-scrollbar {
    display: none;
}

/* Parents red – glavni filteri + "Prikaži sve" */
.mapa-filters-row--parents {
    /* po potrebi dodatno stilizuj */
}

/* Children red – prikazuje se samo za odabrani parent */
.mapa-filters-row--children {
    display: none; /* JS ga pali/gasi */
}

.mapa-filters-children-inner {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
}

/* Osnovni izgled pill dugmadi (parent + child + "Prikaži sve") */
.map-pill {
     flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;

    padding: 10px 20px;
    background: #E9E1D6;          /* bež podloga kao na primjeru */
	border: 1px solid #625A4F;
    border-radius: 15px;
	font-family: "Manrope", sans-serif;
    font-size: 14px;
    line-height: 1.2;
    cursor: pointer;
    white-space: nowrap;
    font-weight: semi-bold;
    color: #625A4F;               /* boja teksta */
}

/* Parent specifično (možeš pojačati font ako želiš) */
.map-pill--parent {
    font-weight: semi-bold;
}

/* Child specifično (malo nježnije) */
.map-pill--child {
    font-size: 13px;
    padding: 10px 20px;
    background: #E9E1D6;
}

/* Ikonica kruga za filtere (parent i child) */
.map-pill-icon {
    width: 26px;
    height: 26px;
    object-fit: contain;
    flex-shrink: 0;
	 border: 1px solid #958575 !important; /* default */
    border-radius: 100% !important;        /* ili 8px – zavisi šta koristiš */
    transition: border-color 120ms ease-out;
}

.map-pill:hover .map-pill-icon {
    border: 1px solid white !important;
}


/* Labela naziva kategorije */
.map-pill-label {
    display: inline-block;
}

/* Caret za parent filtere koji imaju djecu */
.map-pill-caret {
    margin-left: 0;
    font-size: 20px;
    line-height: 1;
    pointer-events: auto;
}

/* Hover i active stanja */
.map-pill:hover {
    border-color: #fff;
	 background: #8D6E63 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
	color: white !important;
}

.map-pill.is-active {
    background: #8D6E63 !important;
    color: #fff !important;
    border-color: #fff;
}

/* Staro targetiranje (za svaki slučaj, da ne kvari postojeće) */
#map-filters .mapa-filter,
#map-filters .filter-item {
    flex: 0 0 auto;
    padding: 8px 16px;
    background: #ffffff;
    border: 1px solid #ccc;
    border-radius: 999px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

#map-filters .mapa-filter:hover,
#map-filters .filter-item:hover {
    border-color: #333;
}

#map-filters .mapa-filter.active,
#map-filters .filter-item.active {
    background: #222;
    color: #fff;
    border-color: #222;
}

/* Mobilni razmak od vrha manji */
@media (max-width: 768px) {
    #map-filters {
        top: 10px;
    }
}

/* Desktop: pomjeri filtere udesno da ne uđu u drawer */
@media (min-width: 1024px) {
    #map-filters {
        margin-left: calc(18vw + 32px);
        z-index: 1000;
    }
}

/* =========================================
   POPUP LOKACIJE (Leaflet popup sadržaj)
   ========================================= */

.popup-lokacija {
    font-size: 14px;
    line-height: 1.4;
    max-width: 260px;
}

.popup-lokacija h3 {
    margin: 4px 0 6px;
    font-size: 16px;
    font-weight: 600;
}

.popup-lokacija p {
    margin: 0 0 8px;
}

.popup-lokacija a {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
}

.popup-lokacija a:hover {
    text-decoration: underline;
}

/* =========================================
   LANGUAGE SWITCHER – TRIGGER U HEADERU
   ========================================= */

.lang-switcher {
    position: relative;
}

.lang-switcher .lang-trigger ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
}

.lang-switcher .lang-trigger li {
    display: none;
}

.lang-switcher .lang-trigger li.current-lang {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #9b9b9b;
    background: #ffffff;
    cursor: pointer;
    box-sizing: border-box;
    padding: 3px;
}

.lang-switcher .lang-trigger img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.lang-switcher .lang-trigger li.current-lang:hover {
    border-color: #222;
}

/* =========================================
   POPUP LANGUAGE SWITCHER – [mapa_lang_popup]
   ========================================= */

.mapa-lang-popup {
    font-size: 15px;
    color: #222;
    max-width: 320px;
    margin: 0 auto;
}

.mapa-lang-popup .mapa-lang-current {
    display: flex;
    flex-direction: column;
    margin-bottom: 18px;
}

.mapa-lang-popup .mapa-lang-label {
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
    font-size: 13px;
}

.mapa-lang-popup .mapa-lang-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 6px 12px;
    background: #f4f4f4;
    border: 1px solid #e0e0e0;
}

.mapa-lang-popup .mapa-lang-pill img {
    width: 24px !important;
    height: 24px !important;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.mapa-lang-popup .mapa-lang-name {
    font-weight: 500;
}

.mapa-lang-popup .mapa-lang-others ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mapa-lang-popup .mapa-lang-others li + li {
    margin-top: 6px;
}

.mapa-lang-popup .mapa-lang-others a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    text-decoration: none;
    color: #222;
    font-size: 14px;
}

.mapa-lang-popup .mapa-lang-others a:hover {
    background: #f7f7f7;
}

.mapa-lang-popup .mapa-lang-others img {
    width: 20px !important;
    height: 20px !important;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

/* =========================================
   LEAFLET ZOOM – pozicioniranje
   ========================================= */

@media (min-width: 1024px) {
    .leaflet-control-zoom {
        position: absolute !important;
        right: 20px !important;
        bottom: 20px !important;
        top: auto !important;
        left: auto !important;
    }
}

@media (max-width: 1023px) {
    .leaflet-control-zoom {
        display: none !important;
    }
}

/* ===========================================
   FIX: uklanjanje roza active/focus pozadine
   za popup dugmad
   =========================================== */

.mapa-popup__btn:focus,
.mapa-popup__btn:active,
.mapa-popup__btn:focus-visible,
.mapa-popup__read-more:focus,
.mapa-popup__read-more:active,
.mapa-popup__read-more:focus-visible {
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Jednako za X dugme */
.mapa-popup__close:focus,
.mapa-popup__close:active,
.mapa-popup__close:focus-visible {
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
}

/* =========================================
   FOOTER HIDE ZA MAPA PAGE
   ========================================= */

footer {
    display: none !important;
}

.mapa-popup__btn-label{
	color: #625A4F;
		font-size: 12px;
	padding-right: 10px;
}

.mapa-popup__btn:hover {
    background-color: #8D6E63 !important;
	border: 2px solid black;
}


#mapa-location-popup-overlay > div > div > div.mapa-popup__content > div.mapa-popup__meta > a{
	border: 1px solid #8D6E63;
	color: #625A4F;
	
}

.leaflet-control-container {
    display: none !important;
}


/* Isključujemo globalni hover override koji ubacuje ružičasto-sivu boju */
button:hover,
button:focus,
button:active,
.mapa-header-lang__toggle:hover,
.mapa-header-lang__toggle:focus,
.mapa-header-lang__toggle:active {
    background-color: inherit !important;
    color: inherit !important;
}
