/* Truncate long description text with ellipsis */
.description-cell {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Ensure full-height map */
#map {
    height: calc(100vh - 80px);
    width: 100%;
}

/* Filter panel overlay */
.filter-control {
    background: white;
    padding: 12px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    min-width: 220px;
    font-size: 13px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.filter-control h6 {
    margin: 0;
    font-weight: 600;
    font-size: 13px;
}

.filter-toggle {
    width: auto !important;
    padding: 0 4px !important;
    font-size: 11px !important;
    background: transparent !important;
    color: #555 !important;
    border: 1px solid #ccc !important;
    border-radius: 3px !important;
    cursor: pointer;
    line-height: 1.4;
}

.filter-toggle:hover {
    background: #f0f0f0 !important;
}

.filter-control label {
    display: block;
    margin-bottom: 2px;
    font-size: 12px;
    color: #555;
    font-weight: 500;
}

.filter-control input,
.filter-control select {
    width: 100%;
    margin-bottom: 8px;
    padding: 4px 6px;
    font-size: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.filter-control button {
    width: 100%;
    padding: 6px;
    font-size: 12px;
    background: #0d6efd;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.filter-control button:hover {
    background: #0b5ed7;
}

.filter-control .point-count {
    margin-top: 6px;
    font-size: 11px;
    color: #888;
    text-align: center;
}

/* Legend panel */
.legend-control {
    background: white;
    padding: 10px 14px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    font-size: 12px;
    max-height: 280px;
    overflow-y: auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.legend-control h6 {
    margin: 0 0 6px;
    font-weight: 600;
    font-size: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 3px;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

/* Custom marker styles */
.custom-marker {
    cursor: pointer;
}

.marker-dot:hover {
    filter: brightness(1.1);
}

/* Leaflet popup improvements */
.leaflet-popup-content {
    font-size: 12px !important;
}

.leaflet-popup-content a {
    color: #0d6efd;
    text-decoration: none;
}

.leaflet-popup-content a:hover {
    text-decoration: underline;
}

