/* KLEN R40 — Public map popup readability hotfix
   Fixes inherited/transparent text colour on mobile WebKit and desktop browsers. */

html body .maplibregl-popup-content {
    background: #ffffff !important;
    color: #202124 !important;
    -webkit-text-fill-color: #202124 !important;
    color-scheme: light !important;
    opacity: 1 !important;
    visibility: visible !important;
}

html body .maplibregl-popup-content .public-point-popup,
html body .maplibregl-popup-content .public-point-popup * {
    color: #202124 !important;
    -webkit-text-fill-color: #202124 !important;
    opacity: 1 !important;
    visibility: visible !important;
    filter: none !important;
    mix-blend-mode: normal !important;
    text-shadow: none !important;
}

html body .maplibregl-popup-content .public-point-popup {
    min-width: 180px;
    max-width: min(320px, calc(100vw - 48px));
    font-family: inherit;
    font-size: 12px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

html body .maplibregl-popup-content .public-point-popup-title {
    color: #111827 !important;
    -webkit-text-fill-color: #111827 !important;
    margin: 0 18px 6px 0;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

html body .maplibregl-popup-content .public-point-popup-description {
    color: #3c4043 !important;
    -webkit-text-fill-color: #3c4043 !important;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    user-select: text;
    -webkit-user-select: text;
}

html body .maplibregl-popup-close-button {
    color: #202124 !important;
    -webkit-text-fill-color: #202124 !important;
    opacity: 1 !important;
}

@media (max-width: 600px) {
    html body .maplibregl-popup-content {
        padding: 12px 10px !important;
    }

    html body .maplibregl-popup-content .public-point-popup {
        max-width: calc(100vw - 56px);
        font-size: 12px;
        line-height: 1.5;
    }

    html body .maplibregl-popup-content .public-point-popup-title {
        font-size: 13px;
    }
}
