/* GAN Tecnologia — Linha Qilog
   Só o que utilitário do Tailwind não expressa. Os tokens de cor, raio,
   tipografia e sombra ficam no tailwind.config, dentro do index.html. */

html {
  scroll-behavior: smooth;
}

/* O header é fixo: a âncora precisa parar abaixo dele. */
section[id] {
  scroll-margin-top: 88px;
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Anel de foco único em toda a página, conforme o design system. */
:focus-visible {
  outline: 2px solid #0338c0;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Acordeão nativo: esconde o marcador padrão e troca o sinal de mais por menos. */
summary {
  list-style: none;
  cursor: pointer;
}
summary::-webkit-details-marker {
  display: none;
}
.toggle {
  position: relative;
  flex: none;
  width: 14px;
  height: 14px;
  color: #5a6f93;
}
.toggle::before,
.toggle::after {
  content: '';
  position: absolute;
  inset: 50% 0 auto 0;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transform: translateY(-50%);
}
.toggle::after {
  inset: 0 50% 0 auto;
  width: 2px;
  height: auto;
  transform: translateX(50%);
  transition: opacity 150ms ease;
}
details[open] .toggle::after {
  opacity: 0;
}

/* Rádio de porte da frota: o controle nativo some e o rótulo vira o alvo. */
.fleet-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.fleet-option input:checked + span {
  border-color: #0338c0;
  background: #eaf1ff;
  color: #0338c0;
}
.fleet-option input:focus-visible + span {
  outline: 2px solid #0338c0;
  outline-offset: 2px;
}

/* Campo em erro: a borda e a mensagem aparecem juntas. */
.field-error input {
  border-color: #c42b1c;
}
.field-error .error-text {
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .toggle::after {
    transition: none;
  }
}
