html, body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    height: 100%;
    width: 100%;
    overscroll-behavior: none;
}

#map {
    height: 100%;
    width: 100%;
    z-index: 1;
}

#toolbar {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    width: 60px; /* Fixed width to prevent shifting */
}

#drawing-tools {
    display: none;
    flex-direction: column;
    gap: 8px; /* Add gap for spacing between tools */
    width: 100%; /* Ensure it takes full width of toolbar */
    align-items: center;
}

#color-picker {
    width: 100%; /* Make color picker take full width of its container */
}

.stroke-weights {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    cursor: pointer;
}

.stroke-option {
    border: 2px solid white;
    transition: transform 0.1s ease-in-out;
}

.stroke-option.active {
    border-color: #0d6efd; /* Bootstrap primary color */
    transform: scale(1.2);
}

#open-sidebar-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
}



#sidebar {
    position: absolute;
    top: 0;
    right: -350px; /* Start off-screen */
    width: 350px;
    height: 100%;
    z-index: 1001;
    transition: right 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

#sidebar.open {
    right: 0;
}

#project-container {
    overflow-y: auto;
    flex-grow: 1;
}

.map-draw-mode .leaflet-container {
    cursor: crosshair !important;
}

.layer-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px;
    border-radius: 5px;
}

.layer-item:hover:not(.active) {
    background-color: #f0f0f0;
    cursor: pointer;
}

.project-controls i,
.layer-controls i {
    cursor: pointer;
    margin-left: 10px;
}

.layer-controls i.bi-eye-slash {
    opacity: 0.5;
}

/* Default cursor for lines is grab (for panning) */
.leaflet-interactive {
    cursor: grab;
}

/* In draw mode, the cursor over lines should also be a crosshair */
.map-draw-mode .leaflet-interactive {
    cursor: crosshair;
}

/* In delete mode, use a pointer to show lines are clickable */
.map-delete-mode .leaflet-interactive {
    cursor: pointer;
}