
/* ==========================================
   WEBGIS COLETA
   RÓTULOS DOS POLÍGONOS NO MAPA PÚBLICO
========================================== */

.rotulo-poligono {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid #b8c9bd;
    border-radius: 6px;
    padding: 6px 8px;
    color: #26332b;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    max-width: min(220px, calc(100vw - 32px));
}

.rotulo-poligono:before {
    display: none;
}

.rotulo-regiao {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-width: 110px;
    max-width: 220px;
    text-align: center;
    font-family: Arial, sans-serif;
    font-size: 11px;
    line-height: 1.25;
}

.rotulo-regiao strong {
    font-size: 12px;
    color: #176b3a;
}

.rotulo-regiao span {
    white-space: normal;
}

.leaflet-popup.region-popup {
    max-width: min(300px, calc(100vw - 32px));
}

.leaflet-popup.region-popup .leaflet-popup-content-wrapper {
    border-radius: 8px;
}

.leaflet-popup.region-popup .leaflet-popup-content {
    width: min(260px, calc(100vw - 72px)) !important;
    margin: 10px 12px;
    overflow-wrap: anywhere;
}

.popup-regiao {
    min-width: 180px;
}

.popup-regiao h3 {
    margin: 0 0 5px;
    color: #176b3a;
    font-size: 14px;
}

.popup-regiao p {
    margin: 3px 0;
    line-height: 1.35;
}

@media (max-width: 600px) {
    .leaflet-popup.region-popup {
        max-width: calc(100vw - 24px);
    }

    .leaflet-popup.region-popup .leaflet-popup-content {
        width: calc(100vw - 64px) !important;
    }

    .popup-regiao {
        min-width: 0;
    }

    .rotulo-poligono {
        max-width: calc(100vw - 24px);
    }

    .rotulo-regiao {
        min-width: 100px;
        max-width: 180px;
    }
}
