/* ═══════════════════════════════════════════════════
   Circuito Astro Engine  v3.1.0
   Paleta:  verde-musgo · laranja · dourado · branco · azul-marinho
   ═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;1,400&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --c-green:       #2C5F4F;
  --c-green-dark:  #1B3A34;
  --c-green-light: #E8F0EC;
  --c-orange:      #D4782A;
  --c-orange-soft: #FFF4EB;
  --c-gold:        #C9A961;
  --c-gold-soft:   #F9F5EC;
  --c-navy:        #0B1F3A;
  --c-white:       #FFFFFF;
  --c-bg:          #FAFBFA;
  --c-text:        #34495E;
  --c-text-light:  #6B7B8D;
  --c-border:      #E2E2E2;
  --c-border-soft: #EEE;
  --radius:        8px;
  --radius-sm:     6px;
  --shadow-sm:     0 2px 8px rgba(0,0,0,.05);
  --shadow-md:     0 4px 20px rgba(0,0,0,.08);
}

/* ── Container ────────────────────────────────────── */
.cqae-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 32px 28px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  color: var(--c-text);
  line-height: 1.6;
}

/* ── Headings ─────────────────────────────────────── */
.cqae-wrap h2 {
  font-family: 'Lora', Georgia, serif;
  font-weight: 500;
  font-size: 20px;
  color: var(--c-green-dark);
  margin: 0 0 6px;
  letter-spacing: .3px;
}
.cqae-wrap h3 {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 13px;
  color: var(--c-green);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin: 28px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--c-border-soft);
}
.cqae-wrap h3 .cqae-counter {
  float: right;
  font-size: 12px;
  font-weight: 400;
  color: var(--c-text-light);
  letter-spacing: 0;
  text-transform: none;
}
.cqae-counter--full {
  color: var(--c-green) !important;
  font-weight: 500 !important;
}

/* ── Form grid ────────────────────────────────────── */
.cqae-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 4px;
}
@media (max-width: 600px) { .cqae-grid { grid-template-columns: 1fr; } }

.cqae-grid label {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  font-weight: 500;
  color: var(--c-text-light);
  letter-spacing: .3px;
  gap: 5px;
}

.cqae-grid input[type="text"],
.cqae-grid input[type="email"],
.cqae-grid input[type="date"],
.cqae-grid input[type="time"] {
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--c-text);
  background: var(--c-white);
  transition: border-color .2s, box-shadow .2s;
}
.cqae-grid input:focus {
  outline: none;
  border-color: var(--c-green);
  box-shadow: 0 0 0 3px rgba(44,95,79,.1);
}

/* visual feedback when city is selected from autocomplete */
.cqae-input--selected {
  border-color: var(--c-green) !important;
  background: var(--c-green-light) !important;
}

/* ── Choice cards (opções empilhadas, uma abaixo da outra) ── */
.cqae-choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 8px;
}

.cqae-choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-left: 3px solid var(--c-border);
  border-radius: 2px var(--radius-sm) var(--radius-sm) 2px;
  cursor: pointer;
  transition: all .2s ease;
  position: relative;
  font-size: 13px;
  line-height: 1.5;
}
.cqae-choice:hover {
  border-left-color: var(--c-green);
  background: var(--c-green-light);
}
.cqae-choice--selected {
  border-left-color: var(--c-orange) !important;
  background: var(--c-orange-soft) !important;
  border-color: var(--c-orange) !important;
}

/* Order badge para intenções */
.cqae-choice[data-order]::before {
  content: attr(data-order);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--c-orange);
  color: var(--c-white);
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}

.cqae-choice input[type="checkbox"],
.cqae-choice input[type="radio"] {
  margin-top: 2px;
  accent-color: var(--c-green);
  flex-shrink: 0;
}

/* Hide default checkbox when order badge shows */
.cqae-choice[data-order] input[type="checkbox"] {
  display: none;
}

.cqae-choice strong {
  font-weight: 500;
  color: var(--c-green-dark);
}
.cqae-choice span {
  font-size: 12px;
  color: var(--c-text-light);
  line-height: 1.4;
}

/* ── Submit button ────────────────────────────────── */
.cqae-btn {
  display: block;
  width: 100%;
  margin-top: 24px;
  padding: 14px 20px;
  background: var(--c-green-dark);
  color: var(--c-white);
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .5px;
  cursor: pointer;
  transition: background .2s, transform .15s;
}
.cqae-btn:hover {
  background: var(--c-green);
  transform: translateY(-1px);
}
.cqae-btn:active {
  transform: translateY(0);
}
.cqae-btn:disabled {
  opacity: .7;
  cursor: wait;
}

/* ── Result area ──────────────────────────────────── */
.cqae-result {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-white);
}
.cqae-result:empty {
  display: none;
}

.cqae-success {
  color: var(--c-green);
  font-weight: 500;
}
.cqae-error {
  color: #c0392b;
  font-weight: 500;
}

/* ── Loading spinner ──────────────────────────────── */
.cqae-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}
.cqae-spinner {
  width: 22px;
  height: 22px;
  border: 3px solid var(--c-border);
  border-top-color: var(--c-green);
  border-radius: 50%;
  animation: cqae-spin .7s linear infinite;
  flex-shrink: 0;
}
@keyframes cqae-spin {
  to { transform: rotate(360deg); }
}
.cqae-loading span {
  font-size: 13px;
  color: var(--c-text-light);
  font-style: italic;
}

/* ── Autocomplete dropdown ────────────────────────── */
.cqae-autocomplete {
  position: relative;
  width: 100%;
}
.cqae-suggestions {
  display: none;
  position: absolute;
  z-index: 9999;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 4px;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  max-height: 260px;
  overflow-y: auto;
}
.cqae-suggestion {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--c-text);
  cursor: pointer;
  border-bottom: 1px solid var(--c-border-soft);
  transition: background .15s;
}
.cqae-suggestion:last-child { border-bottom: none; }
.cqae-suggestion:hover {
  background: var(--c-green-light);
  color: var(--c-green-dark);
}
.cqae-suggestion--empty {
  color: var(--c-text-light);
  font-style: italic;
  cursor: default;
}
.cqae-suggestion--empty:hover {
  background: transparent;
}

/* ── LGPD consent ─────────────────────────────────── */
.cqae-lgpd {
  margin: 20px 0 4px;
  padding: 14px 16px;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
}
.cqae-lgpd label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 11px;
  color: var(--c-text-light);
  line-height: 1.55;
  cursor: pointer;
  font-weight: 400;
}
.cqae-lgpd input[type="checkbox"] {
  margin-top: 2px;
  min-width: 16px;
  min-height: 16px;
  accent-color: var(--c-green);
}
.cqae-lgpd a {
  color: var(--c-green-dark);
  text-decoration: underline;
}

/* ── Responsive refinements ───────────────────────── */
@media (max-width: 600px) {
  .cqae-wrap {
    padding: 20px 16px;
  }
  .cqae-wrap h2 {
    font-size: 18px;
  }
  .cqae-choice {
    padding: 10px 12px;
    font-size: 13px;
  }
}
