/*TABLET AND MOBILE*/
@media (max-width: 921px) {
    .search-results-wrapper {
        grid-template-columns: 1fr !important;
        /* 1 column on small screens */
    }

    .search-tab-container{
        justify-content: flex-start !important;
    }

/*     h4{
        font-size: 1.2em !important;
        margin: 20px auto 20px auto;
    } */

    .filter-results-info {
        margin-bottom: 10px;
        text-align: center;
    }
    
    .filter-results-info .result-counter-target {
        font-size: 0.9em;
        color: #fff;
    }

    /* Full width button when map button is not visible */
    .mobile-button-left.full-width {
        width: 100% !important;
    }

    /* Ensure the button takes up the full width */
    .mobile-button-left.full-width a {
        display: block;
        width: 100%;
        text-align: center;
    }


    .search-result-card-favorite-container{
    display: flex !important;
    justify-content: flex-end !important;
    align-items: flex-start !important;
    border-radius: 0  !important;
    width: auto !important;
    height: auto !important;
    background-color: transparent !important; 
    position: static !important;
    top: initial !important;
    right: initial !important;
    font-size: 20px;
    flex: 0 0 20%;
    flex-shrink: 1;
    }

    .search-result-card-container {
        flex-direction: row !important;
        width: 100%;
    }

    .search-form {
        width: 100% !important;
    }

    .search-filters-rating-row{
        display: flex !important;
        flex-direction: column;
        margin-top: 3px;
        margin-bottom: 1px;
        border-top: 1px solid #ccc;
        padding-top: 0px;
    }    
    
    .search-filters-order-row{
        display: flex !important;
        flex-direction: column;
        margin-top: 30px;
        margin-bottom: 160px;
        border-top: 1px solid #ccc;
        padding-top: 20px;
    }


    /*Button for routes*/
    .mobile-footer-button-single {
        justify-content: center !important;
        align-items: center !important;
        position: fixed;
        left: 0;
        bottom: 0;
        width: 100%;
        z-index: 9000;
        padding: 0;
        margin: 0;
        border-radius: 0 !important;
        font-size: 1em !important;
        border: none;
        background: var(--ast-global-color-8);
    }

    
    .mobile-footer-buttons {
        display: flex !important;
        position: fixed;
        left: 0;
        bottom: 0;
        width: 100%;
        z-index: 1000;
        padding: 0;
        margin: 0;
        border-radius: 0 !important;
        font-size: 1em !important;
        border: none;
        background: var(--ast-global-color-8);
    }

    .mobile-footer-buttons button {
        all:unset;
        width: 50%;
        margin: 0;
        padding: 10px;
        font-size: 16px;
        border-right: 1px solid #ccc;
        text-align: center;
    }

    .mobile-footer-buttons button a {
        color: #fff;
    }

    .search-filters-container,
    .search-order-map-container {
        display: none !important;
    }

    /* Filters header */

    .full-screen-columns {
        display: flex !important;
        position: fixed;
        left: 0;
        top: 0;
        width: 100%;
        z-index: 1000;
        padding: 25px;
        margin: 0;
        border: none;
        text-align: center;
    }

    .column-right {
        text-align: right;
    }

    .column-left,
    .column-right {
        flex: 1;
        padding: 0px;
    }

    .close i {
        font-size: 20px;
        color: #000;
    }

    .search-results-wrapper {
        grid-template-columns: 1fr !important;
        /* 1 column on mobile screens */
    }

    .search-heading-searchbox-container {
        flex-direction: column;
        gap: 10px;
    }

    .search-tab-order-map-container {
        flex-direction: column;
        gap: 20px;
    }

    .search-results-filters-container {
        flex-direction: column;
        min-width: 100%;
    }

    #search-results {
        width: 100%;
    }

    .map-modal-dimensions {
        width: 100%;
        height: 100%;
    }

    #map {
        width: 100%;
        height: 80%;
    }

    .search-searchbox-container {
        display: flex;
        width: 100%;
        height: 50%;
    }



    /* Button Apply Filters */

    .apply-filters-container {
        display: block !important;
        position: fixed;
        left: 0;
        bottom: 0;
        width: 100%;
        z-index: 1000;
        padding: 15px;
        margin: 0;
        border-radius: 0 !important;
        font-size: 1em !important;
        border: none;
        background: var(--ast-global-color-8);
        text-align: center;
    }

    .apply-filters-container a {
        color: #fff;
    }
    
    /* Style for the filter count in the mobile button */
    .filter-count {
        display: inline-block;
        font-weight: bold;
        color: #fff;
    }

    .refine-search h3 {
        text-align: left;
        margin: -30px auto 20px auto;
    }

    .search-result-card-thumbnail-container {
        max-width: 150px !important;
        min-width: 150px !important;
        flex: 0 0 40%;
        flex-shrink: 1;
    }

    .search-result-title {
        flex: 0 0 60%;
        flex-shrink: 1;
        padding-left: 20px;
    }

    /* Hide the desktop close button by default */
    .close-btn {
        display: none;
    }  
    
    /* Only show the desktop close button on larger screens */
    @media (min-width: 768px) {
        #closeModalBtn.close-btn {
            display: none; /* Initially hidden, will be shown via JS when needed */
        }
    }
    
    /* Ensure it's always hidden on mobile */
    @media (max-width: 767px) {
        #closeModalBtn.close-btn {
            display: none !important; /* Force hide on mobile regardless of JS */
        }
    }

    /*Map Modal Close button mobile */
         #closeModalBtnMobile {
            position: absolute;
            top: 10px;
            left: 50%;
            transform: translateX(-50%);
            text-align: center;
            font-size: 16px;
            color: #000;
            cursor: pointer;
            z-index: 1501;
            background-color: #fff;
            padding: 10px;
            border-radius: 30px;
            border: 1px solid #ccc; 
        } 

        .go-to-filters-mobile {
            position: fixed;
            left: 0;
            bottom: 0;
            width: 100%;
            z-index: 9000;
            padding: 10px;
            color: #fff;
            margin: 0;
            border-radius: 0 !important;
            font-size: 1em !important;
            border: none;
            background: var(--ast-global-color-8);
            text-align: center;
            align-items: center;
            justify-content: center;
        }


    /* End Mobile/Tablet */

}


.search-heading-searchbox-container {
    display: flex;
    width: 100%;
    gap: 20px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
}

.search-heading-container {
    display: flex;
    justify-content: center;
    width: 100%;
    height: 50%;
}

.search-searchbox-container {
    display: flex;
    justify-content: center;
    width: 100%;
    height: 50%;
}

.search-tab-order-map-container {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
}

.search-results-filters-container {
    display: flex;
    width: 100%;
    margin-top: 40px;
}

.search-results-container {
    flex: 2;
}

.search-tags-wrapper {
    width: 100%;
    margin-bottom: 40px;
}

.search-filters-container {
    padding-right: 60px;
}

.search-filters-checkboxes-radio {
    padding: 5px 0;
}

.search-filters-accessibility-container {
    display: flex;
    flex-direction: column;
}

.search-results-wrapper {
    width: 100%;
}

.search-result-card-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
}

.search-result-card-thumbnail-container {
    max-width: 265px;
    position: relative;
}

.search-result-card-thumbnail {
    width: 100%;
    border-radius: 8px;
}

.search-result-card-favorite-container {
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    background-color: white;
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;

}

.search-form {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 55%;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 10px;
    font-size: 18px;
    color: var(--diocesi-global-color-text);
    margin-left: 4px;
}

.search-icon:hover {
    color: var(--ast-global-color-8);
    background-color: unset !important;
}

.search-icon:focus {
    color: var(--ast-global-color-8);
    background-color: unset !important;
}

.clear-icon {
    position: absolute;
    right: 10px;
    font-size: 18px;
    color: #6A6B6B;
    margin-right: 4px;
}

.clear-icon:hover {
    color: var(--ast-global-color-8);
    background-color: unset !important;
}

.clear-icon:focus {
    color: var(--ast-global-color-8);
    background-color: unset !important;
}

#searchbox {
    padding-left: 50px;
    /* Space for the icon inside the input */
    font-size: 16px;
    border-radius: 39px;
    height: 50px;
    background-color: #f2f2f2;
    border: none;
}

#search-icon-btn {
    all: unset;
    /* Resets all inherited styles */
    background: none;
    /* Removes background */
    border: none;
    /* Removes border */
    padding: 0;
    /* Removes padding */
    margin: 0;
    /* Removes margin */
    font: inherit;
    /* Inherits the font properties from the parent element */
    cursor: pointer;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#clear-icon-btn {
    all: unset;
    /* Resets all inherited styles */
    background: none;
    /* Removes background */
    border: none;
    /* Removes border */
    padding: 0;
    /* Removes padding */
    margin: 0;
    /* Removes margin */
    font: inherit;
    /* Inherits the font properties from the parent element */
    cursor: pointer;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.search-tab-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

.search-order-map-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

.order-icon-map-container{
    display: flex;
    align-items: center;
    gap: 5px;
}

.order-icon-select-container{
    display: flex;
    align-items: center;
    gap: 5px;
}

#ordina {
    width: 60px;
    padding: .8em .8em .8em 0
}

.ordering-btn {
    all: unset;
    /* Resets all inherited styles */
    background: none;
    /* Removes background */
    border: none;
    /* Removes border */
    padding: 0;
    /* Removes padding */
    margin: 0;
    /* Removes margin */
    font: inherit;
    /* Inherits the font properties from the parent element */
    cursor: pointer;
}

.tab-element {
    display: flex;
    justify-content: center;
}


.bold-link {
    font-weight: 700;
    border-bottom: 1px solid black;
}

.hidden-div {
    display: none;
}


#search-results {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
}

#pagination-controls {
    margin: 40px 0px;
}

.pagination-btn, .pagination-btn-default-search {
    margin: 10px;
    background: #fff;
    color: #000;
}


/*Modal styles*/
#mapModal,
#filtersModal {
    display: none;
    /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #ffffff;
    width: 100vw;
    height: 100vh;
    min-height: 150vh;
    padding-top: 160px;
}

.map-modal-dimensions {
    width: 100%;
    height: 100%;
}

#mapModal.active,
#filtersModal.active {
    display: flex;
}

#map {
    width: 100%;
    height: 100%;
    background: #fff;
}



#mapModal.active {
    display: block;
}

.map-modal-content {
    display: flex;
    height: 100%;
    padding-top: 0px; /* Space for the close button */
}

/* Desktop Layout */
@media (min-width: 922px) {

    /* Map Modal Styles */
#mapModal {
    display: none;
    position: fixed;
    top: 0;
    left: 20vw;
    width: 80vw;
    height: 100vh;
    background: #fff;
    z-index: 1000;
}


 /*   .map-sidebar {
        width: 300px;
        background: #fff;
        padding: 20px;
        overflow-y: auto;
        border-right: 1px solid #ddd;
        opacity: 0.1;
    }*/

    .map-filters {
        padding: 15px;
 
    }

    .map-filters h3 {
        margin-bottom: 20px;
        font-size: 1.2em;
    }

    .map-modal-dimensions {
        flex: 1;
        height: 100%;
    } 

    
    /* Close button */
    .close-btn {
        background: white;
        padding: 10px 15px;
        margin: 5px 0 40px 0;
        cursor: pointer;
        border-bottom: 1px solid #ddd;
    }


    .container-filtri-full {
        width: 20vw;
        height: 100vh;
        min-height: 150vh;
        position: fixed;
        z-index: 99999;
        background: #fff;
        top: 0;
        margin: 0px;
        padding: 20px;
        left: 0 !important;
    }
}

.modal-column-1 {
    width: 20%;
    height: 100%;
    background: #fff;
}

.modal-filters {
    margin: 30px;
    padding: 10px;
}

/* End modal */

.current-category {
    display: inline-block;
    padding: 5px 20px;
    margin: 10px 0;
    margin-right: 10px;
    background-color: #f2f2f2;
    color: #000;
    border-radius: 20px;
    font-size: 16px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.deactivate-container{
    display: none !important;
}


/* Filter bar */
.activate-filter-bar {
    display: flex !important;
    margin: 0;
    width: 100%;
    height: 100%;
}

.activate-search-filters-container {
    display: flex !important;
    flex-direction: column;
    width: 100%;
    height: 100%;
}


.result-counter-target {
    padding-top: 5px;
}

.close-btn-single {
    cursor: pointer;    
}
    
