/* 
   NICHOLAS 26/03/2026
   Componente Padrão de Popup de Coordenadas (UI Factory) 
   FIX: Resolução de conflitos de largura e espaçamento (Nifty/Leaflet)
*/

/* 1. SELETOR DE ALTA ESPECIFICIDADE PARA O WRAPPER DO LEAFLET */
.leaflet-popup-content-wrapper {
  border-radius: 8px !important;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.4) !important;
  padding: 0 !important; /* Retiramos o padding do Leaflet para controlar no nosso container */
  overflow: hidden !important;
}

.leaflet-popup-content {
  margin: 0 !important; /* Zera margens do Leaflet */
  width: 240px !important; /* FORÇA LARGURA FIXA PARA EVITAR COLAPSO */
}

/* 2. NOSSO CONTAINER CUSTOMIZADO */
.inmap-custom-popup {
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 15px !important; /* Controle total do respiro interno */
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
  background: #fff !important;
}

/* 3. HEADER STYLES */
.inmap-coord-popup-header {
  border-bottom: 2px solid #337ab7 !important;
  padding-bottom: 8px !important;
  margin-bottom: 12px !important;
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
}

.inmap-coord-popup-header i {
  color: #337ab7 !important;
  margin-right: 10px !important;
  font-size: 16px !important;
  min-width: 16px !important; /* Garante espaço para o ícone */
}

.inmap-coord-popup-header b {
  color: #333 !important;
  font-size: 14px !important;
  white-space: nowrap !important;
}

/* 4. BODY STYLES */
.inmap-coord-popup-body {
  font-size: 13px !important;
  color: #555 !important;
  line-height: 1.6 !important;
  margin-bottom: 15px !important;
  width: 100% !important;
}

.inmap-coord-popup-body b {
  color: #000 !important;
}

/* 5. FOOTER & BUTTON STYLES */
.inmap-coord-popup-footer {
  text-align: center !important;
  width: 100% !important;
}

.inmap-coord-popup-btn {
  display: block !important;
  width: 100% !important; /* Ocupa todo o container de 240px menos o padding de 15px */
  height: 32px !important; /* Altura fixa para evitar compressão */
  line-height: 20px !important;
  border-radius: 4px !important;
  font-weight: 600 !important;
  padding: 6px 12px !important;
  text-transform: none !important;
  font-size: 12px !important;
}

/* Ajuste para o botão do Leaflet (Botão de Fechar) */
.leaflet-container a.leaflet-popup-close-button {
  top: 5px !important;
  right: 5px !important;
  padding: 4px !important;
  color: #000 !important;
}

.leaflet-container a.leaflet-popup-close-button:hover {
  color: #000 !important;
}
