/* Custom CSS rules will go here */

html, body {
    height: 100%; /* Ensure html and body take full height */
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Fallback for browsers not supporting flexbox height fully */
}

main {
    flex: 1 0 auto; /* Allows the main content area to grow and shrink, but not shrink below content size */
    display: flex; /* Make main a flex container */
    flex-direction: column; /* Stack children vertically */
}

main > .container-fluid {
     flex: 1 0 auto; /* Allow container inside main to grow */
}

main > .container-fluid > .row {
    flex: 1 0 auto; /* Allow row inside container to grow */
    min-height: 0; /* Prevent row from overflowing */
}

/* Ensure map container takes available height */
#map {
    height: 65vh; /* Default height, adjust as needed */
    width: 100%;
    border: 1px solid #ccc;
    margin-bottom: 1rem; /* Add some space below the map */
}

/* Adjust map height on larger screens if needed */
@media (min-width: 768px) {
    #map {
        height: calc(100vh - 250px); /* Example: Adjust based on header/footer/form height */
        min-height: 400px; /* Minimum height */
    }
     /* Ensure columns take full height */
    .row > [class*="col-"] {
        display: flex;
        flex-direction: column;
    }
}


/* Footer styling */
footer {
    flex-shrink: 0; /* Prevent footer from shrinking */
}

/* Smaller legends */
.fs-6 {
    font-size: 1rem !important; /* Override Bootstrap default if needed */
}

/* Style for map selection buttons */
.input-group .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem; /* Adjust as needed */
    line-height: 1.5;
}

/* Add a custom cursor when selecting points on the map */
.leaflet-grab.selecting-point {
    cursor: crosshair !important;
}
.map-selection-active {
    border: 2px solid #0d6efd; /* Bootstrap primary color */
    box-shadow: 0 0 5px rgba(13, 110, 253, 0.5);
}

/* Align POI button better with textarea */
.input-group > .btn#add-poi-btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Styling for directions panel */
#directions-panel {
    height: 200px; /* Adjust as needed */
    overflow-y: auto;
    border: 1px solid #ccc;
    padding: 10px;
    margin-top: 1rem;
    background-color: #f8f9fa; /* Light background */
}
#directions-panel ol {
    padding-left: 1.5rem; /* Indent list items */
    margin-bottom: 0;
}
 #directions-panel li {
    margin-bottom: 0.5rem; /* Space between instructions */
    font-size: 0.9rem;
}

