/**
 * AtlasVoto — estilos complementares.
 *
 * Contém apenas o que não é expressável por utilitários do Tailwind: ajustes
 * de bibliotecas de terceiros (Leaflet), animações do fundo do login e
 * comportamentos de impressão. Carregado depois do CSS compilado.
 */

/* ------------------------------------------------------------------ Leaflet */
.leaflet-container {
  background: rgb(var(--av-surface-sunken));
  font-family: inherit;
  outline: none;
}

.leaflet-tooltip {
  background: rgb(var(--av-surface-raised));
  border: 1px solid rgb(var(--av-line));
  border-radius: 0.5rem;
  color: rgb(var(--av-ink));
  box-shadow: 0 18px 48px -20px rgb(0 0 0 / 0.55);
  font-size: 0.75rem;
  padding: 0.5rem 0.75rem;
  white-space: nowrap;
}

.leaflet-tooltip::before {
  border-top-color: rgb(var(--av-line));
}

.leaflet-control-zoom a {
  background: rgb(var(--av-surface-raised));
  border-color: rgb(var(--av-line));
  color: rgb(var(--av-ink-muted));
}

.leaflet-control-zoom a:hover {
  background: rgb(var(--av-surface-sunken));
  color: rgb(var(--av-ink));
}

.leaflet-control-attribution {
  background: transparent;
  color: rgb(var(--av-ink-faint));
  font-size: 0.625rem;
}

/* -------------------------------------------------- fundo animado do login */
.av-constelacao {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.av-ponto {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 9999px;
  background: rgb(var(--av-accent));
  box-shadow: 0 0 12px 2px rgb(var(--av-accent) / 0.6);
}

.av-ponto::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 9999px;
  border: 1px solid rgb(var(--av-accent) / 0.5);
  animation: av-pulso 3.2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

.av-ponto:nth-child(3n)::after {
  animation-delay: 0.8s;
}

.av-ponto:nth-child(3n + 1)::after {
  animation-delay: 1.6s;
}

@keyframes av-pulso {
  0% {
    transform: scale(0.6);
    opacity: 0.8;
  }
  100% {
    transform: scale(3.4);
    opacity: 0;
  }
}

.av-linha-conexao {
  position: absolute;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgb(var(--av-primary) / 0.55),
    transparent
  );
  transform-origin: left center;
}

@media (prefers-reduced-motion: reduce) {
  .av-ponto::after {
    animation: none;
    opacity: 0.25;
  }
}

/* ------------------------------------------------------------- impressão */
@media print {
  .av-no-print,
  header,
  footer,
  aside,
  nav,
  #toasts {
    display: none !important;
  }

  body {
    background: #fff !important;
    color: #000 !important;
  }

  .av-card,
  .av-table-wrap {
    border-color: #ccc !important;
    box-shadow: none !important;
    break-inside: avoid;
  }

  a[href]::after {
    content: ' (' attr(href) ')';
    font-size: 0.7em;
    color: #555;
  }
}
