/* public/css/style.css */

/************************************
 * Base e Layout
************************************/
:root {
  --primary-color: #0047BB;
  --hover-color: #003899;
  --accent-color: #E9F0FF;
  --text-color: #333;
  --border-radius: 10px;

  --pin-top: #3f89c5;
  --pin-bottom: #1e6091;
  --pin-border: #1e6091;

  --scrollbar-size: 12px;
  --scrollbar-radius: 8px;
  --scrollbar-size-docs: 8px;
  --scrollbar-track: var(--brand-100, #E9F0FF);
  --scrollbar-thumb: var(--brand-normal, #91ADEB);
  --scrollbar-thumb-hover: var(--brand-800, #3A6FD8);

  /* Cores dos marcadores - modo padrão */
  --marker-padrao: #3b82f6;
  --marker-pendente: #E41A1C;
  --marker-regularizado: #4DAF4A;
  --marker-nao-se-aplica: #999999;
  --marker-coordenada: #000000;
  --marker-pesquisado: #FFD700;
}

/* Modo deuteranopia - cores seguras para daltônicos */
:root[data-color-mode="deuteranopia"] {
  --marker-padrao: #0072B2;
  --marker-pendente: #D55E00;
  --marker-regularizado: #0072B2;
  --marker-nao-se-aplica: #999999;
  --marker-coordenada: #000000;
  --marker-pesquisado: #E69F00;
}

/* Estilo base para marcadores SVG */
.custom-svg-marker {
  background: none !important;
  border: none;
}

.svg-marker-wrapper {
  position: relative;
  width: 25px;
  height: 41px;
}

.marker-svg {
  width: 25px;
  height: 41px;
  fill: currentColor;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* Cores específicas por tipo de marcador */
.marker-padrao { color: var(--marker-padrao); }
.marker-pendente { color: var(--marker-pendente); }
.marker-regularizado { color: var(--marker-regularizado); }
.marker-nao-se-aplica { color: var(--marker-nao-se-aplica); }
.marker-coordenada { color: var(--marker-coordenada); }
.marker-pesquisado { color: var(--marker-pesquisado); }

/* Animação bounce para marcador pesquisado */
.bounce-marker .marker-svg {
  animation: bounceTailwind 1s infinite;
  transform-origin: center bottom;
}

@keyframes bounceTailwind {
  0%, 100% {
    transform: translateY(-25%);
    animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
  }
  50% {
    transform: translateY(0);
    animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
  }
}
/* WebKit (Chrome, Edge, Safari) */
.sidebar-content::-webkit-scrollbar,
.filtro-lista::-webkit-scrollbar {
  width: var(--scrollbar-size);
  height: var(--scrollbar-size);
}

.sidebar-content::-webkit-scrollbar-track,
.filtro-lista::-webkit-scrollbar-track {
  background: var(--scrollbar-track, var(--accent-color));
}

.sidebar-content::-webkit-scrollbar-thumb,
.filtro-lista::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-thumb, #91ADEB);
  border-radius: var(--scrollbar-radius);
  border: 3px solid transparent;
  background-clip: content-box;
}

.sidebar-content::-webkit-scrollbar-thumb:hover,
.filtro-lista::-webkit-scrollbar-thumb:hover {
  background-color: var(--scrollbar-thumb-hover);
  background-clip: content-box; /* garante que não volte para border-box */
}

/* Firefox */
.sidebar-content,
.filtro-lista {
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb, #91ADEB)
                   var(--scrollbar-track, var(--accent-color));

}


@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/inter/inter-v18-latin-regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/inter/inter-v18-latin-500.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/inter/inter-v18-latin-600.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/inter/inter-v18-latin-700.woff2') format('woff2');
}


/************************************
* Caixa de Sugestões (Autocomplete)
************************************/
.suggestions {
  position: absolute;
  background: #fff;
  border: 1px solid #ccc;
  max-height: 200px;
  overflow-y: auto;
  width: 100%;
  display: none;
  z-index: 120;
  margin-top: 30px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  line-height: 1.8;
}

.suggestion-item {
  display: flex;               /* ícone + texto lado a lado */
  align-items: center;
  gap: 8px;                    /* espaço entre ícone e texto */
  padding: 6px 10px;
  cursor: pointer;
  font-size: 14px;
}

.suggestion-item .suggestion-icon {
  color: var(--primary-color, #0047BB);
  font-size: 13px;
  flex-shrink: 0;              /* ícone não deforma */
}

.suggestion-item:hover {
  background: #eee;
}

 /* WebKit (Chrome, Edge, Safari) */
.sidebar-content::-webkit-scrollbar,
.filtro-lista::-webkit-scrollbar,
#suggestionsBox::-webkit-scrollbar {
  width: var(--scrollbar-size);
  height: var(--scrollbar-size);
}

.sidebar-content::-webkit-scrollbar-track,
.filtro-lista::-webkit-scrollbar-track,
#suggestionsBox::-webkit-scrollbar-track {
  background: var(--scrollbar-track, var(--accent-color));
}

.sidebar-content::-webkit-scrollbar-thumb,
.filtro-lista::-webkit-scrollbar-thumb,
#suggestionsBox::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-thumb, #91ADEB);
  border-radius: var(--scrollbar-radius);
  border: 3px solid transparent;
  background-clip: content-box;
}

.sidebar-content::-webkit-scrollbar-thumb:hover,
.filtro-lista::-webkit-scrollbar-thumb:hover,
#suggestionsBox::-webkit-scrollbar-thumb:hover {
  background-color: var(--scrollbar-thumb-hover);
  background-clip: content-box;
}

/* Firefox */
.sidebar-content,
.filtro-lista,
#suggestionsBox {
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb, #91ADEB)
                   var(--scrollbar-track, var(--accent-color));
}

 /************************************
  * Filtro de Situação (opcional)
  ************************************/
 .situacao-filter-container {
   position: absolute;
   top: 75px;
   left: calc(62%);
   z-index: 110;
   background: white;
   padding: 10px;
   border-radius: 8px;
   box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
   font: 13px Arial, Helvetica, sans-serif;
   width: 135px;
 }
 
 .situacao-filter-container label {
   display: flex;
   align-items: center;
   gap: 4px;
   padding: 2px 0;
   white-space: nowrap;
 }
 
 .situacao-filter-container input[type="checkbox"] {
   flex-shrink: 0;
 }
 
 .situacao-filter-container span {
   font-size: 13px;
   line-height: 1;
 }
 
 
 .polig-title {
   text-align: center;
 }
 
 .poligonais-container {
   margin-left: 10px;
   margin-top: 6px;
   display: flex;
   flex-direction: column;
   align-items: flex-start;
   gap: 6px;
 }
 
 /************************************
  * Gráfico (canto inferior esquerdo)
  ************************************/
#chartContainer {
  position: absolute;
  bottom: 40px;
  left: 20px;
  z-index: 30;
  background: white;
  padding: 10px 16px;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
  height: auto;
  width: auto;
  min-width: 280px;
  max-width: 360px;
  pointer-events: auto;
}


#situacaoChart {
  width: 100% !important;    /* ocupa todo o contêiner */
  height: 180px !important;  /* reduz altura para não parecer quadrado */
}


 /************************************
  * Remove Fundo Extra do Popup
  ************************************/
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  padding: 0 !important;
}
.leaflet-container a.leaflet-popup-close-button { display: none !important; }

/************************************
* Popup-CARD (sem rolagem interna)
************************************/
/* ---------- POPUP CARD ---------- */
.popup-card{
  min-width:360px; max-width:90%;
  background:#fff;
  border:2px solid var(--primary-color);
  border-radius:12px;
  /* ↓ mantém sombra + fonte como já estava */
  box-shadow:0 4px 12px rgba(0,71,187,.2);
  font-size:15px; 
  line-height:1.6;
  z-index: 70;
}


/* ---------- POPUP cHEADER (código + registro) ---------- */
.popup-header{
  /* negativo compensa a borda/padding do card */
  margin: -2px -2px 0;
  background: linear-gradient(to right, var(--primary-color), #0055d4);
  color:#fff; font-size:16px;font-weight:600;
  display:flex;
  flex-direction:column;
  padding: 12px 14px;
  justify-content:center;   /* já centraliza no eixo‑Y  */
  align-items:center;       /* agora centraliza no eixo‑X */
  text-align:center;        /* garante texto central */
  border-radius:10px 10px 0 0;
  position:relative;        
}
/* texto “(Registro n de n)” */
.popup-header .registro-indicador{
  font-size:12px;
  font-weight:400;
  opacity:.95;
}

/* ---------- ABAS (compactas) ---------- */
.popup-tabs{
  display:flex;
  gap:0;
  padding:0;
  border-bottom:1px solid #d8dde6;
  background:#fff;
  flex-wrap: nowrap;
  overflow: hidden;            /* evita “vazar” borda se truncar */
}
.popup-tab {
  flex:1 1 0%;
  min-width: 0; /* 'none' não é válido */
  justify-content: center;
  text-align: center;                 
  border:none;
  background:transparent;
  padding:10px 0 6px 0;
  font-size:12px;
  color:#555;
  cursor:pointer;
  border-bottom:3px solid transparent; /* reserva o espaço */
  display:flex;
  align-items:center;
  gap:4px;
  box-sizing: border-box; /* garante que a borda não "empurre" o tamanho */
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

.popup-tab.active {
  color: #1f5c99;
  border-bottom-color: #1f5c99;
  font-weight: 600;
}
.popup-tab:not(.active):hover{background:#f4f6ff;}

/* ---------- Títulos internos do popup ---------- */
.popup-card h4{
  font-size:16px;      /* ↓ ajuste aqui se quiser ainda menor */
  margin:6px 0 4px;    /* encurta espaçamento */
  font-weight:600;
  color:#1f5c99;          /* cinza escuro mais suave que preto */
}

/* texto “Não informado” mais suave */
.valor-vazio{
  color:#777;          /* cinza claro         */
  font-style:italic;   /* opcional – tire se não quiser */
}

.popup-campo {
  font-size: inherit;
}

/* ---------- OBSERVAÇÃO ---------- */
.obs-icon-wrap{position:absolute;top:50%;right:14px;transform:translateY(-50%);}
.obs-icon{
  font-size:18px;
  color:#fff;
  cursor:pointer;
}
.obs-tooltip{
  position:absolute;
  top:calc(100% + 8px);           /* 8 px abaixo do header */
  right:0;
  width:280px;
  background:#fff;
  border:1px solid #ccc;
  border-radius:8px;
  padding:12px 14px;
  font-size:13px;
  line-height:1.45;
  box-shadow:0 4px 12px rgba(0,0,0,.18);
  display:none;
  z-index:110;
  color: var(--text-color);
}
.obs-tooltip.show{display:block;}

.popup-content {
  line-height: 1.6;
  padding: 8px 12px 14px 16px;
  min-height: 40vh;
  max-height: 60vh;
  overflow-y: auto;
}

.popup-card hr{
  margin-top: .25rem !important;
  margin-bottom: .25rem !important;
}

.popup-nav {
  text-align: center;
  margin-top: 8px;
}
.popup-nav button {
  padding: 5px 12px;
  font-size: 13px;
  border-radius: 6px;
  background-color: #0066cc;
  color: white;
  border: none;
  margin: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.popup-nav button:hover {
  background: #0056b3;
}

/* Reset no contêiner padrão do Leaflet para este popup */
.geope-popup .leaflet-popup-content-wrapper { padding: 0; border-radius: 12px; }
.geope-popup .leaflet-popup-content { margin: 0; }

/* encolhe ao conteúdo; só expande até os limites abaixo */
.geope-popup .leaflet-popup-content {
  /* encolhe ao conteúdo; só expande até os limites abaixo */
  display: inline-block;              /* permite shrink-to-fit */
  inline-size: fit-content;           /* largura = conteúdo */
  max-inline-size: min(90vw, 520px);  /* teto responsivo */
  box-sizing: border-box;
  margin: 0;                          /* zera margem padrão */
}

.popup-card {
  /* o card acompanha o conteúdo, sem “forçar” largura */
  inline-size: fit-content;
  max-inline-size: min(90vw, 500px);
  /* se quiser um piso mínimo visual, use 280–320px: */
  min-inline-size: 0;                 /* ou 300px, se preferir */
  box-sizing: border-box;
}

/* Garante quebra em textos longos (protocolos, chaves, etc.) */
.popup-card,
.popup-content,
.popup-campo,
.popup-tab .tab-label {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* As tabs não esticam além do possível; truncam com reticências */
.popup-tab { flex: 1 1 auto; min-width: 0; }
.popup-tab .tab-label{
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* indent/“tab” somente na aba Info. adicional */
.info-adicional .popup-campo {
  margin-left: 12px;           /* ajuste fino */
  padding-left: 10px;          /* opcional, p/ dar respiro */
 
}

/* Mantém o wrapper do Leaflet “justo” */
.geope-popup .leaflet-popup-content-wrapper { padding: 0; border-radius: 12px; }
.geope-popup .leaflet-popup-content { margin: 0; }
/************************************
* Documentos (anexos) no popup
************************************/
.docs-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px 0;
  margin: 0;
  max-height: 40vh;
  overflow-y: auto;
  padding-right: 6px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.doc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #e6eaf2;
  background: #fff;
}

.doc-item.disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.doc-item:hover:not(.disabled) {
  background: #f7f9ff;
}

.doc-left {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.doc-right {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.doc-icon {
  width: 18px;
  color: #6b7280;
  font-size: 16px;
  flex-shrink: 0;
  vertical-align: middle;
}

.doc-title {
  display: inline-block;
  max-width: 360px;
  font-size: 14px;
  color: #222;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.doc-open {
  text-decoration: none;
  color: inherit;
}

.doc-open:hover .doc-title {
  color: #3b82f6;
  text-decoration: underline;
}

.doc-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: #6b7280;
  transition: color 0.2s;
}

.doc-action:hover {
  color: #3b82f6;
}

.doc-action.disabled {
  opacity: 0.35;
  pointer-events: none;
}

.docs-topbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e6eaf2;
}

.docs-zipall {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 0;
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  background: transparent;
  border: none;
  text-decoration: none;
  transition: color 0.2s;
}

.docs-zipall-top {
  display: block;
  text-align: center;
  margin: 0;
}

.docs-zipall:hover {
  color: #3b82f6;
  text-decoration: underline;
}

.docs-zipall i {
  font-size: 11px;
}

.docs-empty,
.docs-loading {
  color: #666;
  font-style: italic;
  padding: 4px 2px;
}

/* Rodapé fixo dentro da aba de Documentos */
.docs-footer {
  position: sticky;          /* fixa no fundo da área rolável acima */
  bottom: 0;
  background: var(--surface, #fff);
  border-top: 1px solid var(--border, #e3e8f3);
  padding: 8px 10px;
  display: flex;
  justify-content: space-between; /* contador à direita (ajuste se quiser à esquerda) */
  align-items: center;
  gap: 8px;
  font-size: .95rem;
  color: var(--muted, #6b7280);
}

.docs-count strong {
  font-weight: 600;
}
/* WebKit */
.docs-scroll::-webkit-scrollbar{
  width: var(--scrollbar-size-docs, var(--scrollbar-size));
  height: var(--scrollbar-size-docs, var(--scrollbar-size));
}
.docs-scroll::-webkit-scrollbar-track{
  background: var(--scrollbar-track, var(--accent-color));
}
.docs-scroll::-webkit-scrollbar-thumb{
  background-color: var(--scrollbar-thumb, #91ADEB);
  border-radius: var(--scrollbar-radius);
  border: 3px solid transparent;
  background-clip: content-box;
}
.docs-scroll::-webkit-scrollbar-thumb:hover{
  background-color: var(--scrollbar-thumb-hover);
}

/* Firefox */
.docs-scroll{
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb, #91ADEB)
                   var(--scrollbar-track, var(--accent-color));
}

/* melhora suavização de fonte e evita blur em algumas GPUs */
.leaflet-popup,
.leaflet-popup-content-wrapper,
.popup-card{
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* garante layer própria de composição p/ o popup */
.leaflet-popup-pane .leaflet-popup{
  transform: translateZ(0);
  backface-visibility: hidden;
}

/************************************
 * Ajuste Botões Leaflet no canto
 ************************************/

 .titularidade-filter-container select,
 .filter-select-container select {
   background-color: white;
   padding: 6px;
   font-size: 14px;
   border-radius: 4px;
   border: 1px solid #ccc;
 }
 
 .popup-header .registro-indicador {
   font-size: 12px;
   font-weight: normal;
   opacity: 0.85;
 }
 
 /************************************
  * Opções extras para rolagem
  ************************************/
 .rd-control-container {
   max-height: 80vh;
   overflow-y: auto;
   padding-right: 4px;
 }
 
 .btn-ug-control {
   font-size: 13px;
   padding: 4px 10px;
   margin: 0 4px 4px 0;
   background-color: white;
   color: var(--primary-color);
   border: 1px solid var(--primary-color);
   border-radius: 6px;
   cursor: pointer;
   transition: all 0.2s ease;
   height: 30px;
   line-height: 1;
   display: flex;
   align-items: center;
   justify-content: center;
   box-shadow: none; /* Removido destaque */
 }
 
 .btn-ug-control:hover {
   background-color: #e6f0ff;
   color: var(--primary-color);
 }
 
 .btn-ug-group {
   display: flex;
   gap: 4px;
   justify-content: center;
   flex-wrap: wrap;
   margin-bottom: 6px;
 }
 .btn-ug-control:focus {
   outline: none;
   box-shadow: 0 0 0 2px rgba(0, 71, 187, 0.3); /* azul leve */
 }
 
 .filtro-grupo {
   margin-bottom: 15px;
   border: 1px solid var(--accent-color);
   border-radius: 6px;
   overflow: hidden;
 }
 
 .filtro-titulo {
   background-color: #f5f5f5;
   padding: 10px 15px;
   font-weight: 600;
   cursor: pointer;
   display: flex;
   justify-content: space-between;
   align-items: center;
 }

 .filtro-titulo:hover {
  background-color: rgba(0, 71, 187, 0.1); /* azul claro com transparência */
  cursor: pointer;
  border-radius: 6px;
  font-weight: bold;
  transition: background-color 0.2s ease-in-out;
 }

 
 .filtro-conteudo {
   padding: 10px 15px;
   border-top: 1px solid #e0e0e0;
 }
 
 /* ALTERAR: mantém a transição no ícone */
.filtro-titulo .chevron-wrapper i{
  transition: transform .18s ease;
  display: inline-block;
}

/* TRANSIÇÃO: agora vale para TODO chevron dentro do título, com ou sem wrapper */
.filtro-titulo .chevron-wrapper i,
.filtro-titulo i.fa-chevron-down,
.filtro-titulo i.fa-chevron-up{
  transition: transform .18s ease;
  transform-origin: center;
  display: inline-block;
}

/* ROTAÇÃO com base no aria-expanded (no próprio título OU em um filho) */
.filtro-titulo[aria-expanded="true"] .chevron-wrapper i,
.filtro-titulo:has([aria-expanded="true"]) .chevron-wrapper i,
.filtro-titulo[aria-expanded="true"] i.fa-chevron-down,
.filtro-titulo:has([aria-expanded="true"]) i.fa-chevron-down{
  transform: rotate(180deg);
}


 .btn-grupo-controle {
   display: flex;
   gap: 8px;
   margin-bottom: 10px;
 }
 
 .btn-controle {
   flex: 1;
   padding: 6px 10px;
   font-size: 12px;
   background-color: white;
   border: 1px solid var(--primary-color);
   color: var(--primary-color);
   border-radius: 4px;
   cursor: pointer;
   transition: all 0.2s;
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 4px;
 }
 
 .btn-controle:hover {
  background-color: #e3f2fd;
  color: var(--primary-color);
  box-shadow: 0 2px 6px rgba(0, 71, 187, 0.3);
}
 
 .filtro-lista {
   max-height: 200px;
   overflow-y: auto;
   padding-right: 5px;
 }
 
 .filtro-item {
   display: flex;
   align-items: center;
   gap: 8px;
   padding: 6px 0;
   cursor: pointer;
   margin-bottom: 2px;
 }
 
 .filtro-cor {
   width: 12px;
   height: 12px;
   border-radius: 50%;
   display: inline-block;
 }
 
 .filtro-texto {
   font-size: 14px;
 }
 
 .sidebar-footer {
   padding: 15px;
   border-top: 1px solid #e0e0e0;
 }
 
 .btn-aplicar {
   width: 100%;
   padding: 10px;
   background-color: var(--primary-color);
   color: white;
   border: none;
   border-radius: 4px;
   font-weight: 600;
   cursor: pointer;
   transition: background-color 0.2s;
 }
 
 .btn-aplicar:hover {
   background-color: #003a9e;
 }
 
 .sidebar-overlay {
   position: fixed;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   background-color: rgba(0, 0, 0, 0.5);
   z-index: 140;
   display: none;
 }
 
 .sidebar-overlay.active {
   display: block;
 }


 .filtros-ativos-legenda {
  background-color: #f0f0f0;
  padding: 6px 12px;
  font-size: 14px;
  border-left: 5px solid #007bff;
  margin: 8px 20px;
  border-radius: 4px;
}

.sidebar-filtros .btn-controle {
  padding: 0.25rem; /* altura menor */
  font-size: 0.75rem;       /* fonte menor */
  line-height: 1.2;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.sidebar-filtros .btn-controle i {
  font-size: 0.75rem; /* ícone proporcional ao texto */
}

.suggestion-item {
  padding: 4px 8px;
  cursor: pointer;
}

.suggestion-item:hover {
  background-color: #eee; /* apenas hover */
}

.suggestion-active {
  background-color: #007bff; /* cor do destaque */
  color: #fff;
}

.faixa-slider-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 8px;
}

.faixa-slider {
  position: relative;
  height: 40px;
  margin-bottom: 10px;
}

.faixa-slider::before {
  content: "";
  position: absolute;
  top: 18px; /* mesma altura dos tracks */
  left: 0;
  right: 0;
  height: 4px;
  background: #ccc;
  border-radius: 2px;
  z-index: 10;
}

.faixa-slider input[type="range"] {
  position: absolute;
  width: 100%;
  top: 18px;
  height: 4px;
  background: transparent;
  appearance: none;
  pointer-events: none;
}

.slider-min::-webkit-slider-thumb,
.slider-max::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  background: #2563eb;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  pointer-events: all;
  position: relative;
  z-index: 30;
}

.slider-min {
  z-index: 30;
}

.slider-max {
  z-index: 20;
}

.slider-min::-moz-range-thumb,
.slider-max::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: #2563eb;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  pointer-events: all;
}

.faixa-slider input[type="range"]::-webkit-slider-runnable-track,
.faixa-slider input[type="range"]::-moz-range-track {
  height: 4px;
  background: #ccc;
  border-radius: 2px;
}


.faixa-inputs {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.faixa-inputs div {
  flex: 1;
}

.faixa-inputs input {
  width: 100%;
  padding: 4px 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.faixa-inputs label {
  font-size: 12px;
  color: #555;
  font-weight: 500;
}

.faixa-inputs input::after {
  content: "m²";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: #666;
}
.input-com-unidade {
  position: relative;
  display: flex;
  align-items: center;
}

.input-com-unidade input {
  padding-right: 25px;
  width: 12ch;
  max-width: 100%;
}

.input-com-unidade .unidade {
  position: absolute;
  right: 20px;
  font-size: 12px;
  color: #666;
  pointer-events: none;
}

.incluir-grandes-areas {
  font-size: 12px !important; /* Reduced from 11px to 10px and added !important */
  font-weight: 400;
  color: #666;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
}

/* coloque ISSO como a ÚLTIMA linha do style.css */
label.incluir-grandes-areas,
label.incluir-grandes-areas > span {
  font-size: 12px !important;
  line-height: 1;
}

#destinoChartContainer {
  position: fixed !important;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50%; 
  height: 120px;
  background: transparent;
  z-index: 40;
  display: flex;
  flex-direction: column; 
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* Limitando explicitamente a altura do gráfico */
#destinacaoChart {
  width: 100%;
  min-height: 350px;
  height: 40px !important;
  pointer-events: auto;
}

/* Legenda separada com espaço adequado */
#destinoChartLegenda {
  width: auto;
  max-width: 100%;
  margin-top: 8px;
  pointer-events: auto;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  background-color: transparent;
  padding: 4px 8px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  color: var(--text-color);
}

#toggleGraficoDestino i {
  transform: none !important;
  transition: none !important;
}

/* botão em si ─ herdado da linha do título */
.btn-grafico{
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  font-size: 18px;        /* ↳ ajuste de tamanho */
  transition: filter .15s, color .15s;
}

/* estado inativo (padrão)  ─ cinza + leve desfoque */
.btn-grafico.grafico-inativo{
  color: #7a7a7a;         /* cinza médio */
  filter: grayscale(100%) opacity(.45);
}

/* estado ativo ─ cor destaque + leve glow */
.btn-grafico.grafico-ativo{
  color: #2c7bb6;         /* azul do projeto */
  filter: brightness(1.15) drop-shadow(0 0 2px rgba(44,123,182,.45));
}

#destinoChartContainer{ display:none; }

/************************************
 * Toggle Modo Daltônico
************************************/
.colorblind-toggle-wrapper {
  width: 100%;
  padding: 8px;
  margin-top: 8px;
  border-top: 1px solid #ddd;
}

.colorblind-toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: #444;
  margin: 0;
  user-select: none;
}

.colorblind-toggle-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  margin: 0;
}

.colorblind-toggle-label:hover .toggle-text {
  color: var(--primary-color);
}



/* ---------- OBSERVAÇÃO ---------- */
.obs-icon{
  margin-left:8px;
  cursor:pointer;
  position:relative;
}
.obs-tooltip{
  display:none;
  position:absolute;
  top:22px;               /* distancia abaixo do ícone */
  right:0;
  width:260px;
  background:#fff;
  border:1px solid #ccc;
  border-radius:6px;
  padding:8px 10px;
  font-size:13px;
  line-height:1.45;
  box-shadow:0 2px 6px rgba(0,0,0,.15);
  z-index:110;
}
.obs-icon:hover + .obs-tooltip,
.obs-tooltip:hover{display:block;}

.popup-fav-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  z-index: 20;
}

.popup-fav-icon .export-icon {
  font-size: 18px;
  color: #fff;
  cursor: pointer;
  transition: color 0.2s ease;
}


.export-format-group {
  gap: 0px !important;
  position: relative;
  width: 100%;
  justify-content: center;
}

#iconExportFormat {
  position: absolute;
  left: 12px; /* ou ajuste fino, dependendo do padding do select */
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.6em;
  color: #B71C1C;
  pointer-events: none;
  z-index: 20;
}

#exportFormat {
  padding-left: 2.5em !important; /* Adiciona espaço para o ícone */
}

/* --- Pills -------------------------------------------------------- */
.pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  vertical-align: middle;
  min-width: 40px;
  text-align: center;
}

.pill-outline{
  background:#fff;
  border:1px solid #ccc;
  color:var(--text-color);
}
.pill-solid{
  background:#fff;
  border:1px solid #ccc;
  color:var(--text-color);
}

#exportCount.pill,
#exportHeaderCount.pill {
  background-color: #3b82f6;
  color: #ffffff;
  border: 1px solid #60a5fa;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  line-height: 1.2;
  min-width: 40px;
  text-align: center;
  display: inline-block;
  vertical-align: middle;
}



/* --- Footer do modal --------------------------------------------- */
.export-footer{
  flex-direction:column;      /* empilha itens */
  align-items:stretch;
  gap:0;
  background:#f8f9fa;        /* cinza claro Bootstrap */
}

.export-footer .btn {
  position: relative;
  font-weight: 500;
  padding-right: 38px; /* espaço para a badge */
  width: 300px;
}

.export-footer .btn .pill {
  position: absolute;
  top: 6px;
  right: 12px;
  font-size: 12px;
  padding: 2px 6px;
}

.export-footer .d-flex.flex-wrap {
  gap: 12px;
}

.export-footer .small.text-muted {
  margin-top: 6px;
  margin-bottom: 0;
  padding: 0;
  line-height: 1.3;
}

.export-buttons-wrapper {
  display: flex;
  justify-content: center;
  gap: 24px;           /* ⬅️ controla o espaçamento entre os botões */
  flex-wrap: wrap;     /* garante responsividade */
  margin-top: 6px;
}

.export-options-row {
  display: flex;
  gap: 18px;  /* ou o valor que mais te agradar */
  justify-content: center;
  align-items: flex-end;
  margin-bottom: 24px;
}

#exportModal .modal-dialog {
  margin-top: 90px !important;
}


.popup-fav-icon .export-icon {
  background: transparent !important;
  box-shadow: none !important;
}


.export-icon.has-export #exportCount {
  color: white;
}


#btnExportar i {
  margin-right: 6px;
}

#btnOpenExportList.has-export {
  background-color: var(--primary-color);
  color: white;
}

#btnOpenExportList.has-export:hover {
  background-color: #0056d4;
}

.toast-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  pointer-events: none;
}

.toast-message {
  background-color: var(--primary-color);
  color: white;
  padding: 10px 16px;
  margin-top: 10px;
  border-radius: 6px;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  animation: fadeOut 4s forwards;
}

@keyframes fadeOut {
  0% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translateY(20px); }
}
/* CSS de EJS */
.form-novo-usuario {
  padding-bottom: 20px;
  border-bottom: 1px solid #ddd;
  margin-bottom: 30px;
}
.form-novo-usuario input,
.form-novo-usuario select {
  flex: 1 1 320px;    /* aumenta largura mínima */
  max-width: 380px;   /* opcional: aumenta limite superior */
  font-size: 16px;    /* aumenta fonte se quiser */
}


/* força a largura do select na tabela */
table.usuarios-ativos select[name="role"] {
  width: 130px;
  min-width: 130px;
  font-size: 15px;
  padding: 6px 10px;  /* de 5px → 6px para subir o texto */
  height: 34px;       /* igual altura do botão */
  vertical-align: middle;
}
table.usuarios-ativos td {
  vertical-align: middle;
}
td:nth-child(4) {
  font-weight: 500;
  color: #1a237e; /* azul escuro discreto */
}

/* Proporções ajustadas */
.usuarios-ativos th:nth-child(1),
.usuarios-ativos td:nth-child(1) {
  width: 5%;
}

.usuarios-ativos th:nth-child(2),
.usuarios-ativos td:nth-child(2) {
  width: 50%;
}

.usuarios-ativos th:nth-child(3),
.usuarios-ativos td:nth-child(3) {
  width: 35%;
}

.usuarios-ativos th:nth-child(4),
.usuarios-ativos td:nth-child(4) {
  width: 10%;
}

.usuarios-ativos th:nth-child(5),
.usuarios-ativos td:nth-child(5) {
  width: 100%;
}
.usuarios-ativos td.acoes {
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  vertical-align: middle;
}

.btn-home-admin {
  background-color: var(--primary-color);
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.2s ease;
  display: inline-block;
}

.btn-home-admin:hover {
  background-color: var(--hover-color);
}

/* ===== Modal GeoPE – visual refinado ===== */
/* Estilos do Modal */
.modal-content {
  border-radius: var(--border-radius);
  border: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.modal-header {
  background-color: var(--primary-color);
  color: white;
  border-top-left-radius: var(--border-radius);
  border-top-right-radius: var(--border-radius);
  padding: 15px 20px;
}

.modal-title {
  font-weight: 600;
  display: flex;
  align-items: center;
}

.modal-title i {
  margin-right: 10px;
}

.modal-body {
  background-color: #ffffff;
  border-top: 1px solid #dee2e6;
  padding: 1.5rem 1.5rem 0 1.5rem;
}

.export-options-body {
  background-color: #ffffff;
  border-top: 1px solid #dee2e6;
  padding: 1.5rem 1.5rem 0 1.5rem;
  border-bottom: 1px solid #dee2e6;
}


.export-list-container {
  background-color: #fdfdfd;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  margin: 16px;
}

#exportTable {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  table-layout: fixed; /* força a tabela a preencher 100% */
}

.export-table-wrapper {
  max-height: 360px;         /* ou outro valor desejado */
  overflow-y: auto;
  overflow-x: hidden;
}

#exportTable thead th {
  background: #f1f3f5;
  font-size: 0.85rem;
  font-weight: 600;
  border-bottom: 2px solid #dee2e6;
  text-align: left; /* <-- garante alinhamento à esquerda por padrão */
}


#exportTable tbody td {
  font-size: 0.84rem;
  vertical-align: middle;
}

#exportTable thead th,
#exportTable tbody td {
  padding: 10px 22px; /* exatamente igual nos dois */
}

#exportTable th:nth-child(1),
#exportTable td:nth-child(1) {
  width: 12%;
  text-align: left;
  padding-left: 1.5rem; /* mesmo valor para ambos */
}

#exportTable th:nth-child(2),
#exportTable td:nth-child(2) {
  width: 20%;
  text-align: left;
}

#exportTable th:nth-child(3),
#exportTable td:nth-child(3) {
  width: 58%;
  word-break: break-word;
  text-align: left;
}

#exportTable th:nth-child(4),
#exportTable td:nth-child(4) {
  width: 10%;
  text-align: right;
  white-space: nowrap;
}



#exportTable tbody tr:hover {
  background: #f9fcff;
}

.export-checkbox-wrapper .form-check-input {
  position: static;
  margin-top: 0;
  margin-left: 0;
}




.step-container {
  margin-bottom: 20px;
  padding: 15px;
  border-radius: 8px;
  background-color: var(--accent-color);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  margin-right: 10px;
  font-weight: bold;
}

.step-title {
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}

.step-content {
  margin-left: 40px;
}

.step-content ul {
  padding-left: 20px;
}

.step-content li {
  margin-bottom: 8px;
}

.info-box {
  background-color: var(--accent-color);
  border-left: 4px solid var(--primary-color);
  padding: 15px;
  margin-top: 20px;
  border-radius: 5px;
}

.btn-close {
  color: white;
  opacity: 1;
}

.btn-close:hover {
  opacity: 0.8;
}

.modal-footer {
  border-top: none;
  padding: 15px 15px 15px;
}

.text-primary {
  color: var(--primary-color) !important;
}

.btn-primary {
  background-color: var(--primary-color);
  border: none;
  border: 1px solid transparent;
}

.btn-primary:hover {
  background-color: var(--hover-color);
}

.remover-fav {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 4px;
  margin: 0;
  color: #dc3545 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-size: 17px;
}

.remover-fav:hover {
  background: none !important;
  color: #c82333 !important;
}

.btn-remove-all {
  background: transparent;
  border: none;
  color: #999;
  font-size: 14px;
  padding: 4px 6px;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  transition: color 0.2s ease;
  height: 32px;
}

.btn-remove-all:hover {
  color: #c82333;
}

#btnClearExportList:hover {
  background-color: transparent !important;
  box-shadow: none !important;
}

.export-checkbox-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-right: 16px; /* mesmo valor do padding horizontal da tabela */
}

.usuario-inativo {
  background-color: #fff5f5;
}

.email-status-ok {
  color: green;
  font-weight: 500;
  font-size: 12px;
}

.email-status-erro {
  color: red;
  font-weight: 500;
  font-size: 12px;
}

.editar {
  background-color: orange;
  color: white;
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.editar:hover {
  background-color: darkorange;
}

td.nome {
  word-break: break-word;
  white-space: normal;
  overflow-wrap: anywhere;
}

.modal {
  z-index: 200;
}

.modal-backdrop {
  z-index: 190;
}

/* Modal de exportação padrão (pequeno) */
#exportOptionsModal .modal-dialog {
  max-width: 500px;
}

/* 🔥 Quando selecionar Personalizar, aumenta a largura */
#exportOptionsModal.grande .modal-dialog {
  max-width: 900px;
}

.group-center {
  display: flex;
  flex-direction: column;
  align-items: center; /* 🔥 Isso centraliza label + select */
  text-align: center; /* Centraliza o texto da label */
}

.group-center label {
  margin-bottom: 5px;
}

.group-center select {
  min-width: 200px; /* ✅ Define uma largura consistente para os selects */
}

.group-center {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.group-wrapper {
  display: flex;
  justify-content: center;
  gap: 30px; /* 🔥 Aqui controla o espaçamento */
}

.modal-header .close,
.modal-header .close span,
.modal-header .btn-close {
  color: #e53935 !important;   /* vermelho vibrante */
  opacity: 1 !important;
  text-shadow: none !important;
}

.modal-header .close:hover,
.modal-header .close:focus,
.modal-header .close span:hover,
.modal-header .close span:focus,
.modal-header .btn-close:hover {
  color: #ff1744 !important;   /* vermelho ainda mais vibrante no hover */
  opacity: 1 !important;
}

/* ===== Melhorias na seleção de campos do modal de exportação ===== */
.export-checkbox-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 2 colunas; troque para 3 se preferir */
  gap: 8px 18px;
  margin-bottom: 12px;
  max-height: 240px;
  overflow-y: auto;
  padding: 6px 2px 6px 2px;
}

.export-checkbox-group label {
  font-size: 14px;
  padding-left: 3px;
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 7px;
}

#exportOptionsModal .export-checkbox-tip {
  font-size: 12.5px;
  color: #4a4a4a;
  margin-top: 0px;
  margin-bottom: 8px !important;
  padding-left: 4px;
}

.export-checkbox-section-title {
  font-weight: 600;         /* negrito/intermediário, pode usar 700 para mais forte */
  font-size: 15px;
  margin-bottom: 6px;       /* aumenta o espaço entre título e o 1º checkbox */
  margin-top: 8px;
  letter-spacing: 0.2px;
}

.export-checkbox-section label {
  font-size: 14px;
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 3px;
  margin-left: 3px;
  cursor: pointer;
}
/* === Ícone adicionar/remover da lista (popup) =================== */
.export-popup-icon {
  --cor-fundo-normal: #0055d4;     /* azul-claro */
  --cor-fundo-ativo: #ffc107;      /* dourado */
  --cor-fundo-hover: #ff5252;      /* vermelho claro */

  background: var(--cor-fundo-normal);
  color: #fff;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

/* estado ativo: fundo dourado */
.export-popup-icon.ativo {
  background: var(--cor-fundo-ativo);
}

/* hover: fundo vermelho, mesmo se ativo ou não */
.export-popup-icon.ativo:hover {
  transform: scale(1.10);
  background: var(--cor-fundo-hover);
}
/* Apenas o botão normal (não ativo) */
.export-popup-icon:not(.ativo):hover {
  transform: scale(1.10);
  background: var(--cor-fundo-ativo);
}

.custom-svg-marker {
  background: none !important;
  border: none;
}

.svg-marker-wrapper {
  position: relative;
  width: 25px;
  height: 41px;
}

.svg-marker-shadow {
  position: absolute;
  top: 0;
  left: 0;
  width: 25px;
  height: 41px;
  z-index: 0;
}

.svg-marker-icon {
  position: absolute;
  top: 0;
  left: 0;
  width: 25px;
  height: 41px;
  z-index: 100;
}


/* Destaque visual extra para pin pesquisado */
.bounce-marker .svg-marker-wrapper {
  transform: scale(1.2);                             /* aumenta o tamanho */
  filter: brightness(1.3) saturate(2.0);            
  z-index: 90;
}

.svg-marker-wrapper.bounce .svg-marker-icon,
.bounce-marker .svg-marker-icon {
  animation: bounceTailwind 1s infinite;
  transform-origin: center bottom;
}

@keyframes bounceTailwind {
  0%, 100% {
    transform: translateY(-25%);
    animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
  }
  50% {
    transform: translateY(0);
    animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
  }
}

/* sombra – ajuste o seletor para o mesmo contêiner */
.bounce-marker .svg-marker-shadow {          /* <- trocado */
  animation: bounceTailwindShadow 1s infinite;
  transform-origin: center bottom;
  opacity: .2;
  transform: scale(1.2);
}

/* se quiser um efeito de “compressão” da sombra */
@keyframes bounceTailwindShadow {
  0%, 100% {
    transform: scale(0.85) translateY(0);
    opacity: 0.45;
    animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
  }
  50% {
    transform: scale(1) translateY(2px);
    opacity: 0.75;
    animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
  }
}

.leaflet-tooltip.pin-tooltip-destinacao {
  background: var(--primary-color);
  color: white;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  white-space: normal;
  max-width: 400px;
  min-width: 180px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25); /* sombra suave */
  pointer-events: none;
  text-align: center;
  line-height: 1.4;
}

.leaflet-interactive:focus {
  outline: none;
}

/* Marca d'água exclusiva do treinamento */
body.treino::before {
  content: "TREINAMENTO";
  position: fixed;
  top: 85%;                /* 15% acima da base */
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 6vw;
  color: rgba(48, 47, 46, 0.10); /* cinza translúcido */
  font-weight: bold;
  pointer-events: none;
  z-index: 10;
}
body.treino::before {
  z-index: 10; /* fica acima de tudo */
}

/* ALTERAR/garantir no :root */
:root{
  --topbar-height: 80px;   /* será atualizado via JS pela altura real */
  --chips-height: 0px;     /* será atualizado conforme os chips */
}

/* tablets e notebooks já ficam bem com 80px */

.chips-wrapper{
  display:flex; flex-wrap:wrap; gap:8px;
  padding:8px 12px;
  position: fixed; left:0; right:0;
  top: calc(var(--topbar-height, 80px));
  z-index: 95;
  background: none;
  justify-content: center;
  align-items: flex-start;
  align-content: flex-start;
  pointer-events: none;
  contain: content;
  contain-intrinsic-size: 40px;
}

/* ALTERAR: chip agora é só uma pílula, sem dropdown */
.chip{
  display:inline-flex; align-items:center; gap:8px;
  padding:6px 8px 6px 12px;
  border:1px solid #d6deeb;
  border-radius:999px;            /* pílula */
  background:#f7faff;
  pointer-events: auto;
  max-width: 95vw;
}

/* NOVO: o texto do chip */
.chip .chip-label{
  font-size:12px; color:#0b3a82;
  white-space:nowrap;             /* mantém em 1 linha */
}

/* ALTERAR: botão X agora “estático” dentro da pílula */
.chip .chip-remove{
  position:static;                /* antes era absolute */
  width:22px; height:22px; border-radius:50%;
  border:0; background:#e9effa; cursor:pointer; line-height:22px;
  font-size:14px; color:#09306a; flex:0 0 auto;
}
.chip .chip-remove:hover{ background:#dbe7ff; }

/* container interno que respeita “zonas seguras” laterais */
.chips-inner{
  display:flex; flex-wrap:wrap; gap:8px;
  justify-content:center; align-items:flex-start; align-content:flex-start;
  max-width: calc(100vw - var(--safe-left, 0px) - var(--safe-right, 0px));
  margin-left: var(--safe-left, 0px);
  margin-right: var(--safe-right, 0px);
  pointer-events:none;           /* cliques passam pro mapa fora dos chips */
}
.chips-inner .chip{ pointer-events:auto; }  /* chip continua clicável */

/* ícone pequeno e discreto */
.chip .chip-ico{
  font-size: 11.5px;
  opacity: .8;
  margin-right: 2px;
  line-height: 1.3;
}

/* título em negrito/cinza */
.chip .chip-title{
  font-weight: 600;
  color: #475569; /* slate-600 */
  margin-right: 4px;
  font-size: 13.5px;
  line-height: 1.3;
}

/* valor destacado */
.chip .chip-value{
  color: #0b3a82; /* teu azul principal */
  font-size: 12.5px;
  line-height: 1.3;
}

/* microcopy “e mais N” discreta */
.chip .chip-more{
  color: #64748b;   /* slate-500 */
  font-style: italic;
  margin-left: 4px;
  font-size: 12.5px;
  line-height: 1.3;
}

/* feedback de hover/focus e transições suaves */
.chip{
  transition: background .12s ease, border-color .12s ease, box-shadow .12s ease,
              opacity .14s ease, transform .14s ease;
}
.chip:hover,
.chip:focus-within{
  background: #eef5ff;
  border-color: #c9d8f3;
  box-shadow: 0 0 0 2px rgba(17, 88, 199, .08);
}

/* animação rápida ao remover (a  plicada via JS antes do reset) */
.chip.chip-out{
  opacity: 0;
  transform: scale(.98);
}

/* chip de anotação (ex.: Busca que só destaca) */
.chip-annotation{
  border-style: dashed;
  background: #f9fbff;
  opacity: .85;
}
.chip-annotation .chip-title{ color:#606a7a; }  /* mais neutro */
.chip-annotation .chip-ico{ opacity:.7; }
.chip-annotation .chip-more{ display:none; }   /* não faz sentido “e mais N” */

/* evita calcular/renderizar o que está fora da tela até abrir */
.filter-panel,
#suggestionsBox{
  content-visibility:auto;
  contain-intrinsic-size:400px 600px; /* reserva p/ não dar layout shift */
}

input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
  display: none;
  width: 0;
  height: 0;
}

/* Tentativas para WebKit (algumas builds do Chrome/Safari) */
input[type="password"]::-webkit-textfield-decoration-container,
input[type="password"]::-webkit-credentials-auto-fill-button {
  display: none;
}

/* LIMITE DO CSS DESKTOP */
 
 /* Responsividade para celular (em pé) */
 @media (max-width: 769px) {
  /* Barra Azul */
  .top-bar {
    padding: 0 10px;
    height: 70px;
  }

  .custom-logo-container img {
    height: 50px;
  }

  /* Container de filtros (Camada de busca + Filtros) */
  .top-filters-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    top: 70px;
    left: 50%;
    right: 0;

    width: 100%;
  }
  
  /* Search Wrapper: remove bordas/sombra extras no mobile */
  .search-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;           /* Corrigir '4x' para '4px' */
    padding: 0;
    background: none;
    box-shadow: none;
    border-radius: 0;
    width: 100%;
  }

  /* Label + Select (Camada de busca) lado a lado */
  .mode-selector {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    flex-shrink: 0;  /* Não encolher */
  }

  .mode-selector label {
    font-size: 13px;
    font-weight: 500;
    margin: 0;
    color: #4a4a4a;
  }
  .mode-selector select {
      height: 30px;
      font-size: 13px;
      padding: 4px;
      border-radius: 6px;
      min-width: 80px;
      max-width: 90px;
      flex-shrink: 0;
  }
  /* Campo de busca mais largo */
  .search-box {
    flex: 1; /* Garante que o input ocupe o restante do espaço */
  }

  .search-box input[type="text"] {
    height: 30px;            /* Mesma altura do select */
    font-size: 13px;
    padding: 4px;
    border-radius: 6px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Ajuste o mapa para "subir" */
  #map {
    top: 110px !important;  /* Se a barra+filtros tiver ~110px de altura */
    height: calc(100% - 110px);
  }

  /* Esconder extras no mobile */
  .multi-selector,
  .chart-container,
  #totalImoveisCard,
  .leaflet-control-zoom,
  .leaflet-control-home,
  .sidebar-filtros,
  .sidebar-overlay,
  .floating-export-icons,
  .btn-filtros {
    display: none !important;
  }

  /* Tamanhos dos botões flutuantes (camadas, etc.) */
  .camadas-toggle {
    width: 56px;
    height: 56px;
    font-size: 16px;
    border-radius: 10px;
  }

  .map-layer-btn {
    width: 50px;
    height: 50px;
    font-size: 16px;
  }

  .map-layer-btn .btn-label,
  .camadas-toggle .btn-label {
    font-size: 10px;
  }

  .popup-card {
    max-width: 92%;
    min-width: 280px;
    font-size: 13px;
    line-height: 1.4;
    word-break: break-word;
    overflow-x: hidden;
  }

  .popup-header {
    font-size: 15px;
    padding: 10px;
  }

  .popup-content {
    max-height: 60vh; /* se quiser limitar a altura */
    overflow-y: auto;  /* com scroll interno */
  }
}

/* Responsividade para celular (deitado) */
@media (orientation: landscape) and (max-width: 950px) and (max-height: 920px) {
  .top-bar {
    height: 64px;
    padding: 0 10px;
    display: flex;
    justify-content: center;   /* 👈 centraliza */
    align-items: center;
    gap: 12px;
    position: relative;
  }

  .custom-logo-container {
    position: absolute;
    left: 10px;
    display: flex;
    align-items: center;
  }

  .custom-logo-container img {
    height: 50px;
    max-width: 110px;
  }

  .top-filters-container {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    background: transparent;
    box-shadow: none;
    padding-left: 130px; /* ✅ Dá espaço pra logo */
    padding-right: 30px;
    max-width: 100%;
  }

  .search-wrapper {
    flex: 1;
    display: flex;
    gap: 6px;
    padding: 8px 8px;
  }

  .mode-selector select,
  .search-box input[type="text"] {
    height: 28px;
    font-size: 13px;
    padding: 4px;
  }

  .search-box {
    flex: 1;
  }

  .search-box input[type="text"] {
    width: 100%;
  }

  #map {
    top: 64px !important;
    height: calc(100% - 64px);
  }

  .leaflet-control-zoom,
  .leaflet-control-home,
  .leaflet-control-attribution {
    display: none !important;
  }

  .camadas-wrapper {
    right: 15px;      /* mais encostado à borda direita */
    bottom: 15px;    /* opcional: sobe um pouco */
  }

  .camadas-toggle {
    width: 64px;
    height: 64px;
    font-size: 14px;
  }

  .map-layer-btn {
    width: 48px;
    height: 48px;
    font-size: 14px;
  }

  .multi-selector {
    display: none !important;
  }

  .total-imoveis-card {
    position: absolute;
    top: 70px;
    right: 15px;
    background-color: #ffffff;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #ddd;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 60;
    text-align: center;
    width: 140px;
  }
  .total-imoveis-numero {
    font-size: 28px;
    font-weight: bold;
    color: var(--primary-color);
    display: block;
  }
  .total-imoveis-texto {
    font-size: 13px;
    color: #666;
    display: block;
  }

  .popup-card {
    max-width: 92%;
    min-width: 250px;
    font-size: 13px;
    line-height: 1.4;
    word-break: break-word;
    overflow-x: hidden;
  }

  .popup-header {
    font-size: 15px;
    padding: 10px;
  }

  .popup-content {
    max-height: 60vh; /* se quiser limitar a altura */
    overflow-y: auto;  /* com scroll interno */
  }
  
}


@media (min-width: 769px) and (max-width: 1024px) and (orientation: portrait) {
  .top-bar {
    height: 80px;
    padding: 0 10px;
    display: flex;
    justify-content: center;   /* 👈 centraliza */
    align-items: center;
    gap: 12px;
    position: relative;
  }
  .popup-content {
      line-height: 1.6;
      padding: 8px 12px 14px 16px;
      min-height: 45vh;
      max-height: 70vh;
      overflow-y: auto;
  }
  .custom-logo-container {
    position: absolute;
    left: 10px;
    display: flex;
    align-items: center;
  }

  .custom-logo-container img {
    height: 50px;
    max-width: 110px;
  }

  .top-filters-container {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    background: transparent;
    box-shadow: none;
    padding-left: 130px; /* ✅ Dá espaço pra logo */
    padding-right: 30px;
    max-width: 100%;
  }

  .search-wrapper {
    max-width: 500px;
    flex: 1 1 auto;
    margin-inline: auto;
  }

  .search-box {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
  }

  .search-box input {
    padding-left: 28px !important;
    padding-right: 28px !important;
    height: 34px;
    font-size: 13px;
    width: 100%;
    border-radius: 6px;
    border: 1px solid #ccc;
    box-sizing: border-box;
  }

  .search-icon {
    position: absolute;
    left: 10px;
    font-size: 14px;
    color: #888;
    pointer-events: none;
  }

  #clearSearchBtn {
    position: absolute;
    right: 10px;
    font-size: 14px;
    color: #888;
    cursor: pointer;
    display: none;
  }

  .mode-selector label,
  .mode-selector select {
    font-size: 13px;
  }

  #map {
    top: 64px !important;
    height: calc(100% - 64px);
  }

  .leaflet-control-zoom,
  .leaflet-control-home,
  .leaflet-control-attribution,
  .btn-voltar-home {
    display: none !important;
  }

  .camadas-wrapper {
    right: 15px;      /* mais encostado à borda direita */
    bottom: 15px;    /* opcional: sobe um pouco */
  }

  .camadas-toggle {
    width: 64px;
    height: 64px;
    font-size: 14px;
  }

  .map-layer-btn {
    width: 48px;
    height: 48px;
    font-size: 14px;
  }

  .multi-selector {
    display: none !important;
  }

  .total-imoveis-card {
    position: absolute;
    top: 70px;
    right: 15px;
    background-color: #ffffff;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #ddd;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 60;
    text-align: center;
    width: 140px;
  }
  .total-imoveis-numero {
    font-size: 28px;
    font-weight: bold;
    color: var(--primary-color);
    display: block;
  }
  .total-imoveis-texto {
    font-size: 13px;
    color: #666;
    display: block;
  }

  .texto-topbar {
    font-size: 14px !important; 
    white-space: normal;
    word-break: break-word;
    max-width: 150px;     /* limite opcional para forçar quebra */
    line-height: 1.3;
    display: block;        /* garante que ocupa linha própria */
  }
}
/* Oculta o botão "Limpar Filtros" em telas menores que 1025px */
@media (max-width: 1024px) {
 #btnFiltrosAvancados,
 #btnLimparFiltros {
   display: none;
 }

 .multi-selector,
 .chart-container,
 .leaflet-control-zoom,
 .leaflet-bar.easy-button-container.leaflet-control,
 .sidebar-filtros,
 .sidebar-overlay,
 #adminBtnContainer,
 .btn-filtros,
 #destinoChartContainer {
   display: none !important;
 } 
}



@media (min-width: 1025px) and (max-width: 1440px) {
  .top-filters-container {
    display: flex;
    align-items: center;
    justify-content: center;  /* ← centraliza todo o grupo */
    gap: 10px;
    flex-wrap: nowrap;
    padding: 0 20px 0 90px;
    max-width: 800px;
    margin: 0 auto;            /* ← centraliza o container como um bloco */
  }
  .popup-content {
      line-height: 1.5;
      padding: 8px 12px 14px 16px;

      max-height: 65vh;
      overflow-y: auto;
  }
  #btnLimparFiltros,
  #btnFiltrosAvancados,
  #adminBtnContainer button {
    height: 36px;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background-color: white;
    color: #000;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    flex-shrink: 0;
  }

  .search-wrapper {
    max-width: 360px;
    flex: 1 1 auto;
    margin-inline: auto;
  }

  .search-box {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
  }

  .search-box input {
    padding-left: 32px !important;
    padding-right: 28px !important;
    height: 34px;
    font-size: 13px;
    width: 100%;
    border-radius: 6px;
    border: 1px solid #ccc;
    box-sizing: border-box;
  }

  .search-icon {
    position: absolute;
    left: 10px;
    font-size: 14px;
    color: #888;
    pointer-events: none;
  }

  #clearSearchBtn {
    position: absolute;
    right: 10px;
    font-size: 14px;
    color: #888;
    cursor: pointer;
    display: none;
  }

  .mode-selector label,
  .mode-selector select {
    font-size: 13px;
  }
  .popup-content {
      line-height: 1.6;
      padding: 8px 12px 14px 16px;
      min-height: 45vh;
      max-height: 70vh;
      overflow-y: auto;
  }
  .texto-topbar {
    font-size: 15px !important; 
    white-space: normal;
    word-break: break-word;
    max-width: 150px;     /* limite opcional para forçar quebra */
    line-height: 1.3;
    display: block;        /* garante que ocupa linha própria */
  }
}

@media (min-width: 1441px) and (max-height: 940px) {
  .texto-topbar {
    font-size: 15px !important; 
    white-space: normal;
    word-break: break-word;
    max-width: 201px;
    line-height: 1.3;
    display: block;
  }
  .popup-content {
    line-height: 1.5;
    padding: 8px 12px 14px 16px;
    min-height: 45vh;
    max-height: 70vh;
    overflow-y: auto;
  }
}




@media (min-width: 1000px) and (max-height: 750px) {
  #exportModal .modal-dialog {
    margin-top: 16vh !important;
  }
}

@media (max-width: 480px) {
  .popup-card {
    min-width: 95vw !important;
    max-width: 95vw !important;
    border-radius: 12px !important;
    border: 2px solid var(--primary-color) !important;
    overflow-x: auto;
    margin: 5px auto;
  }

  .leaflet-popup-content {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }

  .leaflet-popup-content-wrapper {
    border-radius: 12px !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(0,71,187,.2) !important;
  }

  .popup-content {
    padding: 12px !important;
  }

  .popup-header {
    border-radius: 10px 10px 0 0 !important;
  }

}


