/**
 * Distributori MMB - Map Styles
 */

/* Map container */
#mappa-distributori-container {
    position: relative;
    width: 100%;
    height: 690px;
    display: flex;
    flex-direction: row-reverse;
    gap: 20px;
}

@media screen and (max-width: 768px) {
    #mappa-distributori-container {
        flex-direction: column;
        height: auto;
    }

    #mappa-distributori-mmb {
        width: 100%;
    }
}

#mappa-distributori-mmb {
    width: 723px;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
}

/* Filter box */
.distributori-filter-box {
    position: relative;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    min-width: 345px;
    z-index: 99;
}

.distributori-filter-box h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 8px;
}

.filter-group {
    margin-bottom: 15px;
}

.filter-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: #555;
    font-weight: 500;
}

.filter-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background: white;
    cursor: pointer;
}

.filter-select:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
    color: #999;
}

.filter-select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.filter-geolocate {
    width: 100%;
    padding: 10px;
    background: #009ADC;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 10px;
    text-align: center;
    border: none;
}

.filter-geolocate:hover {
    background: #FAFAFC;
    color: #0D2B61;
}

.filter-geolocate:active {
    transform: scale(0.98);
}

.filter-geolocate:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.filter-reset {
    width: 100%;
    padding: 10px;
    background: #0D2B61;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    text-align: center;
}

.filter-reset:hover {
    background: #FAFAFC;
    color: #0D2B61;
}

.filter-reset:active {
    transform: scale(0.98);
}

.scroll-to-list {
    width: 100%;
    padding: 10px;
    background: #009ADC;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    text-align: center;
    margin-top: 10px;
    display: none;
}

.scroll-to-list:hover {
    background: #FAFAFC;
    color: #0D2B61;
}

.scroll-to-list:active {
    transform: scale(0.98);
}

/* Distributors List */
.distributori-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
    padding: 20px 0;
}

.distributor-card {
    position: relative;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.distributor-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.distributor-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 15px;
}

.distributor-card h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    font-family: 'Inter';
    color: #0D2B61;
}


/* Container per i badge */
.distributor-badges {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: flex-start;
}

.academy-badge {
    height: 54px;
    width: 54px;
    background-image: url(../images/MMB-dealer-Academy.svg);
    background-repeat: no-repeat;
    background-size: contain;
    border: none;
    flex-shrink: 0;
}

.ecash-tech-badge {
    height: 54px;
    width: 54px;
    background-image: url(../images/E-cash-tech-certification.svg);
    background-repeat: no-repeat;
    background-size: contain;
    border: none;
    flex-shrink: 0;
}

.distributor-card-info {
    margin-bottom: 0px;
    min-height: 120px;
}

.distributor-card-info p {
    color: #000;
    font-family: Inter;
    font-size: 13px;
    font-style: normal;
    font-weight: 400;
    line-height: 17px;
    margin-bottom: 5px;
}

.distributor-card-info strong {
    color: #333;
    font-weight: 500;
}

.distributor-card-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.distributor-btn {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #009ADC;
    color: #FAFAFC;
    border: none;
}

.distributor-btn:hover {
    background: #fafafc;
    color: #0D2B61;
}

/* Zone Modal */
.zone-modal {
    position: fixed;
    z-index: 10000;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    min-height: 100vh;
    min-height: 100dvh;
}

.zone-modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.zone-modal-close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.zone-modal-close:hover {
    color: #333;
}

.zone-modal-content h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    color: #333;
}

.zone-section {
    margin-bottom: 20px;
}

.zone-section h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #0073aa;
    font-weight: 600;
}

.zone-section p {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    text-transform: capitalize;
}

/* Info window content */
.distributor-info {
    padding: 10px;
    max-width: 300px;
}

.distributor-info br {
    display: none;
}

.distributor-info h3 {
    margin: 0px;
    color: #0D2B61;
    font-family: Inter;
    font-size: 21px;
    font-style: normal;
    font-weight: 600;
    line-height: 120%;
    /* 25.2px */
}

.distributor-info p {
    margin: 10px 0;
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}

.distributor-info p strong {
    color: #333;
    display: block;
    margin-bottom: 3px;
}

.distributor-info a {
    color: #0073aa;
    text-decoration: none;
    word-break: break-word;
}

.distributor-info a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 1024px) {
    .distributori-list {
        grid-template-columns: 1fr;
    }

    .distributori-filter-box {
        min-width: 250px;
    }
}

@media (max-width: 768px) {
    #mappa-distributori-mmb {
        height: 400px;
        width: 100%;
    }

    .distributor-info {
        max-width: 250px;
    }

    .distributor-info h3 {
        font-size: 16px;
    }

    .distributor-info p {
        font-size: 13px;
    }

    .distributori-filter-box {
        width: 100%;
    }

    .distributori-list {
        margin-top: 20px;
        padding: 10px 0;
        gap: 15px;
    }

    .distributor-card {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    #mappa-distributori-mmb {
        height: 300px;
        border-radius: 4px;
    }

    .distributor-card-actions {
        flex-direction: column;
    }

    .distributor-btn {
        width: 100%;
    }
}

/* // Versione 10.16 */