/****************

    RICH POPUP (bogatiPopup)

    Shared by the Google Maps markers and the list cards.
    Loaded only on pages that have at least one opted-in item.

****************/

/* overlay - must clear .main-nav (50000) but stay under .age-check (60000) */

.mfp-rich-popup.mfp-bg {
    z-index: 55000;
    background-color: #000;
    opacity: 0.88;
}

.mfp-rich-popup.mfp-wrap {
    z-index: 55001;
}

.mfp-rich-popup .mfp-content {
    max-width: 640px;
    margin: 0 auto;
}

.mfp-rich-popup .mfp-close {
    color: #fcd5a4;
    opacity: 1;
    font-size: 32px;
}

/* panel */

.rich-popup {
    max-width: 640px;
    margin: 0 auto;
    padding: 25px;
    background-color: #111;
    color: #fcd5a4;
    border: 1px solid #fcd5a4;
    font-family: 'Lora', serif;
    font-size: 15px;
}

.rich-popup-title {
    font-family: 'Trocchi', serif;
    font-size: 26px;
    line-height: 1.25;
    text-align: center;
    margin-bottom: 20px;
    padding-right: 25px;
}

    .rich-popup-title a {
        color: #fcd5a4;
        text-decoration: none;
    }

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

/* gallery - deliberately NOT .winery-gallery / .images-gallery, which
   functions.js slicks at DOM ready and would initialise at zero width */

.rich-popup-gallery {
    position: relative;
    margin-bottom: 20px;
}

.rich-popup-slide img {
    display: block;
    width: 100%;
    height: auto;
}

/* the site-wide slick rules position arrows and dots outside their container,
   which does not work inside a padded panel - pull them back in */

.rich-popup-gallery .slick-slide img {
    -webkit-box-shadow: none;
    -moz-box-shadow: none;
    box-shadow: none;
}

.rich-popup-gallery .slick-arrow {
    left: 10px;
    z-index: 2;
    /* the arrows sit over the photo here rather than outside it as they do on
       the detail pages, so they need a shadow to stay legible on bright images */
    filter: drop-shadow(0 0 2px #000) drop-shadow(0 1px 3px rgba(0, 0, 0, 0.9));
}

.rich-popup-gallery .slick-next {
    left: auto;
    right: 10px;
}

.rich-popup-gallery .slick-dots {
    position: static;
    right: auto;
    bottom: auto;
    text-align: center;
    margin-top: 12px;
    padding: 0;
}

    .rich-popup-gallery .slick-dots li {
        float: none;
        display: inline-block;
        margin: 0 4px;
    }

/* action icons */

.rich-popup-actions {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.rp-ico {
    display: block;
    width: 50px;
    height: 50px;
    padding: 0;
    border: none;
    background-color: transparent;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
    cursor: pointer;
}

    /* label kept for screen readers and the title tooltip, hidden visually */
    .rp-ico span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

.rp-ico-phone {
    background-image: url(bg/telefon-svijetla.png);
}

.rp-ico-web {
    background-image: url(bg/ico-www-light.png);
}

.rp-ico-dir {
    background-image: url(bg/adresa-svijetla.png);
}

.rp-ico-kusaona {
    background-image: url(bg/kusaona-svijetla.png);
}

/* light theme - listing pages render dark today, this is for detail pages
   should the popup ever be used there */

.svijetla .rich-popup {
    background-color: #fcd5a4;
    color: #111;
    border-color: #111;
}

.svijetla .rich-popup-title a {
    color: #111;
}

.svijetla .rp-ico-phone {
    background-image: url(bg/telefon-tamna.png);
}

.svijetla .rp-ico-web {
    background-image: url(bg/ico-www-dark.png);
}

.svijetla .rp-ico-dir {
    background-image: url(bg/adresa-tamna.png);
}

.svijetla .rp-ico-kusaona {
    background-image: url(bg/kusaona-tamna.png);
}

/* responsive */

@media screen and (max-width: 1019px) {

    /* min() keeps tablets from getting a popup wider than the desktop one;
       browsers without min() simply keep the 640px base value */
    .mfp-rich-popup .mfp-content {
        max-width: 94vw;
        max-width: min(94vw, 640px);
    }

    .rich-popup {
        max-width: 94vw;
        max-width: min(94vw, 640px);
        padding: 18px;
    }

    .rich-popup-title {
        font-size: 21px;
        margin-bottom: 15px;
    }

    .rich-popup-gallery {
        margin-bottom: 15px;
    }

    .rich-popup-actions {
        gap: 10px;
    }

    .rp-ico {
        width: 44px;
        height: 44px;
    }
}
