.leaflet-control-container { --wpb-width: var(--container-width); --wpb-padding: 2rem; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, auto); gap: 2rem; width: 100%; height: 100%; max-width: var(--wpb-width); margin-left: auto; margin-right: auto; padding: 3.2rem var(--wpb-padding); position: relative; }
.leaflet-control-container :is(.leaflet-top, .leaflet-bottom) { position: relative; }

@media (min-width: 576px) {
    .leaflet-control-container { --wpb-width: var(--container-width--sm); }
}

@media (min-width: 768px) {
    .leaflet-control-container { --wpb-width: var(--container-width--md); }
}

@media (min-width: 992px) { 
    .leaflet-control-container { --wpb-width: var(--container-width--lg); }
}

@media (min-width: 1200px) {
    .leaflet-control-container { --wpb-width: var(--container-width--xl); }
}

@media (min-width: 1400px) {
    .leaflet-control-container { --wpb-width: var(--container-width--xxl); }
}

@media (min-width: 1600px) {
    .leaflet-control-container { --wpb-width: var(--container-width--xxxl); }
}

/* Button icons */
.leaflet-touch .leaflet-bar a span { color: var(--wpb-text); }

/* Close button */
.leaflet-container a.leaflet-popup-close-button { display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; background-color: var(--wpb-primary); border-radius: 50%; top: -1rem; right: -1rem; transition: background-color var(--ts-15) ease-in-out; }  
.leaflet-container a.leaflet-popup-close-button span { color: #fff; }
.leaflet-container a.leaflet-popup-close-button:hover { background-color: var(--wpb-primary); }

/* Zoom controls */
.leaflet-touch .leaflet-bar { border: none; display: flex; flex-direction: column; row-gap: .8rem; margin: 0; }
.leaflet-touch .leaflet-bar a { display: inline-grid; place-items: center; border-radius: 50%; width: 4rem; height: 4rem; border-radius: 50%; border: none; transition: background-color var(--ts-15) ease-in-out; } 
.leaflet-touch .leaflet-bar a:first-child,
.leaflet-touch .leaflet-bar a:last-child { border-radius: 50%; } 
.leaflet-touch .leaflet-bar a:hover { background-color: var(--wpb-primary); color: #fff; }
.leaflet-touch .leaflet-bar a:hover span { color: #fff; }
  
/* Leaflet Popup */
.leaflet-popup .leaflet-popup-content-wrapper { padding: 0; border-radius: .5rem; box-shadow: 0 4px 20px rgba(0,0,0,0.2); }
.leaflet-popup .leaflet-popup-content { margin: 0; width: 19.5rem!important; }
.leaflet-popup .leaflet-popup-content a { text-decoration: none; }
.leaflet-popup .leaflet-popup-content figure { --aspect-ratio: 48%; position: relative; border-radius: .5rem .5rem 0 0; overflow: hidden; }
.leaflet-popup .leaflet-popup-content figure:after { content: ''; display: block; padding-top: var(--aspect-ratio); }
.leaflet-popup .leaflet-popup-content figure img { position: absolute; width: 100%; height: 100%; object-fit: cover; top: 0; right: 0; bottom: 0; left: 0; }
.leaflet-popup .leaflet-popup-content .leaflet-popup-content__text { padding: 1.4rem; display: flex; flex-direction: column; }
.leaflet-popup .leaflet-popup-content .title { font-size: 1.5rem; font-weight: 700; line-height: 1; margin-bottom: .5rem; }
.leaflet-popup .leaflet-popup-content .address { font-size: 1.3rem; line-height: 1; color: rgba(0,0,0,.75); }
.leaflet-popup .leaflet-popup-content .phone { font-size: 1.3rem; line-height: 1; display: flex; align-items: center; column-gap: .5rem; margin-top: .5rem; }
.leaflet-popup .leaflet-popup-content .phone i { --global-fs: 1rem; }
.leaflet-popup .leaflet-popup-content .email { font-size: 1.3rem; line-height: 1; display: flex; align-items: center; column-gap: .5rem; margin-top: .5rem; }
.leaflet-popup .leaflet-popup-content .email i { --global-fs: 1rem; }
.leaflet-popup .leaflet-popup-tip-container { margin-left: -14px; }

/* Leaflet filters */
.leaflet-filters { display: flex; gap: 1rem; z-index: 1; }  
.leaflet-filters .btn { --p: 0 1.6rem; font-size: 2rem; min-height: 4rem; white-space: nowrap; }


/* Filter dropdowns */
.leaflet-top .leaflet-control .wpb-dropdown .wpb-dropdown__menu { min-width: 20rem; }

@media (max-width: 768.98px) {
    body.post-type-archive-objects.wux-interactive-map .objects-view-form { z-index: 6000; position: fixed; top: 2rem; left: 2rem; right: 2rem; }  
    
    .leaflet-control-container { padding-top: 9.6rem; }

    body.post-type-archive-objects.wux-interactive-map .wux-interactive-map { position: fixed!important; height: 100dvh!important; top: 0; right: 0; bottom: 0; left: 0; z-index: 5000; } 

    /* Leaflet filters */
    .leaflet-top.leaflet-left { grid-column: span 2; }
    .leaflet-top .leaflet-control { max-width: 100%; overflow-x: auto; overflow-y: hidden; margin: 0; scroll-snap-type: x mandatory; }
    .leaflet-top .leaflet-control > * { scroll-snap-align: start; }
    .leaflet-top .leaflet-control::-webkit-scrollbar { display: none; }

    /* Filter dropdowns */
    .leaflet-top .leaflet-control .wpb-dropdown .wpb-dropdown__menu { position: fixed; top: 14.5rem; left: 2rem; right: 2rem; }

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