/* Layout Container */
#Trip-request-Container {
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Keeps the form at the top */
    gap: 20px;
    padding: 20px 40px;
    max-width: 1400px; /* Increased to allow for a bigger map */
    margin: 10px auto 0 auto;
}

/* FORM SIDE */
.Trip-box:first-child {
    flex: 0 0 400px;
}

/* THE MAP SIDE  */
.Trip-box:last-child {
    flex: 1; /* Takes up all remaining space */
}

/* The White Box containing the Form */
#Trip-rquest-box {
    width: 100%;
    background-color: var(--axis-gray-light);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-subtle);
    display: flex;
    flex-direction: column;
    border: 1px;
}

#Trip-rquest-box h1 {
    font-size: 24px;
    margin-bottom: 25px;
    font-weight: 700;
}


.input-group {
    margin-bottom: 10px;
}

label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
    color: var(--axis-gray-medium);
}

.main-input {
    width: 100%;
    padding: 14px;
    background-color: var(--axis-gray-light);
    border: 2px solid transparent;
    border-radius: 8px;
    font-size: 16px;
    transition: 0.2s ease;
}

.main-input:focus {
    border-color: var(--axis-black);
    background-color: var(--axis-white);
    outline: none;
}


.btn-secondary {
    width: 100%;
    border: none;
    padding: 16px;
    font-weight: 600;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: 0.2s;
}

.full-width {
    background-color: var(--axis-black);
    color: var(--axis-white);
}

.full-width:hover {
    background-color: var(--axis-gray-dark);
}


.map-image {
    width: 100%;
    height: 600px; /* Fixed height for a large look */
    object-fit: cover; /* Ensures image isn't squashed */
    border-radius: 12px;
    border: 1px solid #e5e5e5;
}
/* Layout Container */
#Trip-request-Container {
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Keeps the form at the top */
    gap: 20px;
    padding: 20px 40px;
    max-width: 1400px; /* Increased to allow for a bigger map */
    margin: 10px auto 0 auto;
}

/* FORM SIDE */
.Trip-box:first-child {
    flex: 0 0 400px;
}

/* THE MAP SIDE  */
.Trip-box:last-child {
    flex: 1; /* Takes up all remaining space */
}

/* The White Box containing the Form */
#Trip-rquest-box {
    width: 100%;
    background-color: var(--axis-white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-subtle);
    display: flex;
    flex-direction: column;
    border: 1px;
}

#Trip-rquest-box h1 {
    font-size: 24px;
    margin-bottom: 25px;
    font-weight: 700;
}


.input-group {
    margin-bottom: 10px;
}

label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
    color: var(--axis-gray-medium);
}

.main-input {
    width: 100%;
    padding: 14px;
    background-color: var(--axis-gray-light);
    border: 2px solid transparent;
    border-radius: 8px;
    font-size: 16px;
    transition: 0.2s ease;
}

.main-input:focus {
    border-color: var(--axis-black);
    background-color: var(--axis-white);
    outline: none;
}


.btn-secondary {
    width: 100%;
    border: none;
    padding: 16px;
    font-weight: 600;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: 0.2s;
}

.full-width {
    background-color: var(--axis-black);
    color: var(--axis-white);
}

.full-width:hover {
    background-color: var(--axis-gray-dark);
}


#map-image {
    width: 100%;
    height: 600px; /* Fixed height for a large look */
    object-fit: cover; /* Ensures image isn't squashed */
    border-radius: 12px;
    border: 1px solid #e5e5e5;
}

/* Container for the input and suggestions */
.input-group {
    position: relative; /* CRITICAL for absolute positioning of list */
    margin-bottom: 20px;
}

#placelist {
    display: none; /* Controlled by JS */
    position: absolute;
    top: 100%; /* Sits right under the input */
    left: 0;
    width: 100%;
    background-color: var(--axis-white);
    box-shadow: 0px 8px 16px rgba(0,0,0,0.15);
    border-radius: 8px;
    z-index: 1000;
    padding: 5px 0;
    margin-top: 5px;
    border: 1px solid var(--axis-gray-light);
    list-style: none;
}
#placelist2 {
    display: none; /* Controlled by JS */
    position: absolute;
    top: 100%; /* Sits right under the input */
    left: 0;
    width: 100%;
    background-color: var(--axis-white);
    box-shadow: 0px 8px 16px rgba(0,0,0,0.15);
    border-radius: 8px;
    z-index: 1000;
    padding: 5px 0;
    margin-top: 5px;
    border: 1px solid var(--axis-gray-light);
    list-style: none;
}

.place-item {
    padding: 12px 15px;
    cursor: pointer;
    font-size: 14px;
    color: var(--axis-black);
    border-bottom: 1px solid #f9f9f9;
    transition: background 0.2s;
}

.place-item:last-child { border-bottom: none; }

.place-item:hover {
    background-color: #f1f1f1;
}

.place-item i {
    margin-right: 10px;
    color: var(--axis-gray-medium);
}

/* Optimized for Tablets and smaller Laptops */
@media (max-width: 1024px) {
    #Trip-request-Container {
        max-width: 100%;
        padding: 20px;
        gap: 20px;
        display: flex; 
        flex-direction: row; 
    }

    .Trip-box:first-child {
        flex: 0 0 320px; /* Solid width for the form */
    }

    .Trip-box:last-child {
        flex: 1; 
        /* Ensure the container matches the height we want */
        height: 600px; 
    }

    #map-image {
        width: 100%;
        height: 100%; /* Fills the 600px container exactly */
        border-radius: 12px;
        border: 1px solid var(--axis-gray-medium);
        box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    }
}

@media (max-width: 768px) {
    /* Make the container full screen height */
    #Trip-request-Container {
        flex-direction: column-reverse; 
        padding: 0;
        gap: 0;
        background-color:var(--axis-white); /* Subtle grey background for the page */
        min-height: calc(100vh - 80px); /* Fill screen minus header height */
    }

    /* THE MAP SIDE */
    .Trip-box:last-child {
        height: 60vh; /* Map takes top 40% of view */
        position: sticky;
        top: 0;
        width: 100%;
    }

    #map-image {
        height: 100%;
        width: 100%;
        border-radius: 0; /* Remove rounded corners so it touches the header */
        border: none;
    }

    /* THE FORM SIDE */
    .Trip-box:first-child {
        margin-top: -30px; /* This slides the form OVER the map */
        z-index: 10;
        width: 100%;
    }

    #Trip-rquest-box {
        border-radius: 30px 30px 0 0; /* Big rounded top corners like Uber/Lyft */
        padding: 30px 25px;
        box-shadow: 0 -10px 20px rgba(0,0,0,0.1); /* Shadow pointing UP onto map */
        border: none;
        min-height: 60vh; /* Ensures form covers the rest of the bottom */
    }

    #Trip-rquest-box h1 {
        text-align: center;
        font-size: 22px;
        margin-bottom: 20px;
    }
}