body, html { 
    margin: 0; 
    padding: 0; 
    height: 100%; 
    font-family: Arial, sans-serif; 
    overflow: hidden; 
}

#container { 
    display: flex; 
    height: 100vh; 
    width: 100vw; 
}

/* Landscape mode: Equal split (50/50) for map and details */
@media (orientation: landscape) {
    #map-container { 
        width: 50vw; 
        height: 100vh; 
        flex-shrink: 0; 
        position: relative;
    }
    #details { 
        width: 50vw; 
        height: 100vh; 
        padding: 20px; 
        background: #f8f8f8; 
        overflow-y: auto; 
    }
    #portrait-message { 
        display: none; 
    }
}

/* Portrait mode: Map on top, details below */
@media (orientation: portrait) {
    #container { 
        flex-direction: column; 
    }
    #map-container { 
        width: 100vw; 
        height: 60vh; 
        flex-shrink: 0; 
        position: relative;
    }
    #details { 
        width: 100vw; 
        height: 40vh; 
        padding: 15px; 
        background: #f8f8f8; 
        overflow-y: auto; 
        box-sizing: border-box; 
    }
    #portrait-message { 
        display: none; 
    }
}

/* Active filter indicator overlay */
.active-filter {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #3388ff;
    border-radius: 6px;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #3388ff;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.active-filter.hidden {
    display: none;
}

.close-filter-btn {
    background: none;
    border: none;
    color: #ff4444;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-filter-btn:hover {
    background: rgba(255, 68, 68, 0.1);
    transform: scale(1.1);
}

/* Content wrapper to ensure proper scrolling */
#details-content {
    min-height: calc(100% + 7em);
    padding-bottom: 7em;
}

.detail-section {
    margin-bottom: 20px;
}

.detail-section h3 {
    color: #333;
    border-bottom: 2px solid #3388ff;
    padding-bottom: 5px;
    margin-bottom: 10px;
}

.detail-row {
    display: flex;
    margin-bottom: 5px;
}

.detail-label {
    font-weight: bold;
    min-width: 150px;
    color: #555;
}

.detail-value {
    flex: 1;
    color: #333;
}

.list-value {
    color: #333;
}

.number-value {
    color: #2c7fb8;
    font-weight: 500;
}

/* Feature toggle buttons styles - Enhanced for snappy behavior */
.features-section {
    margin-top: 20px;
}

.features-section h3 {
    color: #333;
    border-bottom: 2px solid #3388ff;
    padding-bottom: 5px;
    margin-bottom: 15px;
}

.feature-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.feature-toggle {
    padding: 8px 16px;
    border: 2px solid #3388ff;
    background-color: white;
    color: #3388ff;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s ease;
    white-space: nowrap;
    user-select: none;
}

.feature-toggle:hover {
    background-color: #e6f3ff;
    transform: translateY(-1px);
}

.feature-toggle:active {
    transform: translateY(0);
}

.feature-toggle.active {
    background-color: #3388ff;
    color: white;
    box-shadow: 0 2px 8px rgba(51, 136, 255, 0.3);
}

.feature-toggle.active:hover {
    background-color: #2968cc;
}

/* Points of Interest List Styling */
.poi-list {
    margin-top: 15px;
}

.poi-list h3 {
    color: #333;
    border-bottom: 2px solid #3388ff;
    padding-bottom: 5px;
    margin-bottom: 10px;
    font-size: 16px;
}

.poi-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.poi-items li {
    padding: 8px 12px;
    margin: 4px 0;
    background: #f0f7ff;
    border-left: 3px solid #3388ff;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
}

.poi-items li:nth-child(odd) {
    background: #f8fbff;
}

.poi-no-items {
    padding: 15px;
    text-align: center;
    color: #666;
    font-style: italic;
    background: #f9f9f9;
    border-radius: 4px;
    margin-top: 10px;
}

/* Custom marker styles - 50% smaller */
.leaflet-marker-icon {
    transform: scale(0.5);
    transform-origin: center bottom;
}

.leaflet-marker-shadow {
    transform: scale(0.5);
    transform-origin: center bottom;
}

/* Responsive adjustments for smaller screens */
@media (orientation: portrait) and (max-width: 480px) {
    #details { 
        padding: 10px; 
        font-size: 14px; 
    }
    .detail-label { 
        min-width: 120px; 
        font-size: 13px; 
    }
    .detail-section h3 { 
        font-size: 16px; 
    }
    .detail-section { 
        margin-bottom: 15px; 
    }
    .feature-toggle { 
        padding: 6px 12px; 
        font-size: 12px; 
    }
    
    /* Adjust active filter for mobile */
    .active-filter {
        top: 10px;
        right: 10px;
        padding: 4px 8px;
        font-size: 12px;
    }
    
    .close-filter-btn {
        width: 18px;
        height: 18px;
        font-size: 16px;
    }
    
    .poi-items li {
        padding: 6px 10px;
        font-size: 13px;
    }
}