/* css/popup.css */

/* OVERLAY I OSNOVNI LAYOUT */
.mapa-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999; /* iznad headera, drawera i mape */
    background: rgba(0, 0, 0, 0.35);
    display: none; /* kontrolira se preko aria-hidden */
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

/* Kada je aria-hidden=false, prikaži overlay */
.mapa-popup-overlay[aria-hidden="false"] {
    display: flex;
}

.mapa-popup {
    background: #E9E1D6;
    color: #625A4F;
    border-radius: 20px;
    max-width: 80vw;               /* širi prozor na desktopu */
           /* ali da ne izlazi iz ekrana */
    max-height: 90vh;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.25);
    position: relative;
    font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    overflow: hidden;
}

/* unutrašnji scroll – popup ima max-height, sadržaj skrolabilan */
.mapa-popup__inner {
    display: flex;
    gap: 24px;
    padding: 24px 24px 10px 24px;
    max-height: 85vh;
    overflow-y: auto;
}

/* Close dugme (X) – mala zaobljena tipka */
.mapa-popup__close {
    position: absolute;
    top: 20px;
    right: 18px;
    width: 32px;
    height: 32px;
    border-radius: 100%;
    border: 1px solid #625A4F;
    background: #F6ECE0;
    font-size: 18px;
    line-height: 1;
    color: #B9552D;
    cursor: pointer;
    padding: 0 0 5px 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mapa-popup__close:hover {
    background: #EBDDCB;
}

/* Layout: lijeva i desna kolona */
.mapa-popup__media {
    flex: 0 0 42%;
    min-width: 260px;
}

.mapa-popup__content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Slika */
.mapa-popup__image-wrap {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: #D4CABC;
}

.mapa-popup__image {
    display: block;
    width: 100%;
    height: 230px;
    object-fit: cover;
}

/* Placeholder kada nema slike */
.mapa-popup__media--no-image .mapa-popup__image {
    display: none;
}

.mapa-popup__image-placeholder {
    display: none;
    width: 100%;
    height: 230px;
    background: #D4CABC;
    border-radius: 16px;
    align-items: center;
    justify-content: center;
}

.mapa-popup__media--no-image .mapa-popup__image-placeholder {
    display: flex;
}

.mapa-popup__image-placeholder-icon {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 2px solid #625A4F;
}

/* Naslov */
.mapa-popup__title {
    font-size: 26px !important;
    line-height: 1.3;
    font-weight: 600;
    margin: 0;
    color: #144261;
}

/* Meta: simboli + badge */
.mapa-popup__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

/* Simboli ispod naslova (kružići) */
.mapa-popup__categories {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.mapa-popup__symbol {
    width: 35px;
    height: 35px;
    border-radius: 999px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mapa-popup__symbol-img {
    width: 35px;
    height: 35px;
    object-fit: contain;
}

/* Badge za vodiče – mali “pill” sa logom i tekstom */
.mapa-popup__guides-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 5px;
    border-radius: 999px;
    background: transparent;
    text-decoration: none;
    border: 1px solid rgba(98, 90, 79, 0.15);
}

.mapa-popup__guides-logo {
    height: 28px !important;
    width: auto;
    display: block;
    flex-shrink: 0;
}

.mapa-popup__guides-text {
    font-size: 12px;
    line-height: 1.3;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: #625A4F;
}

/* Opis + fade */
.mapa-popup__description-wrap {
    position: relative;
    max-height: 120px;
    overflow: hidden;
}

.mapa-popup__description-wrap::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 48px;
    background: linear-gradient(to bottom, rgba(233, 225, 214, 0), #E9E1D6);
    pointer-events: none;
}

.mapa-popup__description {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    color: #4f473d;
}

/* Pročitaj više */
.mapa-popup__read-more {
    align-self: flex-start;
    margin-top: 2px;
    padding: 0;
    border-radius: 999px;
    border: none !important;
    background: transparent;
    color: #625A4F;
    font-size: 15px !important;
    cursor: pointer;
	color: #8D6E63 !important;
}

/* Kada se proširi opis */
.mapa-popup--expanded .mapa-popup__description-wrap {
    max-height: none;
}

.mapa-popup--expanded .mapa-popup__description-wrap::after {
    opacity: 0;
}

/*.mapa-popup--expanded .mapa-popup__read-more {
    display: none;
}/*

/* Razdjelnik */
.mapa-popup__divider {
    border: 0;
    border-top: 1px solid rgba(98, 90, 79, 0.3);
    margin: 6px 0 10px 0;
}

/* CTA tipke */
.mapa-popup__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mapa-popup__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 46px;
    border-radius: 10px;
    font-size: 14px;
    border: none;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
	color: white;
}

.mapa-popup__btn-label{
	color: white;
}

.mapa-popup__btn-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* Plavo dugme – Google upute */
.mapa-popup__btn--directions {
    background: #144261;
    color: #FFFFFF;
}

/* Crveno dugme – YouTube video */
.mapa-popup__btn--video {
    background: #B9552D;
    color: #FFFFFF;
}

/* Responsive prilagodba */
@media (max-width: 768px) {
    .mapa-popup {
        max-width: 100%;
        width: 100%;
        margin: 0;
        border-radius: 18px;
    }

    .mapa-popup__inner {
        flex-direction: column;
        padding: 18px 16px 16px 16px;
    }

    .mapa-popup__media {
        flex: 0 0 auto;
        min-width: 100%;
    }

    .mapa-popup__image,
    .mapa-popup__image-placeholder {
        height: 250px !important;    /* bilo 200px – probaj 150–170px */
    }

    .mapa-popup__title {
        font-size: 18px;
    }

    .mapa-popup__guides-text {
        font-size: 11px;
    }

    .mapa-popup__close {
        top: 10px;
        right: 12px;
    }
}


/* FORCE STIL ZA X TIPKU – PREGAZI HELLO/ELEMENTOR GLOBAL BUTTON STILOVE */
.mapa-popup button.mapa-popup__close {
    /* reset najčešćih Elementor stilova */
    min-width: 0 !important;
    box-shadow: none !important;
    text-transform: none !important;
    letter-spacing: 0 !important;

    /* naš izgled */
    position: absolute;
	z-index: 1000;
    top: 20px;
    right: 18px;
    width: 40px;
    height: 40px;
    border-radius: 100%;
    border: 1px solid #D6C9B8 !important;
    background: #F6ECE0 !important;
	color: #625A4F !important;
    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

.mapa-popup button.mapa-popup__close:hover {
    background: #EBDDCB !important;
}

/* ===========================================
   FIX: uklanjanje roza active/focus pozadine
   specifično za popup gumb "Pročitaj više"
   i sve popup dugmiće
   =========================================== */

.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;
}

.mapa-popup__description-wrap--no-fade {
    max-height: none;
}

.mapa-popup__description-wrap--no-fade::after {
    display: none;
}

/* ================================
   GLAVNI BLOK ZA SLIKU + GALERIJU
   ================================ */

/* Lijeva kolona: container za sliku i galeriju */
.mapa-popup__media {
    width: 100%;
    margin-bottom: 12px;
    /* BEZ fixed height i BEZ overflow hidden –
       to dopušta da galerija ispod slike bude vidljiva */
}

/* Wrapper koji drži SAMO glavnu sliku i reže je u okvir */
.mapa-popup__image-wrap {
    width: 100%;
    height: 320px;          /* osnovna visina slike na mobitelu */
    border-radius: 20px;
    overflow: hidden;       /* reže sliku u zaobljeni okvir */
    background: #E9E1D6;
}

/* Desktop: veća visina slike */
@media (min-width: 1024px) {
    .mapa-popup__image-wrap {
        height: 420px;
    }
}

/* Slika popunjava cijeli okvir, uvijek cover + center */
.mapa-popup__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

/* Placeholder zauzima isti prostor kao i slika */
.mapa-popup__image-placeholder {
    width: 100%;
    height: 100%;
}

/* ================================
   GALERIJA THUMBNAILA
   ================================ */

.mapa-popup__gallery {
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin-top: 12px;
    padding: 0 14px 0;   /* poravnato s glavnom slikom (koja je unutar istog bloka) */
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.mapa-popup__gallery::-webkit-scrollbar {
    height: 6px;
}

.mapa-popup__gallery::-webkit-scrollbar-thumb {
    background: #625A4F;
    border-radius: 20px;
}


/* ================================
   GALERIJA THUMBNAILA – FIX COVER
   ================================ */

.mapa-popup__gallery {
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin-top: 12px;
    padding-left: 0;
    padding-right: 14px;
    margin-left: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.mapa-popup__gallery::-webkit-scrollbar {
    height: 6px;
}

.mapa-popup__gallery::-webkit-scrollbar-thumb {
    background: #625A4F;
    border-radius: 20px;
}

.mapa-popup__gallery-item {
    flex: 0 0 auto;
    width: 80px;
    height: 80px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #625A4F33;
    background: #E9E1D6;
    cursor: pointer;
    position: relative;         /* bitno za absolute img */
}

/* Thumbnail slika – uvijek COVER + CENTER */
.mapa-popup__gallery-item img {
    position: absolute;
    inset: 0;                   /* top:0; right:0; bottom:0; left:0 */
    width: 100% !important;
    height: 100% !important;

    object-fit: cover !important;
    object-position: center center !important;

    display: block;
    max-width: none !important;
    max-height: none !important;
}

/* Aktivni thumbnail */
.mapa-popup__gallery-item.is-active {
    border: 2px solid #625A4F;
}

/* Hover efekt */
@media (hover: hover) {
    .mapa-popup__gallery-item:hover {
        transform: scale(1.04);
        transition: 0.15s ease;
    }
}


/* ================================
   GLAVNA SLIKA – FORCE COVER + CENTER
   ================================ */

.mapa-popup__image-wrap {
    width: 100%;
    height: 250px;                 /* mobilni standard */
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    background: #E9E1D6;
}

/* Desktop veća visina */
@media (min-width: 1024px) {
    .mapa-popup__image-wrap {
        height: 420px;
    }
}

/* OVDJE JE MAGIC FIX ZA COVER */
.mapa-popup__image {
    width: 100% !important;
    height: 100% !important;

    object-fit: cover !important;
    object-position: center center !important;

    display: block;

    /* poništava elementor height:auto */
    max-width: none !important;
    max-height: none !important;

    /* poništava sve WP auto-resize stilove */
    aspect-ratio: auto !important;
}

/* =========================================
   LANGUAGE SWITCHER U POPUPU – DROPDOWN
   ========================================= */

/* Wrapper u popupu – poravnaj desno gore */
.mapa-popup .mapa-popup__lang-switch {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
}

/* Desktop: lijevo poravnato */
@media (min-width: 768px) {
    .mapa-popup .mapa-popup__lang-switch {
        justify-content: flex-start;
    }
}

/* Glavni switcher (krug + strelica) */
.mapa-popup .mapa-lang-switcher {
    position: relative;
    display: inline-block;
}

/* Reset naslijeđenih stilova za toggle dugme */
.mapa-popup .mapa-lang-toggle {
    all: unset;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px 2px 2px;
    border-radius: 999px;
    border: 1px solid #625A4F !important;
    background-color: #E9E1D6 !important;
    color: #625A4F !important;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
}

/* Krug sa oznakom aktivnog jezika */
.mapa-popup .mapa-lang-toggle__circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #625A4F;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    background-color: #F5EFE6;
}

/* Strelica */
.mapa-popup .mapa-lang-toggle__arrow {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 6px solid #625A4F;
    transition: transform 0.15s ease-out;
}

/* Rotacija strelice kad je dropdown otvoren */
.mapa-popup .mapa-lang-switcher.is-open .mapa-lang-toggle__arrow {
    transform: rotate(180deg);
}

/* Dropdown panel */
.mapa-popup .mapa-lang-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 110px;
    background-color: #E9E1D6;
    border: 1px solid #625A4F;
    border-radius: 12px;
    padding: 4px 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
	z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition:
        opacity 0.15s ease-out,
        transform 0.15s ease-out,
        visibility 0.15s linear;
}

/* Vidljiv dropdown kada je otvoren */
.mapa-popup .mapa-lang-switcher.is-open .mapa-lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Lista unutar dropdowna */
.mapa-popup .mapa-lang-dropdown__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mapa-popup .mapa-lang-dropdown__list li {
    margin: 0;
}

/* Reset dugmeta unutar dropdowna + stil */
.mapa-popup .mapa-lang-dropdown__btn {
    all: unset;
    box-sizing: border-box;
    width: 100%;
    padding: 6px 10px;
    text-align: left;
    font-size: 13px;
    color: #625A4F;
    cursor: pointer;
    line-height: 1.4;
}

/* Hover efekt */
.mapa-popup .mapa-lang-dropdown__btn:hover {
    background-color: rgba(98, 90, 79, 0.12);
}

/* Aktivni jezik u dropdownu */
.mapa-popup .mapa-lang-dropdown__btn.is-active {
    font-weight: 600;
    background-color: rgba(98, 90, 79, 0.18);
}

/* Tekst ispred language switchera */
.mapa-popup .mapa-lang-label {
    font-size: 12px;
    color: #625A4F;
    margin-right: 8px;
    align-self: center;
    font-weight: 500;
}


#mapa-location-popup-overlay > div > div > div.mapa-popup__content > div.mapa-popup__meta > a > span{
	color: #625A4F !important;
}

/* Hover stil za guide button/badge */
.mapa-popup__guides-badge:hover,
.mapa-popup__btn--guide:hover {
   
    border: 2px solid black;
}

/* Ugasiti hover efekt samo za Google upute dugme */
.mapa-popup__btn--directions:hover,
.mapa-popup__btn--directions:focus,
.mapa-popup__btn--directions:active {
    background: #144261 !important;
    color: inherit !important;
    box-shadow: none !important;
    transform: none !important;
    filter: none !important;
    opacity: 1 !important;
	border: none !important;
}


