/* General OpenLayers & Popup Styles */
.ol-control button,
.ol-attribution,
.ol-scale-line-inner {
}

.ol-popup {
    font-size: 12px;
    position: absolute;
    background-color: white;
    -webkit-filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
    filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #cccccc;
    bottom: 12px;
    left: -50px;
    min-width: 100px;
}

.ol-popup dl {
    margin-bottom: 0;
}

.ol-popup:after,
.ol-popup:before {
    top: 100%;
    border: solid transparent;
    content: " ";
    height: 0;
    width: 0;
    position: absolute;
    pointer-events: none;
}

.ol-popup:after {
    border-top-color: white;
    border-width: 10px;
    left: 48px;
    margin-left: -10px;
}

.ol-popup:before {
    border-top-color: #cccccc;
    border-width: 11px;
    left: 48px;
    margin-left: -11px;
}

.ol-popup-closer {
    text-decoration: none;
    position: absolute;
    top: 2px;
    right: 8px;
}

.ol-popup-closer:after {
    content: "✖";
    color: #c3c3c3;
}

img.marker-icon {
    max-height: 45px;
}

/* Ensure the Leaflet container stays below other UI elements */
.leaflet-container {
    z-index: 1;
}

/* Pagination: Ensure styles only apply inside `.tt_address_list` */
.tt_address_list .f3-widget-paginator {
    display: flex !important;
    justify-content: center !important; /* Center-align */
    align-items: center !important;
    flex-wrap: nowrap !important; /* Prevents line breaks */
    gap: 12px !important; /* Ensures even spacing */
    margin: 15px auto !important;
    padding: 8px !important;
    position: relative !important;
    z-index: 10;
    width: auto !important;
    max-width: 100%;
}

/* Fix floating issues */
.tt_address_list .f3-widget-paginator li {
    list-style: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    float: none !important; /* Remove any unwanted float */
}

/* Pagination Circles */
.tt_address_list .f3-widget-paginator a,
.tt_address_list .f3-widget-paginator .current {
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-decoration: none !important;
    font-size: 16px !important;
    font-weight: bold !important;
    width: 2rem !important; /* Uniform size */
    height: 2rem !important;
    border-radius: 50% !important;
    border: 2px solid #0F0671 !important;
    background-color: white !important;
    color: #0F0671 !important;
    transition: all 0.2s ease-in-out !important;
    text-align: center !important;
}

/* Active Page (Current) - Full Background Fix */
.tt_address_list .f3-widget-paginator .current {
    background-color: #0F0671 !important;
    color: white !important;
    cursor: default !important;
    z-index: 2 !important;
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 2rem !important;
    height: 2rem !important;
    border: 6px solid #0F0671 !important; /* ✅ Updated border thickness */
}


/* Previous ("<") & Next (">") Buttons with CSS Content */
.tt_address_list .f3-widget-paginator .previous a::before {
    content: "" !important; /* Double angle left */
    font-size: 20px !important;
}

.tt_address_list .f3-widget-paginator .next a::before {
    content: "" !important; /* Double angle right */
    font-size: 20px !important;
}

/* Style Previous & Next Buttons */
.tt_address_list .f3-widget-paginator .previous a,
.tt_address_list .f3-widget-paginator .next a {
    width: 2.5rem !important; /* Slightly bigger for visibility */
    height: 2.5rem !important;
    background-color: white !important;
    border: 2px solid #0F0671 !important;
    color: #0F0671 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    font-weight: bold !important;
    border-radius: 50% !important;
}

/* Hover effect */
.tt_address_list .f3-widget-paginator a:hover,
.tt_address_list .f3-widget-paginator .previous a:hover,
.tt_address_list .f3-widget-paginator .next a:hover {
    background-color: #0F0671 !important;
    color: white !important;
}

/* Mobile Optimization */
@media (max-width: 480px) {
    .tt_address_list .f3-widget-paginator {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        padding: 5px !important;
    }
}

/* Hides the base-layer group in the LayerSwitcher UI */
.layer-switcher-base-group {
    display: none !important;
}

.layer-switcher.shown {
    max-height: 100% !important;
}

.layer-switcher {
    position: absolute;
    top: 0.5em !important;
    left: 3em !important;
    right: unset !important;
    text-align: left;
}

.vcard .row {
    margin-bottom: 2rem !important;
    border-bottom: 1px solid #000;
    padding-bottom: 2rem !important;
}

.vcard b {
    font-weight: 500;
}

.ol-popup {
    bottom: 12px;
    left: -48px;
    min-width: 300px;
}

.ol-popup p {
    margin: 5px 0px;
}

.layer-switcher li input {
    position: absolute;
    left: 1em;
    top: 0.25em;
    height: 1em;
    width: 1em;
    font-size: 1em;
}

.layer-switcher li label {
    padding-left: 3em;
    padding-right: 3em;
    display: inline-block;
    margin-top: 1px;
    font-size: 0.8em;
}

.layer-switcher button {
    float: right;
    z-index: 1;
    width: 38px;
    height: 38px;
    background: white; /* Ensure background is visible */
    color: black;
    border: none;
    font-size: 20px; /* Adjust icon size */
    font-weight: bold;
    text-align: center;
    line-height: 38px; /* Vertically center the icon */
    cursor: pointer;
}

/* Add the filter icon using CSS content */
.layer-switcher button::before {
    content: "\1F756"; /* Unicode character for settings/filter */
    display: block;
}

.ol-viewport {
    cursor: pointer; /* Cursor changes when hovering over the map */
}

.ol-full-screen {
    right: unset;
    left: 0.5em;
}

.ol-full-screen button, .ol-zoom button {
    height:38px;
    width:38px;
}

.ol-zoom {
    top: 3em;
}

.ol-control button {
    background-color: #0F0671 !important;
    color: #FFF !important;
}

.ol-popup-closer:after {
    color: #0F0671;
}