/* ---------------------- Search Results Layout */
#gi-search-results {
    display: flex;
    flex-wrap: wrap;
}

#map, #item-cards {
    flex: 1;
    min-height: 400px;
}

#map {
    flex-basis: 60%;
}

#item-cards {
    flex-basis: 40%;
    overflow-y: auto;
    max-height: 650px;
}



/* ---------------------- Item Cards */
.item-card {
    border: 1px solid;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
}

.item-title {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.item-content {
    display: flex;
    flex-wrap: wrap;
}

.item-image-column {
    flex: 1;
    min-width: 200px;
    margin-right: 15px;
}

.item-details-column {
    flex: 2;
    min-width: 200px;
}

.item-image {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: cover;
    border-radius: 4px;
}

@media (max-width: 600px) {
    .item-content {
        flex-direction: column;
    }

    .item-image-column {
        margin-right: 0;
        margin-bottom: 15px;
    }
}

.item-card a, .no-underline {
    text-decoration: none !important;
}

.item-card-image {
    flex: 1;
    flex-basis: 40%;
    max-width: 650px;
    overflow: hidden;
}

.item-card-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    max-height: 450px;
}

.item-card-details {
    flex: 2;
    padding: 15px;
}

.item-card h6, .item-card p {
    margin: 0;
}

.item-card p {
    margin-bottom: 5px;
}

.small-font {
    font-size: 13px; /* Adjust font size as needed */
}


/* Media Queries */
@media (max-width: 768px) {
    #gi-search-results {
        flex-direction: column;
    }

    #map {
        flex-basis: 100%;
        height: 200px !important;
        width: 100%;
    }

    #item-cards {
        flex-basis: 100%;
        max-height: none;
        overflow-y: visible;
    }

    .item-card {
        flex-direction: column;
    }

    .item-card-image {
        flex-basis: 100%;
        max-width: none;
        width:100%;
    }

    .item-card-details {
        flex-basis: 100%;
        padding: 10px;
    }

}

/* ---------------------- home Search Form */

.home-search-form {
    border-radius: 5px;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
   
}

.home-form-select {
    align-items: center;
    border-radius: 5px;
    color: #999;
    display: flex;
    flex: 1;
    font-size: 13px;
    height: 40px;
    min-width: 150px;
    width:200px;
}

.currency-select {
    width: 70px !important;
    min-width: 70px !important;
    max-width: 70px !important;
    padding: 0 5px !important;
    margin: 0 5px !important;
    flex: 0 0 auto !important; /* Prevent flexbox from expanding this item */
}

.currency-container {
    width: 80px !important; /* Slightly larger than the select to account for padding */
    flex: 0 0 auto !important;
    margin: 0 5px !important;
}

.home-category-container {
    width:200px;
}

.home_input-container {
    width: 100%;
    height: 40px;
    margin: 0px 10px;
}

.home_search-input {
    width: 100%;
    height: 40px;
    font-size: 13px;
    padding: 8.5px!important;
}

.home-search-button {
    background-color: #2235dd;
    color: white;
    border: none;
    cursor: pointer;
        display: inline-block; /* Ensures the button can be vertically aligned */
    vertical-align: middle!important; /* Vertically center relative to other inline elements */
}

.home-search-button:hover {
    background-color: #1a2bc6;
}

/* Media Queries */
@media (max-width: 768px) {
    .home-search-form {
        flex-direction: column;
    }

    .home-form-select {
        width:100%;
    }

    .home-category-container {
        margin-top: 10px!important;
        min-width: 100%; /* Full width on mobile */
        max-width: 100%; /* Full width on mobile */
    }
    
    .home_search-input {
        min-width: 100%!important;
        max-width: 100%!important;
    }
    
    .home_input-container {
        margin-bottom: 10px;
        margin-top: 10px;
        margin-left: 0px;
        margin-right: 0px;
        min-width: 100%;
        max-width: 100%;
    }
}



/* ---------------------- Search Form */
.search-form {
    border-radius: 5px;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
   
}

.form-select {
    align-items: center;
    border-radius: 5px;
    color: #999;
    display: flex;
    flex: 1;
    font-size: 13px;
    height: 40px;
    min-width: 150px;
    width: 200px;
    padding: 0 10px;
    border: 1px solid #ddd;
}

.input-container {
    display: flex;
    align-items: center;
    height: 50px!important; /* Ensure the container height matches the height of input elements */
    border: 1px;
    z-index: 1000 !important; /* Ensure it's above the map */
    width: 100%;
}

.input-label {
    font-size: 13px;
    color: #999;
        width: 150px;
    /* margin-right: 10px;  Space between label and input */
                padding: 0px 10px!important;
}

.search-input {
    height: 40px!important;
    font-size: 13px;
        width: 100%;
    height: 40px; /* Ensure height is consistent with parent container */
    box-sizing: border-box;
            padding: 0px 10px!important;
}



.search-button {
    background-color: #2235dd;
    color: white;
    border: none;
    cursor: pointer;
        display: inline-block; /* Ensures the button can be vertically aligned */
    vertical-align: middle!important; /* Vertically center relative to other inline elements */
        width: 100%;
    height: 40px; /* Ensure height is consistent with parent container */
    box-sizing: border-box;
            padding: 0px 10px!important;
}

.search-button:hover {
    background-color: #1a2bc6;
}


/* --------------------- Search Form - Media Queries */
@media (max-width: 768px) {
    .search-form {
        flex-direction: column;

    }

    .form-select {
        width:100%;
    }

    .category-container {
        margin-top: 10px!important;
        min-width: 100%; /* Full width on mobile */
        max-width: 100%; /* Full width on mobile */
    }
    
    .form-select,
    .category-container,
    .search-button {
        width: 100%;
        max-width: 100%;
        margin: 5px 0;
    }

    .search-input {
        min-width: 100px;
        max-width: 100px;
    }    
    .price_pen-input {
        width: 140px;
    }

    .search-button {
        min-width: 100%; /* Full width on mobile */
        max-width: 100%; /* Full width on mobile */
        box-sizing: border-box; /* Include padding and border in the element's total width */
    }


}



@media (max-width: 480px) {
    .container {
        width: 95%;
    }
}


/* ---------------------- Listing Gallery */
.listing-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.listing-gallery img {
    max-width: 100%;
    height: 200px;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.listing-gallery img:hover {
    transform: scale(2.8);
    z-index: 1000000;
}

/* Media Queries */
@media (max-width: 768px) {
    .listing-gallery {
        display: block;
        padding: 0 10px;
    }

    .listing-gallery img {
        width: 100%;
        height: auto;
        max-height: none;
        margin-bottom: 10px;
    }

    .listing-gallery img:hover {
        transform: none;
    }

    .zoomed-image {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: calc(100% - 20px);
        height: auto;
        max-height: 90vh;
        object-fit: contain;
        z-index: 1000001;
        background-color: rgba(0, 0, 0, 0.8);
        padding: 10px;
        border-radius: 8px;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    }
}


/* ---------------------- Map Styles */
.item-map {
    width: 100%;
    height: 400px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
}

/* ---------------------- Listing Details Styles */
.listing-details {
    margin-top: 20px;
}

.detail {
    margin-bottom: 10px;
}

.detail .label {
    font-weight: bold;
}

.detail .value {
    color: #555;
}

/* ---------------------- Auto Complete */
.ui-autocomplete-input {
    width: 100%;
}

.ui-autocomplete {
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    font-size: 9px;
    z-index: 1000 !important;
}

.ui-menu-item {
    padding: 5px 10px;
}

.ui-menu-item:hover {
    cursor: pointer;
}

/* ---------------------- Register */
#register-login-container {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.form-container {
    width: 100%;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.error-messages {
    color: red;
}

/* Media query for desktop view */
@media (min-width: 768px) {
    #register-login-container {
        flex-direction: row;
        justify-content: space-between;
    }

    .form-container {
        width: 48%;
        margin-bottom: 0;
    }
}
