/* ponytail: dropped the global html/body reset from the Strong Towns full-screen
   map layout — it wiped the LUS body padding-top and pushed content under the
   fixed nav. The embedded map only needs #map-container sizing below. */

.header_bar {
    width: 100%;
}

.map-header {
    background: rgba(42, 167, 135, 0.4);
    padding: 0px 0px 5px 0px;
    width: 100%;
}

#map-container {
    position: relative;
    width: 100%;
    height: 800px;
}

#map {
    width: 100%;
    height: 100%;
}

.map-header .nav-pills {
    --bs-nav-pills-link-active-color: #000;
    --bs-nav-pills-link-active-bg: #fff;
    --bs-nav-link-color: #000;
}

.map-header .nav-item {
    min-width: 100px;
    text-align: center;
}

.map-header .nav-link {
    margin: 2px;
    border-radius: 0.375rem;
}

.map-header .nav-item .inactive {
    background: rgba(255, 255, 255, 0.4);
}

.map-overlay {
    position: absolute;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 3px;
    padding: 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    z-index: 1002;
}

#legend {
    position: absolute; /* Changed from fixed to absolute */
    bottom: 20px;
    right: 10px;
    width: 250px;
    z-index: 1500; /* Increased z-index to ensure it stays on top */
}

#info-box {
    top: 10px;
    right: 10px;
    width: 300px;
    display: none;
}

.legend-item {
    margin-bottom: 5px;
}

.color-box {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 5px;
    vertical-align: middle;
}

.info-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #007bff;
    color: #fff;
    text-align: center;
    font-size: 12px;
    line-height: 16px;
    cursor: pointer;
    margin-left: 5px;
}

.leaflet-top {
    top: 10px;
}

.collapsible-header {
    cursor: pointer;
}

.arrow-indicator {
    font-size: 0.9em;
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.popup-content {
    min-width: 200px;
}
.property-info {
    margin-bottom: 5px;
}
.property-label {
    font-weight: bold;
}

/* Fullscreen button styling */
.fullscreen-control {
    position: absolute;
    top: 10px;
    right: 0px;
    z-index: 1000;
    background: white;
    border-radius: 4px;
    padding: 5px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.65);
    cursor: pointer;
}

.fullscreen-icon {
    width: 26px;
    height: 26px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.enter-fullscreen {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"><path d="M1.5 1a.5.5 0 0 0-.5.5v4a.5.5 0 0 1-1 0v-4A1.5 1.5 0 0 1 1.5 0h4a.5.5 0 0 1 0 1h-4zM10 .5a.5.5 0 0 1 .5-.5h4A1.5 1.5 0 0 1 16 1.5v4a.5.5 0 0 1-1 0v-4a.5.5 0 0 0-.5-.5h-4a.5.5 0 0 1-.5-.5zM.5 10a.5.5 0 0 1 .5.5v4a.5.5 0 0 0 .5.5h4a.5.5 0 0 1 0 1h-4A1.5 1.5 0 0 1 0 14.5v-4a.5.5 0 0 1 .5-.5zm15 0a.5.5 0 0 1 .5.5v4a1.5 1.5 0 0 1-1.5 1.5h-4a.5.5 0 0 1 0-1h4a.5.5 0 0 0 .5-.5v-4a.5.5 0 0 1 .5-.5z"/></svg>');
}

.exit-fullscreen {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"><path d="M5.5 0a.5.5 0 0 1 .5.5v4A1.5 1.5 0 0 1 4.5 6h-4a.5.5 0 0 1 0-1h4a.5.5 0 0 0 .5-.5v-4a.5.5 0 0 1 .5-.5zm5 0a.5.5 0 0 1 .5.5v4a.5.5 0 0 0 .5.5h4a.5.5 0 0 1 0 1h-4A1.5 1.5 0 0 1 10 4.5v-4a.5.5 0 0 1 .5-.5zM0 10.5a.5.5 0 0 1 .5-.5h4A1.5 1.5 0 0 1 6 11.5v4a.5.5 0 0 1-1 0v-4a.5.5 0 0 0-.5-.5h-4a.5.5 0 0 1-.5-.5zm10 1a1.5 1.5 0 0 1 1.5-1.5h4a.5.5 0 0 1 0 1h-4a.5.5 0 0 0-.5.5v4a.5.5 0 0 1-1 0v-4z"/></svg>');
}

/* Fullscreen mode styles */
.map-fullscreen {
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 9999 !important;
}

/* Responsive adjustments for small screens */
@media screen and (max-width: 768px) {
    #legend {
        bottom: 10px;
        right: 5px;
        width: 200px;
        max-height: 30vh;
        overflow-y: auto;
    }
    
    #info-box {
        top: 5px;
        right: 5px;
        width: calc(100% - 10px);
        max-width: 300px;
    }
    
    #map-container {
        height: 70vh; /* Better height for mobile */
    }
    
    .fullscreen-control {
        top: 70px; /* To avoid overlap with other controls on mobile */
    }
}