/* Paricá Mapa - Estilos */

#parica-mapa-container {
    font-family: 'Poppins', sans-serif;
}

#parica-mapa {
    background: #eaeaea;
}

/* Loading Overlay */
.parica-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(234, 234, 234, 0.95);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.parica-loading-content {
    text-align: center;
    padding: 30px;
}

.parica-loading-text {
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

.parica-loading-bar-container {
    width: 300px;
    height: 8px;
    background: #ddd;
    border-radius: 4px;
    overflow: hidden;
    margin: 0 auto 10px;
}

.parica-loading-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #8D3A08, #AC5A0E);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.parica-loading-percent {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* Header com logo - REMOVIDO, MANTIDO PARA COMPATIBILIDADE */
.parica-header {
    position: absolute;
    top: 20px;
    left: 80px;
    z-index: 2000;
    background: transparent;
    pointer-events: none;
}

.parica-header img {
    height: 90px !important;
    max-height: 90px !important;
    width: auto !important;
    max-width: 200px !important;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

/* Indicador Norte */
.parica-north {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
    pointer-events: none;
}

.parica-north-letter {
    font-weight: 600;
    font-size: 16px;
    color: #8D3A08;
    margin-bottom: 2px;
}

.parica-north img {
    height: 45px;
    display: block;
}

/* Popup */
.parica-popup-title {
    font-weight: 600;
    margin-bottom: 6px;
}

.parica-popup-table {
    border-collapse: collapse;
    width: 100%;
}

.parica-popup-table td {
    padding: 3px 6px;
    border-top: 1px solid #eee;
    vertical-align: top;
}

.parica-popup-key {
    font-weight: 600;
    white-space: nowrap;
}

/* Escala */
.parica-map .leaflet-control-scale {
    margin-right: 12px !important;
    margin-bottom: 12px !important;
}

/* Basemap Control */
.parica-basemap-ctrl {
    position: absolute;
    right: 12px;
    bottom: 54px;
    z-index: 1500;
    background: rgba(255,255,255,0.50);
    backdrop-filter: blur(3px);
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
    overflow: hidden;
    min-width: 170px;
}

.parica-basemap-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    user-select: none;
    font-weight: 600;
}

.parica-basemap-body {
    padding: 0 12px 10px 12px;
    display: none;
}

.parica-basemap-ctrl.open .parica-basemap-body {
    display: block;
}

.parica-basemap-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0;
    font-size: 13px;
}

/* Legenda Control */
.parica-legend-ctrl {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 1500;
    background: rgba(255,255,255,0.50);
    backdrop-filter: blur(3px);
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
    overflow: hidden;
    min-width: 360px;
    max-width: 520px;
}

.parica-legend-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    user-select: none;
    font-weight: 600;
}

.parica-legend-body {
    padding: 0 12px 10px 12px;
    display: none;
}

.parica-legend-ctrl.open .parica-legend-body {
    display: block;
}

.parica-legend-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 6px 0;
    font-size: 13px;
    line-height: 1.25;
}

.parica-legend-row input {
    margin-top: 2px;
}

.parica-swatch {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    flex: 0 0 auto;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.08);
}

.parica-swatch-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex: 0 0 auto;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.10);
}

.parica-chev {
    font-weight: 600;
    opacity: 0.8;
}

/* Busca Control */
.parica-search-ctrl {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 12px;
    z-index: 1600;
    min-width: 420px;
    max-width: 520px;
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(3px);
    border: 1px solid rgba(255,255,255,0.55);
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
    overflow: hidden;
}

.parica-search-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
}

.parica-search-input {
    width: 100%;
    border: none;
    outline: none;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    background: transparent;
}

.parica-search-results {
    border-top: 1px solid rgba(0,0,0,0.06);
    max-height: 220px;
    overflow: auto;
    display: none;
}

.parica-search-ctrl.open .parica-search-results {
    display: block;
}

.parica-search-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.2;
}

.parica-search-item:hover {
    background: rgba(0,0,0,0.05);
}

.parica-search-item small {
    opacity: 0.75;
    display: block;
    margin-top: 2px;
}

.parica-search-pill {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(0,0,0,0.06);
    white-space: nowrap;
}

/* Responsivo */
@media (max-width: 768px) {
    .parica-header {
        left: 20px;
        top: 10px;
    }
    
    .parica-header img {
        height: 60px;
    }
    
    .parica-search-ctrl {
        min-width: 280px;
        max-width: 90%;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .parica-legend-ctrl {
        min-width: 280px;
        max-width: 90%;
        left: 10px;
        right: 10px;
    }
    
    .parica-basemap-ctrl {
        right: 10px;
        bottom: 50px;
    }
}

/* Botões do Google Drive no popup */
.parica-drive-buttons {
    margin: 6px 0 10px 0;
}

.parica-drive-btn {
    display: inline-block;
    padding: 6px 10px;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    margin-right: 5px;
}

.parica-drive-btn-view {
    background: #8D3A08;
}

.parica-drive-btn-download {
    background: #666;
}
