﻿body,
body * {
    font-family: 'Avenir', sans-serif;
}

p {
    font-family: 'Avenir', sans-serif;

}

#map {
    height: 100%;
    width:75%;
}

.popupL .leaflet-popup-content-wrapper {
    background: #023250;
    color: #eee;
    font-size: 12px;
    line-height: 18px;
    border-radius: 0;
    border: 1px solid #023250;
}

.popupL .leaflet-popup-tip {
    background: #023250;
}

.popupL .leaflet-popup-content {
    margin: 0;
    min-width: 600px;
}

.popUpTitle {
    color: #1a1a1a;
    padding-bottom: 0;
}


.popUpBody p {
    font-size:16px !important;
    line-height:21px;
    font-weight:normal;
}

#communitySelect {
    padding:10px;
    margin-top:20px;
    cursor: pointer;
}


#clearSelection {
    background-color:#fff;
    border:solid 1px #fff !important;
    padding:5px;
    border-radius:2px;
    cursor:pointer;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    margin-top: 6px;
    font-family: 'Avenir', sans-serif;
}

.styled-label {
    cursor: pointer;
    font-size: 12px;
    color: #333;
}


.checkbox-icon {
    width: 24px;
    height: 24px;
    display: inline-block;
    margin-left:2px;
    margin-right:2px;
    padding:2px;
}


.checkbox-icon svg {
    width: 24px;
    height: 24px;
    display: block;
    margin: auto;
}


#mapProductUI {
    display: grid;
    grid-template-columns: 1fr; /* mobile: stacked */
    grid-template-rows: auto 1fr; /* legend row + content row */
    gap: 12px;
}

    #mapProductUI .legend-bar {
        grid-column: 1;
    }

    #mapProductUI .map-col {
        grid-column: 1;
    }

    #mapProductUI .panel-col {
        grid-column: 1;
    }

@media (min-width: 992px) {
    #mapProductUI {
        grid-template-columns: 3fr 1fr; /* ≈ col-9 / col-3 */
        grid-template-rows: auto 1fr;
    }

        #mapProductUI .legend-bar {
            grid-column: 1 / span 2;
        }

        #mapProductUI .map-col {
            grid-column: 1;
        }

        #mapProductUI .panel-col {
            grid-column: 2;
        }
}

/* Map & panel sizing/visuals*/
#map {
    min-height: 600px;
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
}

.panel-col,
.details-panel {
    background: #f6fafd; 
    border-radius: 8px;
    padding: 12px;
    overflow: auto;
    max-height:600px;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

#detailsCard.d-none {
    display: none !important;
}

/* Legend */
.legend-bar,
.layer-controls { 
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.legend-bar .btn,
.legend-bar button,
#layerControls > * {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 5px;
    background: #e9f1f7;
    cursor: pointer;
    max-height: 20px;
    margin: 20px;
    border-radius: 8px;
    margin: 8px;
    border: solid 1px #92bdd7;
    box-shadow: 0px 0px 8px #dddddd
}

#layerControls .layer-toggle,
.legend-bar .layer-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    margin: 8px;
    border-radius: 8px;
    border: 1px solid #92bdd7; 
    background: #e9f1f7; 
    box-shadow: 0 0 8px #ddd; 
    cursor: pointer;
    user-select: none;
    transition: background-color .15s, box-shadow .15s, outline .15s, border-color .15s;
    position: relative;
    min-height: 56px;
}

#layerControls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px; 
    align-items: stretch;
}


#layerControls .layer-toggle {
flex: 1 1 120px; 
max-width: 160px; 
display: flex;
align-items: center;
justify-content: flex-start;
text-align: left;
white-space: normal; /* let long text wrap */
word-break: break-word; /* break really long words if needed */
height: auto; 
padding: 6px 10px;
box-sizing: border-box;
}

#layerControls .layer-toggle .checkbox-icon {
    align-self: flex-start;
    margin-right: 6px;
}


    
#layerControls .layer-toggle > input[type="checkbox"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none; 
}


#layerControls .layer-toggle:hover {
    background: #dbeaf5;
    outline: 3px solid #92bdd7; 
    outline-offset: 0;
}

/* checked/active*/
    #layerControls .layer-toggle.is-on {
        background: #e9f1f7;
        border: solid 2px #0068b3;
        box-shadow: none; 
    } 

/* unchecked */
    #layerControls .layer-toggle.is-off {
        background: #f8f8f8;
        border: solid 2px #ddd;
        box-shadow: none;
    }

       
#layerControls .layer-toggle:focus-within {
    outline: 3px solid #0b4687;
    outline-offset: 2px;
}


.legend-bar label {
margin:10px;
}

.legend-btn[aria-pressed="true"] {
background: #0b4687;
color: #fff;
border-color: #0b4687;
}


.leaflet-container {
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}


.leaflet-popup-pane,
.leaflet-popup {
    display: none !important;
}


.leaflet-control-container {
    z-index: 500;
}


.leaflet-control-reset a {
    width: 30px;
    height: 30px;
    line-height: 30px;
    display: block;
    text-align: center;
    background: #fff;
    border: 2px solid #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    font-weight: 600;
    text-decoration: none;
    color: #333;
    
}

.leaflet-control-reset a:focus {
    outline: 2px solid #0b4687;
    outline-offset: 2px;
}


#layerControls .layer-toggle .checkbox-icon,
.legend-bar .layer-toggle .checkbox-icon {
    align-self: center; 
    display: inline-flex; 
    align-items: center;
    justify-content: center;
    width: 24px; 
    height: 24px;
    margin-right: 6px;
}

#layerControls .layer-toggle .checkbox-icon svg,
.legend-bar .layer-toggle .checkbox-icon svg {
    display: block; 
    vertical-align: middle;
}


