#form-container {
    width: 350px;
    padding: 20px;
    background-color: #ffffff;
    border-left: 2px solid #ddd;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
}

/* Styling for the upper section with tabs */
#form-upper {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
    margin-top: 5vh;
}

.tablinks {
    font-size: 16px;
}

.tab {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0;
    background-color: #f1f1f1;
    border-radius: 15px 15px 0 0;
    overflow: hidden;
}

.tab button {
    background-color: transparent;
    outline: none;
    padding: 10px 20px;
    cursor: pointer;
    transition: 0.3s;
    border: 1px solid #ddd;
    flex: 1;
    text-align: center;
}

#left {
    border-radius: 15px 0 0 0;
}

#right {
    border-radius: 0 15px 0 0;
}

.tab button.active {
    background-color: #007bff;
    border-bottom: 2px solid #007bff;
    border: none;
    color: white;
}

.tabcontent {
    display: none;
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 0 0 8px 8px;
    padding: 15px;
    font-size: 20px;
}

.tabcontent form {
    display: flex;
    flex-direction: column;
}

.tabcontent label {
    margin-top: 10px;
}

.tabcontent input {
    margin-bottom: 10px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.tabcontent button {
    padding: 10px;
    border: none;
    background-color: #007bff;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
}

.tabcontent button:hover {
    background-color: #0056b3;
}

/* Styling for the lower section with results */
#form-lower {
    flex: 1;
    background-color: #ffffff;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    max-height: 400px; /* Adjust height as needed */
    overflow-y: auto;  /* Adds scrollbar when content overflows */
}

#form-lower h3 {
    margin: 0;
    color: #333;
    font-size: 1.5em;
    border-bottom: 2px solid #f2f2f2;
    padding-bottom: 10px;
}

#form-lower p {
    margin: 0;
    color: #444;
    font-size: 1em;
    line-height: 1.6;
}

#form-lower ul {
    margin: 10px 0 0 20px;
    padding: 0;
    list-style-type: disc;
    color: #666;
}

#form-lower ul li {
    margin-bottom: 5px;
}


@media screen and (max-width: 999px) {
    #form-container {
        position: fixed; /* Fix to the bottom of the screen */
        bottom: 0;
        left: 0;
        width: 100%;
        height: auto; /* Adjust height to fit content */
        border-left: none;
        border-radius: 0;
        box-shadow: none;
        z-index: 2; /* Ensure it is above the map */
        background-color: transparent;
        padding:0;
    }

    #form-upper {
        margin: 0;
    }

    #latlng-form {
        display: grid;
        grid-template-columns: repeat(3, 1fr); /* Two columns, each taking up 1 fraction of the available space */
        gap: 30px; /* Space between the columns */
        align-items: center;
    }

    #address-form {
        display: grid;
        grid-template-columns: repeat(3, 1fr); /* Two columns, each taking up 1 fraction of the available space */
        gap: 30px; /* Space between the columns */
        align-items: center;
    }

    .tabcontent {
        font-size: 15px;
    }

    .form-group {
        display: flex;
        grid-column: span 1;
        flex-direction: column;
        justify-content: center;
        align-content: center;
        align-items: center;
    }

    .form-group-2 {
        display: flex;
        flex-direction: column;
        grid-column: span 2;
        justify-content: center;
        align-content: center;
        align-items: center;
    }

    #latlng-form label {
        margin-bottom: 5px; /* Space between the label and input */
    }
    
    #latlng-form input {
        padding: 8px;
        border: 1px solid #ccc;
        border-radius: 4px;
        width: 80%
    }

    #address-form input {
        padding: 8px;
        border: 1px solid #ccc;
        border-radius: 4px;
        width: 80%
    }

    #form-lower {
        display: none; /* Hide this section on mobile */
    }

    #Info {
        overflow-y: auto;
        max-height: 80px;
    }

    .tablinks {
        font-size: 14px;
    }

    .tabcontent {
        padding-top: 5px;
        padding-bottom: 50px;
        height: 80px; 
        border-radius: 0 0 0px 0px;
    }

    .add-marker {
        width: 60px;               /* Takes full width of the parent container */
        height: 60px;
        font-size: 45px;
        display: inline-flex;          /* Enables flexbox layout for the button */
        align-items: center;           /* Vertically centers the text */
        justify-content: center;
    }

}