/**
 * Estilos para o Mapa Interativo do Pará
 */

.section-mapa-para {
    padding: 80px 0;
    background: #ffffff;
}

.section-title-mapa {
    text-align: center;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 32px;
    font-weight: 700;
    color: var(--color-primaria, #20B2AA);
}

.section-title-mapa svg {
    width: 36px;
    height: 36px;
    color: var(--color-primaria, #20B2AA);
}

.mapa-para-wrapper {
    display: flex;
    gap: 20px;
    min-height: 600px;
    max-width: 1400px;
    margin: 0 auto;
}

.area-mapa {
    flex: 1;
    height: 600px;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e5e7eb;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.area-mapa:active,
.area-mapa.grabbing {
    cursor: grabbing !important;
}

/* Permitir interação com elementos clicáveis */
#mapa-para svg path,
#mapa-para svg text,
#mapa-para svg .marker-cidade {
    cursor: pointer;
}

#mapa-para svg path:hover,
#mapa-para svg text:hover {
    cursor: pointer;
}

/* Container interno para o SVG */
#mapa-para {
    width: 100%;
    height: 100%;
    min-height: 600px;
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    z-index: 1;
}

#mapa-para svg {
    width: 100%;
    height: 100%;
    max-height: 600px;
    display: block;
}

/* Estilos para markers (ícones de pin) */
.marker-cidade {
    pointer-events: all;
    transition: transform 0.3s ease;
}

.marker-cidade:hover {
    z-index: 1000;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

/* Cidade selecionada */
.cidade-selecionada {
    fill: #20B2AA !important;
    stroke: #16a34a !important;
    stroke-width: 2 !important;
}

/* Tooltip customizado */
.mapa-tooltip {
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.painel-lateral {
    width: 380px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.painel-header {
    padding: 18px 20px;
    background: var(--color-primaria, #20B2AA);
    color: #fff;
    border-bottom: none;
}

.painel-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.painel-tipo {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.painel-contador {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

.painel-content {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    overflow-x: hidden;
    background: #ffffff;
    max-height: calc(600px - 70px);
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

.painel-content::-webkit-scrollbar {
    width: 5px;
}

.painel-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.painel-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.painel-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.painel-placeholder {
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    padding: 60px 20px;
    line-height: 1.6;
}

.loja-detalhes {
    margin-bottom: 10px;
}

.loja-detalhes h3 {
    margin: 0 0 6px 0;
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

.loja-detalhes > p {
    margin: 0 0 10px 0;
    color: #6b7280;
    font-size: 12px;
    font-weight: 500;
}

.loja-detalhes a {
    color: var(--color-primaria, #20B2AA);
    text-decoration: none;
    font-weight: 600;
}

.loja-detalhes a:hover {
    text-decoration: underline;
}

.lista-lojas {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.loja-item {
    padding: 8px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.loja-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--color-primaria, #20B2AA);
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

.loja-item:hover {
    background: #ffffff;
    border-color: var(--color-primaria, #20B2AA);
    box-shadow: 0 4px 12px rgba(32, 178, 170, 0.15);
    transform: translateY(-1px);
}

.loja-item:hover::before {
    transform: scaleY(1);
}

.loja-item-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.loja-item h4 {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: #111827;
    line-height: 1.2;
    flex: 1;
}

.loja-tipo {
    display: inline-block;
    background: var(--color-primaria, #20B2AA);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.3px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.loja-item-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 6px;
    padding-left: 2px;
}

.loja-info-item {
    color: #4b5563;
    font-size: 10px;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 4px;
}

.loja-info-item::before {
    content: '•';
    color: var(--color-primaria, #20B2AA);
    font-weight: bold;
    font-size: 12px;
}

.loja-info-item.loja-telefone {
    color: var(--color-primaria, #20B2AA);
    font-weight: 600;
}

.loja-link-maps {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 4px;
    padding: 5px 10px;
    background: var(--color-primaria, #20B2AA);
    color: white !important;
    text-decoration: none;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 600;
    transition: all 0.2s ease;
    min-width: 60px;
    box-shadow: 0 2px 4px rgba(32, 178, 170, 0.2);
}

.loja-link-maps svg {
    width: 12px;
    height: 12px;
    stroke: currentColor;
    fill: none;
    flex-shrink: 0;
}

.loja-link-maps span {
    color: white !important;
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
}

.loja-link-maps:hover {
    background: var(--color-secundaria, #FF8C00);
    color: white !important;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 140, 0, 0.3);
}

.loja-link-maps:hover span {
    color: white !important;
}

/* Popup do Leaflet */
.popup-loja {
    min-width: 250px;
}

.popup-loja h4 {
    margin: 0 0 10px 0;
    color: var(--color-primaria, #20B2AA);
    font-size: 18px;
    font-weight: 700;
}

.popup-loja p {
    margin: 6px 0;
    font-size: 14px;
    line-height: 1.5;
}

.popup-loja a {
    color: var(--color-primaria, #20B2AA);
    text-decoration: none;
    font-weight: 600;
}

.popup-loja a:hover {
    text-decoration: underline;
}

/* Custom marker */
.custom-marker {
    background: transparent;
    border: none;
}

/* Estilos para o SVG */
#mapa-para svg {
    max-width: 100%;
    height: auto;
}

#mapa-para svg .municipio {
    transition: all 0.3s ease;
}

/* Markers (ícones de pin) no mapa */
.marker-cidade {
    pointer-events: all;
    cursor: pointer;
}

/* Estilos para nomes das cidades no mapa */
#textos-cidades {
    pointer-events: none;
}

.nome-cidade {
    pointer-events: all;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    font-size: 10px;
    fill: #4a5568;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.nome-cidade:hover {
    fill: #20B2AA !important;
    font-weight: bold !important;
    font-size: 11px !important;
}

.cidade-selecionada-texto {
    fill: #20B2AA !important;
    font-weight: bold !important;
    font-size: 11px !important;
}

/* Garantir que textos fiquem acima dos paths mas abaixo dos markers */
#textos-cidades {
    z-index: 1;
}

#markers-group {
    z-index: 2;
}

/* Controles de Zoom */
.area-mapa .zoom-controls {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10000 !important; /* Z-index muito alto para garantir que apareça */
    display: flex !important;
    flex-direction: column;
    gap: 8px;
    background: white;
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    pointer-events: auto; /* Garantir que os botões sejam clicáveis */
    visibility: visible !important;
    opacity: 1 !important;
}

.zoom-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    color: var(--color-primaria, #20B2AA);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 20px;
}

.zoom-btn:hover {
    background: var(--color-primaria, #20B2AA);
    color: white;
    border-color: var(--color-primaria, #20B2AA);
    transform: scale(1.05);
}

.zoom-btn:active {
    transform: scale(0.95);
}

.zoom-btn {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    padding: 0;
}

/* Cidade com lojas - cor verde clara */
.cidade-com-lojas {
    fill: #d1fae5 !important;
    stroke: #a7f3d0 !important;
}

/* Responsivo */
@media (max-width: 992px) {
    .mapa-para-wrapper {
        flex-direction: column;
        min-height: auto;
    }
    
    .area-mapa {
        height: 500px;
        min-height: 500px;
    }
    
    #mapa-para {
        min-height: 500px;
    }
    
    .painel-lateral {
        width: 100%;
        max-height: 400px;
    }
}

@media (max-width: 768px) {
    .section-mapa-para {
        padding: 40px 0;
    }
    
    .section-title-mapa {
        font-size: 24px;
    }
    
    .area-mapa {
        height: 400px;
        min-height: 400px;
    }
    
    #mapa-para {
        min-height: 400px;
    }
    
    .painel-lateral {
        max-height: 300px;
    }
    
    .painel-header h3 {
        font-size: 18px;
    }
    
    .loja-item h4 {
        font-size: 15px;
    }
}

