﻿/* Search Container Styling */
/*.search-container {
    display:flex;
    position: relative;
    width: auto;
   }*/
/*.search-container button{
        padding:0 !important;
    }*/
/* Search Input Styling */
#searchInput {
    width: 100%;
    padding: 6px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    background: rgba(244, 244, 244, 0.6);
}
    #searchInput:focus {
        border-color: var(--primary-color); /* Change this to the desired border color (e.g., green) */
        outline: none; /* Remove the default blue outline on focus (optional) */
    }

#searchButton {
    padding: revert;
    background: none;
    border: none;
}

/* Search Results Container Styling */
/*.search-results {
    position: absolute;
    top: 110%;
    width: 100%;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto; 
    display: none; 
    z-index: 1000;
}*/

/* Product Item Styling */
.product-item {
    display: flex;
    align-items: center;
    /*padding: 10px;*/
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s;
}

    .product-item:hover {
        background-color: #f9f9f9;
    }

    /* Product Image Styling */
    .product-item img {
        width: 20%;
        max-width: 60px;
        margin-right: 10px;
        border-radius: 5px;
        object-fit: cover;
    }

    /* Product Name Styling */
    .product-item p {
        width: 80%;
        margin: 0;
        font-size: 16px;
        color: #333;
        font-weight: 500;
    }

/* Hide hidden fields */
.hidden {
    display: none;
}


@media (min-width: 25px) and (max-width: 767px) {
    .search-container {
        display: flex;
        position: absolute;
        top: 48px;
        left: 50%;
        transform: translateX(-50%);
        width: 97%;
        background-color: #F5F5F5;
    }

    .search-container {
        display: none; /* Initially hidden */
        transition: opacity 0.3s ease; /* Add transition */
        /*opacity: 0;*/ /* Start with zero opacity */
    }

        .search-container.show {
            display: flex;
            /*opacity: 1;*/ /* Make the container fully visible */
        }

    #searchDisplayButton {
        cursor: pointer;
    }

    #searchDisplayButton {
        margin: 0 10px 0 0;
        display: block;
        grid-area: 1 / 4 / 2 / 5;
        padding: 0;
        justify-self: center; /* Center horizontally within its grid cell */
        align-self: center;
    }


    /*try from here*/

    /* Modal positioning and style for small screens */
    #searchModal {
        display: none; /* Hidden by default */
        position: absolute;
        top: 80px; /* Below the search container */
        left: 50%;
        transform: translateX(-50%); /* Center horizontally */
        width: 97%; /* Match width of search container */
        background-color: white;
        border-radius: 5px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        /*padding: 10px;*/
        z-index: 1000; /* Ensure it is on top */
    }

    /* Modal content styling */
    .search-modal-content {
        background-color: white;
        /*padding: 10px;*/
        max-height: 300px;
        overflow-y: auto;
    }
}


@media (min-width: 768px) {

    .search-container {
        display: flex !important;
        position: relative;
        width: auto;
    }


    #searchDisplayButton {
        display: none !important;
    }

    /*try from here*/

    /* Modal positioning and style for desktop */
    #searchModal {
        display: none;
        position: absolute;
        top: 48px; /* Directly below the search container */
        left: 52%;
        transform: translateX(-50%);
        width: 58%;
        /*min-width:477px;*/
        /*width: auto;*/ /* Adjust width based on content */
        /*max-width: 900px;*/ /* Max width for larger screens */
        background-color: white;
        border-radius: 5px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        /*padding: 15px;*/
        z-index: 1000; /* Ensure it is on top */
    }

    /* Modal content styling */
    .search-modal-content {
        background-color: white;
        padding: 15px;
        max-height: 300px;
        overflow-y: auto;
    }
}

@media (min-width: 863px) {
    #searchModal {
        width: 57%;
        left: 50%;
    }
}
/*yha se modal ka h*/
/* Modal overlay styles */
/*.searchmodal {
    display: none; 
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(0, 0, 0, 0.5); 
    z-index: 9999;
}*/
/* Modal content styles */
/*.search-modal-content {
    position: relative;
    top: 50%; 
    left: 50%;
    transform: translate(-50%, -50%); 
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    width: 80%;
    max-width: 600px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}*/
/* Close button styles */
.search-close-button {
    display: none;
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 30px;
    cursor: pointer;
}

.search-results {
    max-height: 200px;
    /*overflow-y: auto;*/
    display: block;
    margin-top: 3px;
}
