#map {
    background-color: #ffffff
}
html, body, #map {
    overflow: hidden;
}

/* --- MODERN POPUP STYLES --- */
.leaflet-popup-content-wrapper {
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    background: #fff !important;
}
.leaflet-popup-content {
    max-height: 70vh;
    max-width: 70vw;
    padding: 0 !important; /* Remove all padding */
    margin: 0 !important;
    font: 14px/18px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.leaflet-popup-content table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
}

/* --- NEW BANNER STYLE (CSS-Only) --- */
.leaflet-popup-content tr:first-child {
    background-color: #374151; /* Dark gray banner */
}
.leaflet-popup-content tr:first-child th {
    padding: 10px 12px;
    font-weight: 700;
    color: #ffffff; /* White text */
    text-transform: uppercase;
    font-size: 0.75rem; /* 12px */
    letter-spacing: 0.05em;
    border-bottom: none;
    border-top-left-radius: 8px; /* Match popup radius */
}
.leaflet-popup-content tr:first-child td {
    padding: 10px 12px;
    font-weight: 700;
    font-size: 1.1rem; /* 18px */
    color: #ffffff; /* White text */
    border-bottom: none;
    border-top-right-radius: 8px; /* Match popup radius */
}
/* --- END BANNER STYLE --- */


/* --- IMAGE ROW STYLE --- */
.leaflet-popup-content tr:has(img) th,
.leaflet-popup-content tr:has(img) td {
    padding: 0; /* Remove padding from the image row */
    border-top: none; /* Sit flush with banner */
}
.leaflet-popup-content td img,
.leaflet-popup-content img {
    width: 100%;
    height: auto;
    display: block;
    /* Removed top radius, banner is now on top */
}
/* --- END IMAGE STYLE --- */


/* --- NEW DATA ROW STYLES --- */
.leaflet-popup-content th {
    text-align: left;
    vertical-align: middle;
    padding: 10px 12px;
    font-weight: 600;
    color: #4B5563; /* Gray-600 */
    font-size: 0.8rem; /* 13px */
    letter-spacing: 0.025em;
    border-top: 1px solid #F3F4F6; /* Light gray line */
}
.leaflet-popup-content td {
    text-align: left;
    vertical-align: middle;
    padding: 10px 12px;
    font-weight: 600;
    color: #111827; /* Dark text */
    border-top: 1px solid #F3F4F6; /* Light gray line */
}
/* Style the last row */
.leaflet-popup-content tr:last-child th,
.leaflet-popup-content tr:last-child td {
    border-bottom: none; /* Remove last border */
}
/* --- END DATA ROW STYLES --- */


.info {
    padding: 6px 8px;
    font: 14px/16px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color:#f8f8f8 !important;
    color: #444444 !important;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
    border-radius: 5px;
}
.info h2 {
    margin: 0 0 5px;
}
.leaflet-container {
    background: #fff;
    padding-right: 10px;
}
.leaflet-popup-scrolled {
    border-bottom: unset!important;
    border-top: unset!important;
}
.leaflet-tooltip {
    background: none;
    box-shadow: none;
    border: none;
}
.leaflet-tooltip-left:before, .leaflet-tooltip-right:before {
    border: 0px;
}
.fa, .leaflet-container, a {
    color: #444444 !important;
}
.leaflet-control-zoom-in, .leaflet-control-zoom-out,
.leaflet-control-locate a,
.leaflet-touch .leaflet-control-geocoder-icon,
.leaflet-control-search .search-button,
 .leaflet-control-measure {
    background-color: #f8f8f8 !important;
    border-radius: 6px !important;
    color: #444444 !important;
    border: 1px solid #ddd !important;
}
.abstract {
    font: bold 18px 'Lucida Console', Monaco, monospace;
    text-indent: 1px;
    background-color: #f8f8f8 !important;
    width: 30px !important;
    color: #444444 !important;
    height: 30px !important;
    text-align: center !important;
    line-height: 30px !important;
}
.abstractUncollapsed {
    padding: 6px 8px;
    font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
    background-color:#f8f8f8 !important;
    color: #444444 !important;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
    border-radius: 5px;
    max-width: 40%;
}
.leaflet-control {
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.4)!important;
    border-radius: 6px;
}
.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar,
.leaflet-control-search,
.leaflet-control-measure {
    border: 3px solid rgba(255,255,255,.4) !important;
}
.leaflet-control-attribution a {
    color: #0078A8 !important;
}
.leaflet-control-scale-line {
    border: 2px solid #f8f8f8 !important;
    border-top: none !important;
    color: black !important;
}
.leaflet-control-search .search-button {
    width: 30px !important;
    height: 30px !important;
    font-size: 13px !important;
    text-align: center !important;
    cursor: pointer;
}
.search-button.fa.fa-binoculars{
    display: flex;
    justify-content: center;
    align-items: center;
}
.leaflet-control-measure .leaflet-control {
    width: 30px !important;
    height: 30px !important;
}
.leaflet-container .leaflet-control-search{
    background: none !important;
}
.leaflet-control-search .search-input {
    margin: 0px 0px 0px 0px !important;
    height: 30px !important;
}
.leaflet-control-measure {
    background: none!important;
    border-radius: 6px !important;
}
.leaflet-control-measure .leaflet-control-measure-interaction {
    background-color: #f8f8f8 !important;
}
.leaflet-touch .leaflet-control-measure
.leaflet-control-measure-toggle,
.leaflet-touch .leaflet-control-measure
.leaflet-control-measure-toggle:hover {
    width: 30px !important;
    height: 30px !important;
    border-radius: 6px !important;
    background-color: #f8f8f8 !important;
    color: #444444 !important;
    font-size: 13px;
    line-height: 30px;
    text-align: center;
    text-indent: 0%;
}
.leaflet-control-layers {
    padding: 2px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    background-color: #f8f8f8 !important;
    color: #444444 !important;
    border-radius: 6px !important;
}
.leaflet-control-layers-expanded {
    padding-left: 6px;
}	
.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
    display: block;
    background-image: none;
    text-decoration: none;
    margin-bottom: 3px;
}
.leaflet-control-layers-expanded .leaflet-control-layers-toggle::after {
    content: '»';
    font-size: x-large;
    color: #444444 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-align: center;
}
.leaflet-overlay-pane {
    z-index: 550;
}
.leaflet-popup-pane {
    z-index: 700;
}
#gcd-button-control {
    display: flex;
    justify-content: center;
    align-items: center;
}
.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
    display: none;
}