/* ============================================================
   SGCOR — Componentes
   ============================================================ */

/* ---------- Botões ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 48px;
  padding: 0.95rem 2rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: var(--fs-body);
  text-decoration: none;
  text-align: center;
  transition: background-color var(--dur-hover) ease,
    transform var(--dur-hover) ease;
  will-change: transform;
}

.btn--primary {
  position: relative;
  background: var(--green);
  color: var(--white);
}

.btn--primary:hover {
  background: var(--green-d);
  transform: translateY(-2px);
}

.btn--primary:focus-visible {
  outline: 3px solid rgba(62, 141, 227, 0.45);
  outline-offset: 3px;
}

/* Halo sutil pulsando entre green-glow e blue-glow */
.btn--halo::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: inherit;
  z-index: -1;
  box-shadow: 0 0 28px 4px var(--green-glow);
  opacity: 0.7;
  animation: btn-halo 3.2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes btn-halo {
  0%,
  100% {
    box-shadow: 0 0 28px 4px var(--green-glow);
  }
  50% {
    box-shadow: 0 0 32px 6px var(--blue-glow);
  }
}

.btn--secondary {
  background: transparent;
  color: var(--blue);
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
}

.btn--secondary:hover {
  border-color: var(--blue);
  transform: translateY(-2px);
}

.btn--lg {
  padding: 1.1rem 2.5rem;
  font-size: var(--fs-body-lg);
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.btn .btn__spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn.is-loading .btn__spinner {
  display: inline-block;
}

.btn.is-loading {
  pointer-events: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Selos e pills ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-pill);
  font-size: var(--fs-small);
  font-weight: 600;
  flex-wrap: wrap;
  justify-content: center;
}

.badge--amber {
  color: var(--amber);
  background: rgba(245, 166, 35, 0.10);
  border: 1px solid rgba(245, 166, 35, 0.35);
}

.microcopy {
  font-size: var(--fs-small);
  color: var(--muted);
}

.section--dark .microcopy {
  color: rgba(245, 248, 252, 0.62);
}

/* ---------- Cards genéricos ---------- */

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: clamp(1.5rem, 3vw, 2rem);
  box-shadow: var(--shadow-sm);
}

.card--navy {
  background: var(--navy-2);
  border: 1px solid rgba(62, 141, 227, 0.18);
  color: var(--paper);
  box-shadow: none;
}

.card--navy h3 {
  color: var(--white);
}

/* ---------- Ícones ---------- */

.icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.icon--blue {
  color: var(--blue);
}

.icon--green {
  color: var(--green);
}

.icon--muted {
  color: var(--muted);
}

.icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(62, 141, 227, 0.12);
  color: var(--blue);
  margin-bottom: 1rem;
}

/* ---------- Chips (fallback mobile das tags físicas) ---------- */

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  background: rgba(62, 141, 227, 0.12);
  border: 1px solid rgba(62, 141, 227, 0.28);
  color: var(--paper);
  font-size: var(--fs-small);
  font-weight: 500;
  white-space: nowrap;
}

/* ---------- FAQ (acordeão) ---------- */

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-card-sm);
  background: var(--white);
  overflow: hidden;
}

.faq-item + .faq-item {
  margin-top: 0.75rem;
}

.faq-item__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  min-height: 48px;
  padding: 1.1rem 1.4rem;
  text-align: left;
  font-weight: 600;
  font-size: var(--fs-body-lg);
  color: var(--ink);
}

.faq-item__icon {
  flex-shrink: 0;
  color: var(--blue);
  transition: transform 0.35s ease-out;
}

.faq-item.is-open .faq-item__icon {
  transform: rotate(180deg);
}

.faq-item__panel {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.35s ease-out, opacity 0.35s ease-out;
}

.faq-item.is-open .faq-item__panel {
  grid-template-rows: 1fr;
  opacity: 1;
}

.faq-item__content {
  overflow: hidden;
}

.faq-item__content p {
  padding: 0 1.4rem 1.25rem;
  color: var(--muted);
}

/* ---------- Formulário ---------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field label {
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--paper);
}

.field input,
.field select {
  min-height: 48px;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-btn);
  border: 1px solid rgba(220, 229, 240, 0.25);
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  transition: border-color 0.2s ease;
}

.field select option {
  color: var(--ink);
  background: var(--white);
}

.field input::placeholder {
  color: rgba(245, 248, 252, 0.45);
}

.field input:focus-visible,
.field select:focus-visible {
  outline: 3px solid rgba(62, 141, 227, 0.45);
  outline-offset: 1px;
  border-color: var(--blue);
}

.field.has-error input,
.field.has-error select {
  border-color: var(--amber);
}

.field__error {
  display: none;
  font-size: var(--fs-small);
  color: var(--amber);
}

.field.has-error .field__error {
  display: block;
}

.field--checkbox {
  flex-direction: row;
  align-items: flex-start;
  gap: 0.75rem;
}

.field--checkbox input {
  min-height: 0;
  width: 20px;
  height: 20px;
  margin-top: 3px;
  accent-color: var(--green);
  flex-shrink: 0;
}

.field--checkbox label {
  font-weight: 400;
  font-size: var(--fs-small);
  color: rgba(245, 248, 252, 0.78);
}

.form-status {
  border-radius: var(--radius-btn);
  padding: 1rem 1.25rem;
  font-weight: 500;
  display: none;
}

.form-status.is-success {
  display: block;
  background: rgba(31, 164, 91, 0.14);
  border: 1px solid rgba(31, 164, 91, 0.45);
  color: #7BE0AC;
}

.form-status.is-error {
  display: block;
  background: rgba(245, 166, 35, 0.12);
  border: 1px solid rgba(245, 166, 35, 0.4);
  color: var(--amber);
}

/* Honeypot: fora do fluxo visual, ainda focável por bots */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Conteúdo pendente (apenas dev) ---------- */

.pending-card {
  border: 2px dashed rgba(245, 166, 35, 0.5);
  border-radius: var(--radius-card);
  padding: 2rem;
  text-align: center;
  color: var(--amber);
  font-weight: 600;
  letter-spacing: 0.08em;
}

[data-pending][hidden] {
  display: none !important;
}
