.map-container {
    flex: 1;
    position: relative;
    background: #e0e0e0;
}

#map {
    width: 100%;
    height: 100%;
}

.search-container {
    padding: 5px;
    border-bottom: 1px solid var(--border-color);
}

#search-input {
    width: 100%;
    padding: 6px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.filters-container {
    flex: 1;
    overflow-y: auto;
    padding: 5px;
}

.category-group {
    margin-bottom: 15px;
}

.category-group h3 {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
    text-transform: uppercase;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.category-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
}

.category-item:hover {
    background-color: #f0f0f0;
}

.category-item input {
    margin-right: 10px;
}

.category-item img {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    object-fit: contain;
}

.category-item span {
    font-size: 0.9rem;
}

/* Marker Popup */
.marker-popup {
    max-width: 250px;
}

.marker-popup h3 {
    margin-bottom: 5px;
    color: var(--secondary-color);
}

.marker-popup p {
    font-size: 0.9rem;
    margin-bottom: 10px;
    color: #555;
}

.marker-popup button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    width: 100%;
}

.marker-popup button:hover {
    opacity: 0.9;
}

.marker-popup img.popup-image {
    width: 100%;
    height: auto;
    margin-bottom: 10px;
    border-radius: 4px;
}

.marker {
    background-image: url('../images/icons/default.svg');
    background-size: cover;
    cursor: pointer;
}

/* Selection Mode Controls */
.map-floating-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    width: 40px;
    height: 40px;
    background: white;
    border: 2px solid rgba(0,0,0,0.2);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.2s;
    font-size: 1.2rem;
}

.map-floating-btn:hover {
    background: #f8f8f8;
}

.map-floating-btn.active {
    background: var(--primary-color, #007bff);
    color: white;
    border-color: var(--primary-color, #007bff);
}

.selection-panel {
    position: absolute;
    top: 70px;
    right: 20px;
    z-index: 10;
    width: 250px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    padding: 15px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.panel-header h3 {
    margin: 0;
    font-size: 1rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 5px;
}

.panel-content .hint {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 10px;
    font-style: italic;
}

.action-buttons {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
}

.action-btn {
    flex: 1;
    padding: 6px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.85rem;
    color: white;
}

.action-btn.save {
    background-color: #28a745;
}

.action-btn.undo {
    background-color: #ffc107;
    color: #333;
}

.action-btn.delete {
    background-color: #dc3545;
}

.action-btn.manage {
    background-color: #17a2b8;
}

.action-btn:hover {
    opacity: 0.9;
}

.saved-list {
    max-height: 150px;
    overflow-y: auto;
    border-top: 1px solid #eee;
    margin-top: 10px;
    padding-top: 5px;
    display: none;
}

.saved-polygon-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px;
    border-bottom: 1px solid #f5f5f5;
    font-size: 0.9rem;
}

.saved-polygon-item:last-child {
    border-bottom: none;
}

.saved-polygon-item button {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0 5px;
}
