/* General Page Styling */
body {
    background-color: #f4f4f4; 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-align: center;
    padding-top: 20px;
}

h1 {
    color: #2c3e50;
    margin-bottom: 10px;
}

/* Map Container Styling */
#map { 
    height: 800px; 
    width: 75%; 
    margin: 20px auto; /* Centers the map */
    
    /* The Border Box */
    border: 5px solid #fff; /* White inner border */
    outline: 1px solid #ccc;   /* Thin grey outer line */
    border-radius: 15px;
    
    /* Depth and Shadow */
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.15);
    
    /* Clean finish for the edges */
    overflow: hidden; 
}

/* Custom Popup Styling */
.leaflet-popup-content-wrapper {
    background: rgba(255, 255, 255, 0.6) !important; /* Semi-transparent */
    backdrop-filter: blur(10px);                    /* The "Glass" effect */
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    color: #333;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.leaflet-popup-tip {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(10px);
}

.leaflet-popup-content b {
    color: #d35400; /* A nice burnt orange to match your Palmer vibes */
}

.leaflet-control-layers-list {
    text-align: left !important;
}

.leaflet-control-layers-base::before { 
    content: 'Basemaps';
    font-weight: bold;
    display: block;
    padding: 2px 0 5px 0;
    margin-bottom: 5px;
    border-bottom: 1px solid #000;
    color: #2c3e50;
}

.leaflet-control-layers-overlay::before { 
    content: 'Layers';
    font-weight: bold;
    display: block;
    padding: 10px 0 5px 0;
    margin-bottom: 5px;
    border-bottom: 1px solid #000;
    color: #2c3e50;
}

/* ==============================================
   LEGEND COLOR INDICATORS
   Uses CSS variables from map-layers.css
   ============================================== */

.leaflet-control-layers-overlays label {
    display: flex;
    align-items: center;
    gap: 6px;
}

.leaflet-control-layers-overlays label::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 4px;
    border-radius: 2px;
    flex-shrink: 0;
}

/* Layer-specific colors from CSS variables */
label[data-layer-key="territorialSea"]::before {
    background-color: var(--layer-territorialSea-color);
}

label[data-layer-key="EEZ"]::before {
    background-color: var(--layer-EEZ-color);
}

label[data-layer-key="stateSubmergedLands"]::before {
    background-color: var(--layer-stateSubmergedLands-color);
}

label[data-layer-key="StateMiningClaims"]::before {
    background-color: var(--layer-stateMiningClaims-color)
}