/* ==========================================================
   Periferias Mapa — CSS
   Identidade: #035299 azul | #EF4B32 vermelho | #FBA84A laranja
========================================================== */

.periferias-mapa-wrapper {
    position: relative;
    width: 100%;
    margin: 0 auto 40px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(3, 82, 153, 0.12);
    border: 1px solid #dde6ef;
}

.periferias-mapa {
    width: 100%;
    height: 520px;
    background: #f0f4f8;
    z-index: 1;
}

@media (max-width: 768px) {
    .periferias-mapa {
        height: 360px;
    }
}

/* ----------------------------------------------------------
   LOADING
---------------------------------------------------------- */
.pm-loading {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 999;
    font-family: Roboto, sans-serif;
    font-size: 15px;
    color: #555;
    backdrop-filter: blur(2px);
}

.pm-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid #dde6ef;
    border-top-color: #035299;
    border-radius: 50%;
    animation: pm-spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes pm-spin {
    to { transform: rotate(360deg); }
}

.pm-empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Roboto, sans-serif;
    font-size: 15px;
    color: #888;
    z-index: 998;
}

/* ----------------------------------------------------------
   MARCADORES
---------------------------------------------------------- */
.pm-marker-wrapper {
    background: transparent !important;
    border: none !important;
}

.pm-marker {
    width: 36px;
    height: 36px;
    background: #035299;
    border: 3px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(3, 82, 153, 0.4);
    transition: transform 0.15s;
    cursor: pointer;
}

.pm-marker:hover {
    transform: scale(1.15);
    background: #EF4B32;
}

.pm-marker span {
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    font-family: Roboto, sans-serif;
    line-height: 1;
}

/* ----------------------------------------------------------
   CLUSTERS
---------------------------------------------------------- */
.pm-cluster-wrapper {
    background: transparent !important;
    border: none !important;
}

.pm-cluster {
    background: #EF4B32;
    border: 3px solid #fff;
    border-radius: 50%;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(239, 75, 50, 0.4);
    transition: transform 0.15s;
}

.pm-cluster:hover {
    transform: scale(1.1);
}

.pm-cluster span {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    font-family: Roboto, sans-serif;
    line-height: 1;
}

/* ----------------------------------------------------------
   POPUP
---------------------------------------------------------- */
.pm-leaflet-popup .leaflet-popup-content-wrapper {
    border-radius: 10px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15) !important;
    padding: 0 !important;
    overflow: hidden;
    border: 1px solid #dde6ef;
}

.pm-leaflet-popup .leaflet-popup-content {
    margin: 0 !important;
    width: 280px !important;
}

.pm-leaflet-popup .leaflet-popup-tip-container {
    margin-top: -1px;
}

.pm-popup {
    font-family: Roboto, sans-serif;
}

.pm-popup__header {
    background: #035299;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pm-popup__city {
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
}

.pm-popup__state {
    color: #b1d3e5;
    font-size: 12px;
}

.pm-popup__count {
    color: #fff;
    font-size: 11px;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
    margin-top: 4px;
    align-self: flex-start;
}

.pm-popup__list {
    max-height: 220px;
    overflow-y: auto;
}

.pm-popup__item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 10px 14px;
    border-bottom: 1px solid #f0f4f8;
    text-decoration: none;
    transition: background 0.15s;
    cursor: pointer;
}

.pm-popup__item:last-child {
    border-bottom: none;
}

.pm-popup__item:hover {
    background: #eef3fb;
}

.pm-popup__name {
    font-size: 13px;
    font-weight: 700;
    color: #035299;
    line-height: 1.3;
}

.pm-popup__excerpt {
    font-size: 12px;
    color: #888;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pm-popup__more {
    padding: 8px 14px;
    font-size: 12px;
    color: #888;
    font-style: italic;
    border-top: 1px solid #f0f4f8;
    text-align: center;
}

/* ----------------------------------------------------------
   ATRIBUIÇÃO
---------------------------------------------------------- */
.leaflet-control-attribution {
    font-size: 10px !important;
}
