.leaflet-bar {
    border-radius: 0 !important;
}
.leaflet-touch .leaflet-bar a {
    width: 26px !important;
    height: 26px !important;
    line-height: 26px !important;
}

.leaflet-bar a {
    color: var(--baseDarker) !important;
    transition: background-color 0.25s ease !important;
}

.leaflet-right .leaflet-control {
    margin-right: 15px !important;
}

.leaflet-top .leaflet-control {
    margin-top: 15px !important;
}

.leaflet-bottom {
    bottom: 3px !important;
}

#map {
    font-family: var(--fontDefault) !important;
}

.leaflet-container {
    font-size: 0.75rem !important;
}
.leaflet-control-scale-line {
    color: var(--baseDark);
}
.leaflet-bottom .leaflet-control-scale {
	margin-bottom: 10px !important;
	}

/* marker */
svg.leaflet-zoom-animated g path:hover {
    stroke-width: 2;
}

/* popups */
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
    color: var(--text) !important;
    box-shadow: 0px 0px 4px 0 var(--black-20) !important;
}
.leaflet-popup-content-wrapper {
    padding: 0 !important;
    border-radius: 0 !important;
}
.leaflet-popup-content {
    margin: 0 !important;
}
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
    color: var(--text) !important;
}
.leaflet-popup-tip-container {
    width: 20px !important;    
    margin-left: -10px !important;
}
.leaflet-container a {
    color: var(--highlight) !important;

}
.leaflet-container a.leaflet-popup-close-button {
    color: whitesmoke !important;
    width: 20px !important;
}
.leaflet-container a.leaflet-popup-close-button:hover {
    color: var(--highlightLight) !important;
}
.leaflet-popup-tip {
    display: none !important; 
}
.popupwrapper {
    border: solid 1px var(--highlight);
}
.popupwrapper .photowrapper {
    padding: 0 0.7em 0.5em 0.5em;
    position: relative; 
    max-width: 100%; 
    overflow: hidden;
}
.popupwrapper .photowrapper img {
    width: 100%;
    border: 1px solid var(--highlightLight);
}

.photowrapper .photo-prev, .photowrapper .photo-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%); 
    background: rgba(0,0,0,0.5); 
    color: white; 
    border: none; 
    cursor: pointer;
    padding-bottom: 3px;
}
.photowrapper .photo-prev {    
    left: 8px;
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px; 
    padding-right: 6px;
}
.photowrapper .photo-next {
    right: 8px;
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px; 
    padding-left: 6px; 
}

.leaflet-popup.leaflet-zoom-animated {
    bottom: -15px !important; 
    left: 5px !important; 
}

.details-link {
    font-weight: bold;    
    text-align: center;
    padding-bottom: 0.1em;
}


.leaflet-popup-sites h3, .leaflet-popup-boreholes h3, .leaflet-popup-sites h4, .leaflet-popup-boreholes h4  {
    background: var(--highlight);
    padding: 0.5em 1.5em 0.5em 0.5em;
    color: whitesmoke;
    font-size: 0.95rem;
    margin: 0;
}
.leaflet-popup-sites p, .leaflet-popup-boreholes p {
    margin: 0.25em 0.5em !important;
    font-size: 0.85rem !important;
    line-height: 1.2 !important;
}
.leaflet-popup-sites p:first-of-type, .leaflet-popup-boreholes p:first-of-type  {
    margin-top: 0.5em !important;
}
.leaflet-popup-sites p:last-of-type, .leaflet-popup-boreholes p:last-of-type  {
    margin-bottom: 0.6em !important;
}

.hover-hint, .leaflet-control-map-settings.leaflet-control, .leaflet-control-legend {
    border: 2px solid rgba(0,0,0,0.2); 
    border-radius: 0; 
    background-color: var(--white-50); backdrop-filter: blur(0.5em);
    box-shadow: 0px 0px 4px 0 var(--black-20);
    padding: 0;
}
.hover-hint {
    margin: 15px 0 10px 15px;
    pointer-events: none;
    white-space: nowrap;
}
.hover-hint p {
    margin: 0;
    padding: 0.25em 0.5em;
    font-size: 0.85rem;
}

.hover-hint h3, .leaflet-control-map-settings.leaflet-control h3, .leaflet-control-legend h3 { 
    margin: 0 0 0.25em 0;
    padding: 0.25em 0.5em;
    font-size: 0.9rem;
    background-color: var(--black-10); 
    display: block;
}
.leaflet-control-map-settings.leaflet-control h3, .leaflet-control-legend h3 {
    padding: 0.5em 0.75em;
    font-size: 0.9rem;
}
.hover-hint .sub {
    margin: 0.25em 0 0 0;
    padding: 0.25em 0.5em;
    font-weight: normal;
    font-size: 0.9rem;
    background-color: var(--black-05); 
    font-style: italic;
    text-align: center;
    display: block;
}

.leaflet-control-map-settings.leaflet-control {
    position: absolute;
    right: 45px;
    top: 0;
    width: 170px;    
}
.leaflet-control-map-settings.leaflet-control .inner, .leaflet-control-legend .inner {
    margin: 0;
    padding: 0.5em 1em 0.5em 1em;
}
.leaflet-control-map-settings.leaflet-control .inner p, .leaflet-control-legend .inner p {
    margin:  0.25em 0;
    font-size: 0.85rem;
}
.leaflet-control-map-settings.leaflet-control .inner h4, .leaflet-control-legend .inner h4 {
    margin: 0 0 0.6em 0;
    font-size: 0.8rem;
    font-weight: bold;
}

#topo-map, #sat-map {
    width: 60px;
    height: 60px;
    border-radius: 5px;
    border: 2px solid var(--grey-50);
}


/* Attribution */
.leaflet-control-attribution { margin-bottom: 10px !important; margin-right: 15px !important;}
.leaflet-control-attribution.leaflet-control { width: 26px; height: 26px; line-height: 26px; overflow: hidden; margin-right: 10px; margin-bottom: 10px; margin-left: 10px !important; padding: 0 !important; border: 2px solid rgba(0,0,0,0.2); border-radius: 0; background: rgba(255, 255, 255, 1) padding-box !important; text-align: center; background-size: 26px 26px; background-clip: padding-box; }
.leaflet-control-attribution.leaflet-control:hover { width: auto; max-width: 50%; height: 100%; line-height: max(15px) !important; padding: 0.5em 0.75em !important; background-color: var(--white-50) !important; backdrop-filter: blur(0.5em) !important; text-align: left; box-shadow: 0px 0px 4px 0 var(--black-20); }
.leaflet-control-attribution.leaflet-control svg { padding-top: 2px; } 
.leaflet-control-attribution.leaflet-control:hover svg { display: none; }


/* geometries */
.leaflet-gtnpsites-pane .leaflet-interactive:hover {
    stroke-opacity: 0.66;
}

.leaflet-gtnpPTmarkers-pane path.leaflet-interactive.notselected {
    fill: var(--marker_PT_notselected_fillColor);
    stroke: var(--marker_PT_notselected_strokeColor);
}
.leaflet-gtnpALTmarkers-pane path.leaflet-interactive.notselected {
    fill: var(--marker_ALT_notselected_fillColor);
    stroke: var(--marker_ALT_notselected_strokeColor);
}
.leaflet-gtnpPTmarkers-pane path.leaflet-interactive.selected {
    fill: var(--marker_PT_selected_fillColor);  
    stroke: var(--marker_PT_selected_strokeColor);
}
.leaflet-gtnpALTmarkers-pane path.leaflet-interactive.selected {
    fill: var(--marker_ALT_selected_fillColor);  
    stroke: var(--marker_ALT_selected_strokeColor);
}

path.leaflet-interactive.samesite {
    stroke: black !important;
}

path.bbox.leaflet-interactive:hover {
    stroke-width: 3;
}
path.ptmarker.leaflet-interactive:hover, path.altmarker.leaflet-interactive:hover {
    stroke-width: 3;
    fill: yellow;
}


/* adjustments for smallmap */
#smallmap .leaflet-right .leaflet-control {
    margin-right: 5px !important;
}
#smallmap .leaflet-control-attribution {
    margin-bottom: 5px !important;
}
#smallmap .leaflet-top .leaflet-control {
    margin-top: 5px !important;
}
#smallmap .leaflet-bottom {
    bottom: 0 !important;
}
#smallmap .leaflet-bottom .leaflet-control-scale {
    margin-bottom: 5px !important;
}
#smallmap .leaflet-left .leaflet-control {
    margin-left: 5px;
}

/* Map Legend */
.legend h4 {
    margin: 0 0 0.25rem 0 !important;
}
.legend-list {
    list-style: none;
    padding: 0;
    margin: 0 0 0.5rem;
}
.legend-list:last-child {
    margin-bottom: 0;
}
.legend-item {
    display: flex;
    align-items: center;
    margin: 0.05rem 0;
}

.legend-marker {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    margin-right: 0.5rem;
    border-radius: 50%;
    box-sizing: border-box;
}

/* Markers */
.legend-marker.pt_selected { background: var(--marker_PT_selected_fillColor); border: 1px solid var(--marker_PT_selected_strokeColor); opacity: 0.8; }
.legend-marker.pt_not_selected { background: var(--marker_PT_notselected_fillColor); border: 1px solid var(--marker_PT_notselected_strokeColor); opacity: 0.8; }
.legend-marker.pt_nodata { background: var(--marker_PT_nodata_fillColor); border: 1px solid var(--marker_PT_nodata_strokeColor); }

.legend-marker.alt_selected { background: var(--marker_ALT_selected_fillColor); border: 1px solid var(--marker_ALT_selected_strokeColor); opacity: 0.8; }
.legend-marker.alt_not_selected { background: var(--marker_ALT_notselected_fillColor); border: 1px solid var(--marker_ALT_notselected_strokeColor); opacity: 0.8; }
.legend-marker.alt_nodata { background: var(--marker_ALT_nodata_fillColor); border: 1px solid var(--marker_ALT_nodata_strokeColor); }

.legend-text {
    flex: 1;
    text-align: left;
    color: #222;
}
h4#legendCCIheading {
    font-weight: var(--font-semi-bold);    
}


@container mapContainer (max-width: 372px) {  
    .leaflet-top .leaflet-control {
        margin-top: 0.5rem !important;
    }
    .leaflet-right .leaflet-control {
        margin-right: 0.5rem !important;
    }
    .leaflet-left .leaflet-control {
        margin-left: 0.5rem !important;
    }
    .leaflet-bottom .leaflet-control {
        margin-bottom: 0.5rem !important;
    }
}


@container mapContainer (max-width: 265px) {
    .leaflet-top .leaflet-control {
        margin-top: 4rem !important;
    }
}