body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f5f5f5;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

header {
    background-color: #d32f2f;
    color: white;
    text-align: center;
    padding: 12px 0;
    font-weight: bold;
    font-size: 1.2em;
}

#map {
    flex-grow: 1;
    width: 100%;
    height: calc(100vh - 112px); /* header + top-bar + footer aprox. */
}

.top-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    background-color: #fff;
    border-bottom: 1px solid #ccc;
    padding: 10px;
    gap: 10px;
}

.top-bar p {
    margin: 0;
    font-size: 1em;
    text-align: center;
    flex-basis: 100%;
}

.search-container {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
}

.search-container input {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1em;
    width: 200px;
    max-width: 100%;
}

.search-container button {
    background-color: #1976d2;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 1em;
    transition: 0.3s;
}

.search-container button:hover {
    background-color: #125ca1;
}

footer {
    text-align: center;
    padding: 8px;
    background: #222;
    color: white;
    font-size: 0.9em;
}

/* Botões da top-bar */
.top-bar button {
    background-color: #d32f2f;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 1em;
    transition: 0.3s;
}

.top-bar button:hover {
    background-color: #b71c1c;
}
/* ===== POPUP DE OCORRÊNCIA ===== */
.popup-ocorrencia {
  text-align: center;
  min-width: 250px;
  max-width: 85vw;
  padding: 6px;
}

.popup-titulo {
  color: #9c27b0;
  font-size: 1.1em;
  font-weight: bold;
}

.popup-endereco {
  color: #666;
  font-size: 0.9em;
  margin-top: 4px;
}

.popup-coordenadas {
  background: #f5f5f5;
  padding: 8px;
  margin: 10px 0;
  border-radius: 6px;
  font-size: 12px;
  color: #333;
}

.popup-botao {
  background: #d32f2f;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  width: 100%;
  font-size: 14px;
  transition: background 0.3s;
}

.popup-botao:hover {
  background: #b71c1c;
}

.popup-info-extra {
  margin-top: 8px;
  font-size: 11px;
  color: #666;
}

/* ===== LEGENDA ===== */
.legend-box {
  background: white;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  font-family: Arial, sans-serif;
}

.legend-title {
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: bold;
  color: #333;
}

.legend-item {
  display: flex;
  align-items: center;
  margin: 5px 0;
  font-size: 13px;
  color: #333;
}

.legend-color {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  margin-right: 8px;
}

.legend-color.alta {
  background: #d32f2f;
}

.legend-color.media {
  background: #ff9800;
}

.legend-color.baixa {
  background: #ffd700;
}

.legend-color.selecao {
  background: #9c27b0;
}

/* Responsividade */
@media (max-width: 600px) {
  .popup-coordenadas {
    display: none;
  }
  .popup-botao {
    font-size: 13px;
    padding: 8px 12px;
  }
  .popup-titulo {
    font-size: 1em;
  }
}

/* ==== MEDIA QUERIES PARA CELULARES ==== */
@media (max-width: 600px) {
    header {
        font-size: 1em;
        padding: 10px 0;
    }

    .top-bar p {
        font-size: 0.9em;
    }

    .search-container input {
        width: 140px;
        font-size: 0.9em;
        padding: 6px 10px;
    }

    .search-container button {
        padding: 6px 10px;
        font-size: 0.9em;
    }

    #map {
        height: calc(100vh - 100px); /* ajusta header + topbar + footer */
    }

    footer {
        font-size: 0.8em;
        padding: 6px;
    }
}
/* POPUPS RESPONSIVOS */
.leaflet-popup-content-wrapper {
    max-width: 90vw !important;
    word-wrap: break-word;
}

.leaflet-popup-content button {
    width: 100%;
    padding: 10px;
    font-size: 1em;
}

@media (max-width: 600px) {
    .leaflet-popup-content button {
        font-size: 0.9em;
        padding: 8px;
    }

    .leaflet-popup-content div {
        font-size: 0.9em;
    }
}



