/* RESET Leaflet restriction */
.leaflet-popup {
    max-width: none !important;
}

/* DESKTOP / TABLET (default) */
.leaflet-popup-content-wrapper {
    width: auto !important;
    max-width: 800px !important;   /* nice readable width */
    min-width: 320px;
    box-sizing: border-box;
}

.leaflet-popup-content {
    width: auto !important;
    max-width: 100% !important;
    margin: 15px !important;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Prevent content overflow */
.leaflet-popup-content h1,
.leaflet-popup-content h2,
.leaflet-popup-content h3,
.leaflet-popup-content h4,
.leaflet-popup-content p,
.leaflet-popup-content div,
.leaflet-popup-content span,
.leaflet-popup-content a,
.leaflet-popup-content li,
.leaflet-popup-content ul,
.leaflet-popup-content strong,
.leaflet-popup-content b {
    max-width: 100% !important;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: normal;
}

/* MOBILE ONLY */
@media (max-width: 768px) {
    .leaflet-popup {
        max-width: 94vw !important;
    }

    .leaflet-popup-content-wrapper {
        max-width: 94vw !important;
        width: auto !important;
    }

    .leaflet-popup-content {
        max-width: calc(94vw - 24px) !important;
        margin: 10px !important;
        max-height: 60vh;
        overflow-y: auto;
        overflow-x: hidden;
        font-size: 14px;
    }
}
.leaflet-popup-content li a {
    font-size: 18px !important;
    line-height: 1.4;
}