/* General Map Styling */
#map {
    background-color: #ffffff;
}

html, body, #map {
    overflow: hidden;
}

.col9 {
    height: 100% !important;
}

.col3 {
    height: 100%;
    overflow: auto;
}

/* Info Box */
.info {
    padding: 8px 10px;
    font: 14px/16px Arial, Helvetica, sans-serif;
    background-color: #f8f8f8 !important;
    color: #c66061 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-radius: 6px;
}

.info h2 {
    margin: 0 0 8px;
}

/* Leaflet Container */
.leaflet-container {
    background: #fff;
    padding-right: 10px;
}

/* Popup Styling */
.leaflet-popup-scrolled {
    border: none !important;
}

.leaflet-popup-content {
    max-height: 70vh;
    max-width: 70vw;
}

.leaflet-popup-content.media {
    width: auto !important;
    height: auto !important;
}

.leaflet-popup-content th {
    text-align: left;
    vertical-align: top;
    min-width: 75px;
}

.leaflet-popup-content td {
    min-width: 75px;
}

.leaflet-popup-content td img {
    max-height: 60vh;
    max-width: 60vw;
}

/* Tooltip Styling */
.leaflet-tooltip {
    background: none;
    box-shadow: none;
    border: none;
}

.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
    border: none;
}

/* Custom Icon Colors */
.fa, .leaflet-container, a {
    color: rgba(0, 0, 0, 0.7) !important;
}

/* Specific style for the "More Info" link */
a.more-info-link {
    color: blue !important; /* Override any general styles */
    text-decoration: underline; /* Optional: to differentiate it as a link */
}


/* Icon Button Styling (Search, Measure, Zoom) */
.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: rgba(0, 0, 0, 0.7) !important;
    width: 40px !important;
    height: 40px !important;
    font-size: 16px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.leaflet-control-zoom-in:hover,
.leaflet-control-zoom-out:hover,
.leaflet-control-locate a:hover,
.leaflet-touch .leaflet-control-geocoder-icon:hover,
.leaflet-control-search .search-button:hover,
.leaflet-control-measure:hover {
    background-color: rgba(0, 0, 0, 0.1) !important;
    transform: scale(1.1);
}

/* Measurement Tool General Styling */
.leaflet-control-measure {
    background: #f8f8f8 !important; /* Same background as other icons */
    border-radius: 6px !important;
    color: rgba(0, 0, 0, 0.7) !important;
    position: relative; /* Ensure positioning for hover popup */
    width: 40px !important; /* Ensure consistent size */
    height: 40px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); /* Consistent shadow */
    transition: background-color 0.3s ease, transform 0.3s ease;
}

/* Hover Effect for Measurement Tool */
.leaflet-control-measure:hover {
    background-color: rgba(0, 0, 0, 0.1) !important; /* Slightly darker on hover */
    transform: scale(1.1); /* Scale up slightly on hover */
}

/* Hover Popup for Measurement */
.leaflet-control-measure .leaflet-control-measure-interaction {
    background-color: #f8f8f8 !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    position: absolute;
    top: 50%; /* Position the popup vertically relative to the button */
    left: 110%; /* Offset slightly to the right of the button */
    transform: translateY(-50%); /* Center vertically */
    padding: 8px 12px;
    white-space: nowrap; /* Prevent wrapping */
    z-index: 1000; /* Ensure visibility */
    display: none; /* Initially hidden */
    color: rgba(0, 0, 0, 0.7);
    font-size: 14px;
}

/* Show the Popup on Hover */
.leaflet-control-measure:hover .leaflet-control-measure-interaction {
    display: block; /* Show on hover */
}

/* Adjust Popup Position if Near Viewport Edges */
.leaflet-control-measure .leaflet-control-measure-interaction[data-position="left"] {
    left: auto;
    right: 110%; /* Move to the left if near the right viewport edge */
}

/* Abstract Box */
.abstract {
    font: bold 18px 'Lucida Console', Monaco, monospace;
    background-color: #f8f8f8 !important;
    color: rgba(0, 0, 0, 0.7) !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 6px !important;
    text-align: center;
    line-height: 40px !important;
}

.abstractUncollapsed {
    padding: 8px 10px;
    font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
    background-color: #f8f8f8 !important;
    color: rgba(0, 0, 0, 0.7) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    max-width: 40%;
}

/* Leaflet Controls */
.leaflet-control {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar,
.leaflet-control-search,
.leaflet-control-measure {
    border: 3px solid rgba(255, 255, 255, 0.4) !important;
}

/* Attribution */
.leaflet-control-attribution a {
    color: #0078A8 !important;
}

/* Scale Line */
.leaflet-control-scale-line {
    border: 2px solid #f8f8f8 !important;
    border-top: none !important;
    color: black !important;
}

/* Search Button */
.leaflet-control-search .search-button {
    font-size: 16px !important;
    text-align: center !important;
    line-height: 40px !important;
}

/* Layers Control */
.leaflet-control-layers {
    padding: 8px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    background-color: #f8f8f8 !important;
    color: rgba(0, 0, 0, 0.7) !important;
    border-radius: 6px;
}

.leaflet-control-layers-expanded {
    padding-left: 10px;
}

.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
    display: block;
    background-image: none;
    text-decoration: none;
    margin-bottom: 5px;
}

.leaflet-control-layers-expanded .leaflet-control-layers-toggle::after {
    content: '»';
    font-size: x-large;
    color: rgba(0, 0, 0, 0.7) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Popup and Overlay Pane Z-Index */
.leaflet-overlay-pane {
    z-index: 550;
}

.leaflet-popup-pane {
    z-index: 700;
}




/* Elevation Activation Button */
.activate-elevation-btn {
    background-color: #f8f8f8; /* Matches the general map styling */
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: bold;
    color: rgba(0, 0, 0, 0.7);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); /* Consistent shadow */
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    z-index: 1000; /* Ensure visibility above map layers */
}

/* Hover Effect for Elevation Button */
.activate-elevation-btn:hover {
    background-color: rgba(0, 0, 0, 0.1); /* Slightly darker on hover */
    color: #000;
    transform: scale(1.05); /* Slight zoom effect on hover */
}

/* Elevation Popup Styling */
.leaflet-popup-content.elevation-popup {
    background-color: #f8f8f8; /* Matches other popups */
    border-radius: 6px; /* Consistent border radius */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); /* Consistent shadow */
    font-size: 14px; /* Standard font size */
    line-height: 1.5; /* Comfortable spacing */
    padding: 10px;
    text-align: center; /* Center text for better visual clarity */
    color: #333;
}

/* Elevation Popup Title */
.leaflet-popup-content.elevation-popup h4 {
    margin: 0 0 8px; /* Spacing below the title */
    font-size: 16px; /* Slightly larger font for title */
    color: #0078A8; /* Blue to match other map controls */
}

/* Elevation Popup Data */
.leaflet-popup-content.elevation-popup p {
    margin: 0; /* Remove unnecessary spacing */
    font-size: 14px; /* Keep consistent with other popup content */
    color: #333;
}

