/* Layout principale */
#wpsl-wrap {
    display: flex;
    position: relative;
    height: 751px;
    border-top: 1px solid #5858584D;
    border-bottom: 1px solid #5858584D;
    margin-top: 10px;
    width: 100%;
    left: calc(var(--padding)* -1 -(100vw - var(--max-width)));
}

/* Sidebar container */
.wpsl-sidebar-container {
    width: 454px;
    flex-shrink: 0;
    background: #fff;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    height: 100%;
}

/* Ricerca */
.wpsl-search {
    padding: 0;
    background: white;
    margin-bottom: 0;
}

#wpsl-search-wrap {
    padding: 20px;
    background: #fff;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

#wpsl-search-wrap .wpsl-input label, 
#wpsl-search-btn {
    display: none;
}

#wpsl-search-btn, 
#wpsl-search-wrap input {
    border: 1px solid #d2d2d2;
    border-radius: 100px;
}

#wpsl-search-wrap input {
    width: 319px;
}

/* Lista risultati */
#wpsl-result-list {
    flex-grow: 1;
    width: 100% !important;
    margin: 0 !important;
    padding-right: 31px;
    background: #fff;
    height: calc(100% - 80px);
    overflow: hidden;
}
.wpsl-back {color: var(--verde) !important;}
#wpsl-stores {
    height:100% !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
}

/* Scrollbar styling */
#wpsl-stores::-webkit-scrollbar {
    width: 8px;
}

#wpsl-stores::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#wpsl-stores::-webkit-scrollbar-thumb {
    background: #d2d2d2;
    border-radius: 4px;
}

#wpsl-stores::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Mappa */
#wpsl-gmap {
    position: relative !important;
    height: 751px !important;
    width: calc(100% - 454px) !important;
    transition: all 0.3s ease;
}

/* Toggle sidebar */
.wpsl-sidebar-toggle {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 999;
    background: #F5F5F5;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 31px;
    height: 100%;
    border-radius: 0 4px 4px 0;
}

.wpsl-sidebar-hidden .wpsl-sidebar-container {
    width: 31px;
}

.wpsl-sidebar-hidden .wpsl-search, 
.wpsl-sidebar-hidden .wpsl-result-list {
    display: none;
}

.wpsl-sidebar-hidden #wpsl-gmap {
    width: calc(100% - 31px) !important;
}

/* Store location styling */
.wpsl-store-location strong {
    font-size: 25px;
    font-weight: 300;
}

.wpsl-store-location {
    max-width: 319px;
    margin: auto;
}

.wpsl-street {
    font-size: 16px;
    margin-top: 10px;
    font-weight: 200;
}

/* Links styling */
.wpsl-store-location p:last-child,
.wpsl-direction-wrap {
    display: inline-block;
    margin: 0;
    padding: 0;
}

.wpsl-directions,
.wpsl-store-details {
    color: #000;
    text-decoration: none;
    margin-right: 20px;
    font-size: 12px !important;
    font-weight: 300;
    color: var(--grigio);
}

.wpsl-direction-wrap {
    float: left;
}

.wpsl-directions img, 
.wpsl-store-details img {
    width: 9px;
    height: auto;
    vertical-align: middle;
    margin-left: 5px;
}

.store-links-container {
    margin-top: 10px;
    display: flex;
}

.links-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}
.links-container a{
    font-weight: 300 !important;
}
/* Hide specific elements */
.wpsl-store-location p span:not(.wpsl-street) {
    display: none;
}

/* List items styling */
#wpsl-wrap #wpsl-result-list li {
    padding: 20px;
    border-bottom: 1px solid #F5F5F5;
}

#wpsl-wrap #wpsl-result-list li:hover {
    background: linear-gradient(70deg, #FFFF33, #50EE11) !important;
}

#wpsl-wrap #wpsl-result-list li:hover .wpsl-store-location, 
#wpsl-wrap #wpsl-result-list li:hover a {
    color: var(--verde);
}

/* Info window styling */
.wpsl-info-window,
.wpsl-directions {
    font-family: var(--font) !important;
    color: var(--grigio);
    font-weight: 200;
}

.wpsl-info-window strong {
    font-weight: 300;
}

.wpsl-info-window .wpsl-directions {
    color: var(--verde);
}

/* Search input styling */
#wpsl-search-input {
    background-image: url('../img/cerca.png');
    background-repeat: no-repeat;
    background-position: 15px center;
    background-size: 20px;
    padding-left: 45px !important;
}

/* Utility classes */
#wpsl-category, 
.wpsl-input, 
.wpsl-select-wrap {
    margin-bottom: 0px !important;
}

.gmnoprint {
    display: none;
}

/* Height overrides */
#wpsl-direction-details, 
#wpsl-gmap {
    height: 751px !important;
}

body #wpsl-wrap #wpsl-gmap {
    height: 751px !important;
}

@media (max-width: 768px) {
    /* Cambia il layout da flex row a flex column */
    #wpsl-wrap {
        flex-direction: column;
        height: auto;
        left: 0;
    }

    /* Imposta la mappa in alto con altezza specifica di 357px */
    #wpsl-gmap {
        order: 1;
        width: 100% !important;
        height: 357px !important;
    }

    /* Sovrascrivi anche le altre regole di altezza della mappa */
    #wpsl-direction-details, 
    #wpsl-gmap,
    body #wpsl-wrap #wpsl-gmap {
        height: 357px !important;
    }

    /* Imposta la sidebar sotto */
    .wpsl-sidebar-container {
        order: 2;
        width: 100%;
        height: auto;
    }

    /* Aggiusta il contenitore dei risultati */
    #wpsl-result-list {
        height: auto;
        max-height: 400px;
        padding-right: 0;
    }

    /* Nasconde il toggle della sidebar */
    .wpsl-sidebar-toggle {
        display: none;
    }

    #wpsl-search-wrap form{
        width: 100%;
    }

    #wpsl-search-wrap input {
        width: 100% !important;
        max-width: none;
    }

    /* Aggiusta lo stile dei risultati */
    .wpsl-store-location {
        max-width: 100%;
    }
    .pin-mappa{font-size: 12px;}
    .pin-mappa img{width: 22px;height: 22px;}

    #wpsl-stores {
        height: 400px !important; /* o l'altezza che preferisci */
        overflow-y: scroll !important;
        -webkit-overflow-scrolling: touch !important; /* per uno scrolling più fluido su iOS */
    }
    
    #wpsl-result-list {
        height: auto;
        overflow: visible;
    }


}

.wpsl-aplanet{
    width: 30px;
    height: 30px;
}
.titolo-store{
        display: flex;
    flex-direction: row;
    gap: 10px;
}
.wpsl-info-window .titolo-store{
    font-size:16px;
}
.wpsl-info-window .wpsl-aplanet{
    width: 20px;
    height: 20px;
}