/* 🌊 assets/css/faces_validator.css */

/* 🔥 ESTILO ESSENCIAL DE LINHAS E GEOMETRIAS DE FACES (LOGRADOUROS) */
.forcar-visibilidade-remota .forcar-linha-persistente,
.forcar-visibilidade-remota .leaflet-interactive {
  stroke-width: 3px !important;
  stroke-opacity: 0.95 !important;
  fill-opacity: 0.1 !important;
  vector-effect: non-scaling-stroke !important;
  filter: drop-shadow(0px 0px 2px rgba(0, 0, 0, 0.4)) !important;
}

/* 📐 GARANTE QUE A SIDEBAR EMPURRE O RODAPÉ PARA A BASE */
#sidebar {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  box-sizing: border-box !important;
  overflow-y: auto !important; /* Permite rolagem se a tela for pequena */
}

/* 🎨 INTERFACE COMPACTA DO PAINEL LATERAL */
.panel-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  margin-bottom: 6px;
  padding: 6px 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.section-subtitle {
  font-size: 0.62rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 2px;
}

/* DESTAQUE 1: Nome CNEFE da Face / Via */
.cnefe-highlight-box {
  border-left: 4px solid #2563eb; /* Azul para padrão de vias/faces */
  background: #f8fafc;
}
.cnefe-main-title {
  font-size: 1.25rem;
  color: #1e293b;
  font-weight: 900;
  line-height: 1.1;
  margin: 1px 0 3px 0;
  word-break: break-word;
}

/* DESTAQUE 2: Ferramentas de Edição Remota (JOSM / iD) */
.editor-btn-row {
  display: flex;
  gap: 6px;
  margin-bottom: 4px;
}
.editor-btn-row:last-child {
  margin-bottom: 0;
}

/* 🌟 EFEITO PINGO DE LUZ NOS BOTÕES JOSM E iD */
.glow-container-btn {
  position: relative;
  flex: 1;
  border-radius: 4px;
  padding: 3px;
  background: #cbd5e1;
  overflow: hidden;
  display: flex;
}
.glow-container-btn::before {
  content: '';
  position: absolute;
  top: -100%; left: -100%; width: 300%; height: 300%;
  background: conic-gradient(transparent, transparent, #2563eb, transparent, transparent);
  animation: rotateGlow 3s linear infinite;
  z-index: 1;
}

.btn-editor-action {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 3px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  background: #ffffff;
  transition: background 0.2s;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}
.btn-editor-action:hover {
  background: #f1f5f9;
}

/* Botões Discretos de Apoio (Copiar Nome / Overpass) */
.btn-discreta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.78rem;
  cursor: pointer;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  font-weight: 500;
  flex: 1;
  transition: all 0.2s;
}
.btn-discreta:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #334155;
}

/* DESTAQUE 3: Caixa de Validação Direta de Faces */
.final-validation-box {
  border: 1px solid #cbd5e1;
  background: #eff6ff; /* Fundo azul claro suave */
  border-radius: 6px;
  padding: 10px;
  margin-top: 2px;
}
.final-question-label {
  font-size: 0.85rem;
  color: #1e3a8a;
  font-weight: 800;
  line-height: 1.3;
  display: block;
  margin-bottom: 4px;
}

/* 🌟 EFEITO PINGO DE LUZ NA CAIXA DE TEXTO DO NOME DA FACE */
.glow-container-input {
  position: relative;
  border-radius: 5px;
  padding: 4px;
  background: #cbd5e1;
  overflow: hidden;
  margin-bottom: 4px;
  display: flex;
}
.glow-container-input::before {
  content: '';
  position: absolute;
  top: -100%; left: -100%; width: 300%; height: 300%;
  background: conic-gradient(transparent, transparent, #2563eb, transparent, transparent);
  animation: rotateGlow 4s linear infinite;
  z-index: 1;
}
#final-osm-name {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 6px;
  box-sizing: border-box;
  font-size: 0.88rem;
  font-weight: bold;
  border: 1px solid #ffffff;
  border-radius: 4px;
  background: #ffffff;
  margin: 0 !important;
  outline: none;
}

/* 🌟 EFEITO PINGO DE LUZ NO BOTÃO SALVAR REVISÃO */
.glow-container-save {
  position: relative;
  flex: 2;
  border-radius: 4px;
  padding: 3px;
  background: #cbd5e1;
  overflow: hidden;
  display: flex;
}
.glow-container-save::before {
  content: '';
  position: absolute;
  top: -100%; left: -100%; width: 300%; height: 300%;
  background: conic-gradient(transparent, transparent, #16a34a, transparent, transparent);
  animation: rotateGlow 3s linear infinite;
  z-index: 1;
}

/* 🌊 EFEITO ONDA (PULSAR) PARA PERGUNTAS DE VALIDAÇÃO */
.pergunta-onda {
  position: relative;
  font-size: 0.9rem; 
  color: #1e3a8a; 
  font-weight: 900; 
  display: inline-block;
  line-height: 1.2; 
  margin-bottom: 4px;
  padding: 2px 6px;
  border-radius: 4px;
}
.pergunta-onda::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 4px;
  box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.5);
  animation: efeitoOnda 2s cubic-bezier(0.25, 0, 0, 1) infinite;
  pointer-events: none;
}

/* ANIMAÇÕES GLOBAIS */
@keyframes efeitoOnda {
  0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.6); }
  100% { box-shadow: 0 0 0 12px rgba(37, 99, 235, 0); }
}

@keyframes rotateGlow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Modais Nativos de Estatística / Histórico */
.custom-modal {
  display: none;
  position: fixed;
  z-index: 20000;
  left: 0; top: 0; width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.5);
}
.custom-modal-content {
  background-color: #fff;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #cbd5e1;
  width: 85%;
  max-width: 440px;
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Balão de Tooltip Dinâmico */
.js-custom-tooltip {
  position: absolute;
  transform: translateX(-50%);
  background-color: #1e293b;
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 9999999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease-out;
}
.js-custom-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: #1e293b transparent transparent transparent;
}

/* Estilização para as Sugestões Inline */
#suggestions-list {
  font-size: 0.75rem;
  margin: 6px 0 10px 0;
  color: #64748b;
  word-break: break-word;
}

.suggestion-link {
  cursor: pointer;
  font-weight: 500;
  display: inline-block;
}

.suggestion-link.current-link {
  color: #2563eb !important; /* Azul para harmonia com Logradouros/Faces */
  background: #dbeafe;
  padding: 1px 4px;
  border-radius: 3px;
  text-decoration: none !important;
}

/* Animação contínua e moderada */
@keyframes pulsarManual {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4);
  }
  70% {
    transform: scale(1.04);
    box-shadow: 0 0 0 6px rgba(37, 99, 235, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }
}

.botao-manual-pulsar {
  animation: pulsarManual 2s infinite ease-in-out;
  transition: all 0.2s ease;
}

.botao-manual-pulsar:hover {
  animation-play-state: paused;
  background-color: #dbeafe !important;
  transform: scale(1.04);
}

/* --- ESTILOS DE UI E MODAIS (FACES) --- */

.top-banner-title {
    position: fixed;
    top: 0;
    left: 20px;
    height: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 10000;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    pointer-events: none;
}

.top-banner-subtitle {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #90cdf4;
    text-transform: uppercase;
    margin-bottom: -3px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.top-banner-h1 {
    margin: 0;
    font-size: 1.65rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    color: #ffffff;
    text-transform: uppercase;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.btn-ui-primary {
    width: 100%;
    padding: 10px 14px;
    background: #2563eb;
    color: #ffffff;
    border: 1px solid #1d4ed8;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.btn-ui-primary:hover {
    background: #1d4ed8;
    border-color: #1e40af;
}

.btn-ui-secondary {
    padding: 9px 12px;
    background: #ffffff;
    color: #334155;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s ease;
}
.btn-ui-secondary:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
}

/* Modais de instrução */
.instruction-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(2px);
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.instruction-modal {
    background: #ffffff;
    border-radius: 8px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #e2e8f0;
    animation: modalFadeIn 0.15s ease-out;
}
@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}
.instruction-modal-header {
    padding: 14px 18px;
    background: #f8fafc;
    color: #0f172a;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.instruction-modal-body {
    padding: 18px;
    font-size: 0.85rem;
    color: #334155;
    line-height: 1.6;
}
.instruction-modal-footer {
    padding: 12px 18px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* 📌 RODAPÉ DA SIDEBAR FIXADO NA BASE */
.sidebar-footer-info {
    margin-top: auto !important; /* Força o alinhamento no rodapé */
    padding: 12px 0 6px 0;
    font-size: 0.72rem;
    color: #94a3b8;
    line-height: 1.4;
    border-top: 1px solid #e2e8f0;
}
.sidebar-footer-info a {
    color: #64748b;
    text-decoration: underline;
}
.sidebar-footer-info a:hover {
    color: #334155;
}

/* Painel MVT - Servidor de Tiles */
.mvt-panel-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #334155;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    justify-content: center;
    transition: all 0.2s ease;
}
.mvt-panel-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}
.mvt-info-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 12px;
}
.mvt-status-pill {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}
.mvt-status-ok { background: #dcfce7; color: #166534; }
.mvt-status-warn { background: #fef3c7; color: #92400e; }
.mvt-status-alert { background: #fee2e2; color: #991b1b; }
.mvt-url-input {
    width: 100%;
    padding: 8px;
    font-family: monospace;
    font-size: 0.75rem;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    color: #334155;
    margin-top: 4px;
}
