/* ===========================================================================
   ElectoMaps — aviso de cookies

   Carregado em todas as páginas, inclusive nas do visualizador e do simulador,
   que usam style.css em vez de portal.css. Por isso as cores saem de uma
   cadeia de fallback: pega o token do portal, senão o do aplicativo, senão um
   valor literal. Assim a faixa acompanha o tema de qualquer página sem que
   nenhum dos dois CSS precise saber que ela existe.
   =========================================================================== */

.em-consent {
  --cc-bg: var(--paper-2, var(--card, #ffffff));
  --cc-fg: var(--ink, var(--text, #111827));
  --cc-fg2: var(--ink-2, var(--text-sec, #374151));
  --cc-line: var(--line, var(--border-color, #e5e7eb));
  --cc-brand: var(--brand, var(--accent-2, #b32f45));
  --cc-font: var(--sans, var(--font-main, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif));

  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100000;
  background: var(--cc-bg);
  border-top: 1px solid var(--cc-line);
  box-shadow: 0 -1px 0 var(--cc-line);
  font-family: var(--cc-font);
  font-size: 14px;
  line-height: 1.55;
  color: var(--cc-fg2);
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.em-consent.is-open { transform: none; }

.em-consent-in {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px clamp(18px, 5vw, 48px);
  display: flex;
  align-items: center;
  gap: clamp(18px, 4vw, 44px);
}

@media (max-width: 760px) {
  .em-consent-in { flex-direction: column; align-items: stretch; gap: 16px; }
}

.em-consent-text { flex: 1; min-width: 0; }

.em-consent-title {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cc-fg);
}

.em-consent-text p { margin: 0; max-width: 78ch; }

.em-consent-text a {
  color: var(--cc-brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* As duas escolhas têm o mesmo tamanho e o mesmo destaque: recusar não pode
   ser mais difícil do que aceitar. */
.em-consent-actions {
  display: flex;
  gap: 10px;
  flex: none;
}

@media (max-width: 760px) {
  .em-consent-actions > button { flex: 1; }
}

.em-consent-actions button {
  appearance: none;
  min-width: 132px;
  height: 42px;
  padding: 0 20px;
  border: 1px solid var(--cc-brand);
  border-radius: 2px;
  background: transparent;
  color: var(--cc-brand);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}

.em-consent-actions button:hover { opacity: 0.82; }

.em-consent-actions button[data-consent="granted"] {
  background: var(--cc-brand);
  color: #ffffff;
}

.em-consent-actions button:focus-visible {
  outline: 2px solid var(--cc-brand);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .em-consent { transition: none; }
}
