/* Reset básico para ocupar a tela inteira */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    font-family: Arial, sans-serif;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Cabeçalho */
.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Empurra o título para esquerda e o botão para direita */
    background-color: #1a1a1a;
    color: #ffffff;
    padding: 10px 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    z-index: 1000;
}

/* Agrupamento do Logo + Título */
.header-brand {
    display: flex;
    align-items: center;
}

.logo-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 5px;
    margin-right: 15px;
}

.header-title {
    font-size: 1.2rem;
    margin: 0;
    font-weight: bold;
    letter-spacing: 0.5px;
}

/* Novo Botão de Monitoramento */
.btn-monitoramento {
    display: inline-flex;
    align-items: center;
    background-color: #1e3d59; /* Azul escuro operacional */
    color: #ffffff;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 0.9rem;
    transition: all 0.2s ease-in-out;
    border: 1px solid #17b978; /* Bordas em verde de destaque */
}

.btn-monitoramento:hover {
    background-color: #17b978; /* Muda para verde ao passar o mouse */
    color: #111111;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(23, 185, 120, 0.3);
}

.icon-chuva {
    margin-right: 8px;
    font-size: 1.1rem;
}

/* Ajuste de responsividade para telas de celulares */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    .header-brand {
        justify-content: center;
    }
    .btn-monitoramento {
        justify-content: center;
    }
}

.logo-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 5px;
    margin-right: 15px;
}

.header-title {
    font-size: 1.2rem;
    margin: 0;
    font-weight: bold;
    letter-spacing: 0.5px;
}

/* Espaço do Mapa */
#map {
    flex-grow: 1;
    width: 100%;
    z-index: 1;
}

/* Campo de Busca Suspenso e Centralizado no Rodapé */
.search-container {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000; /* Acima do mapa */
    display: flex;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    width: 90%;
    max-width: 500px;
}

.search-container input {
    flex: 1;
    border: none;
    padding: 10px 15px;
    border-radius: 20px 0 0 20px;
    outline: none;
    font-size: 0.95rem;
    background: transparent;
}

.search-container button {
    background-color: #f2ae1b; /* Tom de alerta amigável */
    border: none;
    color: #111;
    padding: 10px 20px;
    font-weight: bold;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s;
}

.search-container button:hover {
    background-color: #d89913;
}

/* Estilos customizados para as labels (tooltips) do mapa */

/*
.bairro-label {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid #333;
    font-weight: bold;
    color: #000;
    font-size: 0.8rem;
    padding: 2px 5px;
    border-radius: 3px;
    box-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}*/

.bairro-label {
    background: transparent !important; /* Remove o fundo */
    border: none !important;             /* Remove a borda */
    box-shadow: none !important;         /* Remove a sombra */
    color: #000000;                      /* Cor do texto (Preto) */
    font-weight: bold;
    font-size: 0.85rem;
    text-shadow: -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff; /* Contorno branco suave para legibilidade sobre imagens de satélite */
}
/*
.abrigo-label {
    background: #2e7d32;
    border: 1px solid #1b5e20;
    color: white;
    font-weight: bold;
    font-size: 0.85rem;
    padding: 3px 6px;
    border-radius: 4px;
}
*/

/* Estilos para a label do abrigo - Texto puro, quebra de linha e legível */
.abrigo-label {
    background: transparent !important; /* Remove o fundo */
    border: none !important;             /* Remove a borda */
    box-shadow: none !important;         /* Remove a sombra */
    color: #1b5e20;                      /* Verde escuro para se destacar de forma profissional */
    font-weight: bold;
    font-size: 0.85rem;
    text-align: center;                  /* Centraliza o texto quebrado em várias linhas */
    white-space: normal !important;      /* Permite a quebra de linha padrão do HTML */
    width: 120px !important;             /* Força o limite de largura para induzir a quebra */
    text-shadow: -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff; /* Contorno branco para legibilidade sobre qualquer fundo */
}

/* Remove a pequena setinha/triângulo cinza que o Leaflet cria abaixo do Tooltip por padrão */
.leaflet-tooltip-top.abrigo-label::before,
.leaflet-tooltip-bottom.abrigo-label::before,
.leaflet-tooltip-left.abrigo-label::before,
.leaflet-tooltip-right.abrigo-label::before {
    border: none !important;
}