/* ===========================
      MAPA INTERATIVO - EFEITO FLUTUANTE
============================ */

/* Container do mapa */
#mapa-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
}

/* SVG do mapa base */
#mapa-brasil {
    width: 100%;
    height: 950px;
    display: block;
    transition: all 0.3s ease;
}

/* Estados - estilos padr���o */
#mapa-brasil path {
    fill: #6f9c76;
    stroke: #cccccc;
    stroke-width: 1;
    cursor: pointer;
    transition: fill 0.3s ease, stroke 0.3s ease, filter 0.3s ease;
}

/* Hover nos estados */
#mapa-brasil path:hover {
    fill: #b87033;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Estados com dados */
#mapa-brasil path.com-dados {
    fill: #a8c6af;
}

/* Hover em estados com dados */
#mapa-brasil path.com-dados:hover {
    fill: #d9a441;
}

/* Estados sem dados */
#mapa-brasil path.sem-dados {
    fill: #a8c6af;
}

/* Hover em estados sem dados */
#mapa-brasil path.sem-dados:hover {
    fill: #d9a441;
}

/* Mapa em estado de flutua������o ativa (desaturado) */
#mapa-brasil.com-flutuacao {
    opacity: 0.5;
    filter: blur(1px);
}

/* ===========================
      ESTADO FLUTUANTE
============================ */

/* Overlay de fundo */
.floating-state-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
  /*  background: rgba(0, 0, 0, 0.4);*/
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}

/* Container do estado flutuante */
.floating-state-container {
    position: relative;
 /*   background: white;*/
    border-radius: 16px;
    padding: 40px 30px 30px;

    max-width: 900px; /* Aumentado para comportar o SVG maior */
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.8) translateY(30px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.4s ease;
}

.floating-state-overlay.active {
    opacity: 1;
}

.floating-state-overlay.active .floating-state-container {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Garantir que o tooltip seja vis���vel */
#tooltip-mapa {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 99999;
    pointer-events: none;
    display: none;
}

/* SVG do estado flutuante - AMPLIADO */
.floating-state-svg {
    width: 100%;
    max-height: 420px;
    display: block;
    margin: 0 auto;
}

.floating-state-title {
    text-align: center;
    margin: 10px 0 5px;
}

/* Container para os dois cards lado a lado */
.floating-state-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

/* Estilo para os cards individuais */
.floating-state-estado,
.floating-state-cidade {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 16px 18px;
  color: #000;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

/* Estilo para os cards em dispositivos menores */
@media (max-width: 768px) {
  .floating-state-info {
    grid-template-columns: 1fr;
  }
}
.floating-state-dados {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.dados-estado,
.dados-cidade {
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 16px 18px;
    color: #000;
    box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

.box-dados {
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 14px;
    padding: 18px;
    color: #000;
    box-shadow: 0 12px 30px rgba(0,0,0,.3);
    height: 100%;
}

.box-dados h4 {
    margin-top: 0;
    font-size: 16px;
    border-bottom: 1px solid rgba(255,255,255,.3);
    padding-bottom: 6px;
}

.floating-state-svg-wrapper svg {
    width: 100%;
    height: auto;
    display: block;
}

/* Path(s) internos do SVG do estado */
.floating-state-svg path {
    fill: #f8f9fa;
    fill-opacity: 0.6;
    stroke: #333333;
    stroke-width: 1;
}

/* Estilo para os c���rculos das cidades */
.floating-state-svg circle {
    transition: r 0.2s ease, fill 0.2s ease;
}

.floating-state-svg circle:hover {
    r: 12; /* Aumenta o raio ao passar o mouse */
    fill: #ff4444; /* Muda a cor ao passar o mouse */
    cursor: pointer;
}


.floating-state-close:hover {
    background: #e0e0e0;
    transform: rotate(90deg);
}

.floating-state-close:active {
    transform: rotate(90deg) scale(0.95);
}

/* Estilo para os pontos das cidades */
.floating-state-svg .city-point {
    fill: #dc3545;
    stroke: #fff;
    stroke-width: 2;
    z-index: 10;
}

.floating-state-svg .city-point:hover {
    fill: #ff0000;
    transform: scale(1.3);
}

.tooltip-cidade {
    position: absolute;
    background: rgba(20, 20, 20, 0.92);
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    pointer-events: none;
    display: none;
    z-index: 999999;
    white-space: nowrap;
    box-shadow: 0 6px 18px rgba(0,0,0,.35);
}

/* Botões de fechar nos cards individuais */
.btn-fechar-card {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: #000;
    font-size: 16px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
    padding: 0;
}

.btn-fechar-card:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: rotate(90deg);
}

/* Ajuste dos containers para acomodar o botão */
.dados-estado,
.dados-cidade {
    position: relative;
    padding: 16px 18px 16px 18px;
}

/* Botão de fechar principal - canto inferior direito */
.floating-state-close {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: auto;
    height: 40px;
    padding: 0 20px;
    border: 2px solid #fff;
    background: rgba(255, 255, 255, 0.15);
    color: #000;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1001;
    backdrop-filter: blur(10px);
}

.floating-state-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.floating-state-close:active {
    transform: translateY(0);
}

/* Responsividade para botões */
@media (max-width: 768px) {
    .btn-fechar-card {
        width: 24px;
        height: 24px;
        font-size: 14px;
    }
    
    .floating-state-close {
        bottom: 15px;
        right: 15px;
        height: 36px;
        padding: 0 16px;
        font-size: 14px;
    }
}

/* ===========================
      RESPONSIVIDADE
============================ */

@media (max-width: 768px) {
    .floating-state-container {
        max-width: 95%;
        padding: 30px 20px 20px;
        border-radius: 12px;
    }

    .floating-state-close {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }

    #mapa-brasil path {
        stroke-width: 0.8;
    }
}

@media (max-width: 480px) {
    .floating-state-container {
        max-width: 100%;
        padding: 25px 15px 15px;
        border-radius: 10px;
        margin: 20px;
    }

    .floating-state-close {
        width: 30px;
        height: 30px;
        font-size: 16px;
        top: 8px;
        right: 8px;
    }
}
