/* ==========================================================================
   RotasSul Transfer — cotador (Fase 5)

   Folha compartilhada pelo componente de cotação usado em:
     /                                        (home)
     /destinos/caxias-do-sul/
     /destinos/bento-goncalves/
     /transfer/aeroporto-caxias-do-sul-gramado/
     /transfer/porto-alegre-bento-goncalves/
     /eventos/natal-luz-gramado/

   O componente vive em três contextos de CSS diferentes (template da home,
   rotas-destinos.css e natal-luz.css). Por isso:

   - todo seletor usa duas classes (.qf-form .qf-input), vencendo por
     especificidade as regras globais de `input[type=text]`, `label` e
     `button` do template da home sem recorrer a !important;
   - font-family é sempre `inherit`, de modo que o componente assuma a
     tipografia nativa de cada página;
   - as cores vêm dos tokens :root já declarados inline nas seis páginas,
     sempre com fallback literal.

   Não altera nenhum estilo das fases anteriores.
   ========================================================================== */

/* ---------- seção ---------- */
.qf-section {
  background: linear-gradient(180deg, #f7f9fc 0%, #ffffff 100%);
  padding: 76px 0;
  position: relative;
}

.qf-section *,
.qf-section *::before,
.qf-section *::after { box-sizing: border-box; }

.qf-shell {
  margin: 0 auto;
  max-width: 1180px;
  padding: 0 24px;
  width: 100%;
}

.qf-section .qf-head {
  margin: 0 auto 32px;
  max-width: 720px;
  text-align: center;
}

.qf-section .qf-eyebrow {
  align-items: center;
  color: #1f5f91;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  gap: 8px;
  letter-spacing: .02em;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.qf-section .qf-eyebrow::before {
  background: var(--color-10, #f4c84b);
  border-radius: 50%;
  content: "";
  height: 7px;
  width: 7px;
}

.qf-section .qf-title {
  color: var(--color-2, #102536);
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 900;
  letter-spacing: -.03em;
  line-height: 1.12;
  margin: 0 0 12px;
  padding: 0;
  text-transform: none;
}

.qf-section .qf-sub {
  color: #102536b8;
  font-size: 17px;
  line-height: 1.55;
  margin: 0;
}

/* ---------- cartão ---------- */
.qf-section .qf-card {
  background: var(--color-1, #fff);
  border: 1px solid #10253614;
  border-radius: 24px;
  box-shadow: var(--shadow-md, 0 8px 28px #1025361a);
  margin: 0 auto;
  max-width: 880px;
  padding: 32px;
}

/* ---------- grade ---------- */
.qf-form .qf-grid {
  display: grid;
  gap: 18px 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.qf-form .qf-field { min-width: 0; }
.qf-form .qf-field--full { grid-column: 1 / -1; }

/* ---------- rótulos ---------- */
.qf-form .qf-label {
  color: var(--color-2, #102536);
  display: block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.3;
  margin: 0 0 7px;
  padding: 0;
}

.qf-form .qf-opt {
  color: #102536a8;
  font-size: 12px;
  font-weight: 600;
}

/* ---------- campos ---------- */
.qf-form .qf-input,
.qf-form .qf-textarea {
  -webkit-appearance: none;
  appearance: none;
  background: var(--color-1, #fff);
  border: 1px solid #1025362e;
  border-radius: 14px;
  box-shadow: 0 1px 2px #10253608;
  color: var(--color-2, #102536);
  display: block;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.35;
  margin: 0;
  min-height: 52px;
  padding: 14px 16px;
  transition: border-color .18s ease, box-shadow .18s ease;
  width: 100%;
}

.qf-form .qf-textarea {
  min-height: 84px;
  resize: vertical;
}

/* A home tem um ::placeholder global em caixa alta e na cor branca; aqui o
   placeholder precisa ser legível e em caixa normal nas seis páginas. */
.qf-form .qf-input::placeholder,
.qf-form .qf-textarea::placeholder {
  color: #102536a3;
  font-family: inherit;
  font-size: 16px;
  opacity: 1;
  text-transform: none;
}

.qf-form .qf-input:hover,
.qf-form .qf-textarea:hover { border-color: #10253647; }

.qf-form .qf-input:focus,
.qf-form .qf-textarea:focus {
  border-color: var(--color-9, #2f7bb6);
  box-shadow: 0 0 0 3px #2f7bb629;
  outline: none;
}

/* O outline global de foco do site é preservado para navegação por teclado. */
.qf-form .qf-input:focus-visible,
.qf-form .qf-textarea:focus-visible {
  outline: 2px solid var(--color-9, #2f7bb6);
  outline-offset: 2px;
}

/* Safari/iOS achata date e time; normaliza a altura e o alinhamento. */
.qf-form input.qf-input[type="date"],
.qf-form input.qf-input[type="time"] {
  -webkit-appearance: none;
  appearance: none;
  min-height: 52px;
}

.qf-form .qf-input[type="date"]::-webkit-date-and-time-value { text-align: left; }
.qf-form .qf-input[type="date"]::-webkit-calendar-picker-indicator,
.qf-form .qf-input[type="time"]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .55; }

/* ---------- ajuda e erro ---------- */
.qf-form .qf-help {
  color: #102536b8;
  font-size: 13px;
  line-height: 1.4;
  margin: 6px 0 0;
}

.qf-form .qf-error {
  align-items: flex-start;
  color: var(--color-8, #b65a3a);
  display: flex;
  font-size: 13px;
  font-weight: 600;
  gap: 6px;
  line-height: 1.4;
  margin: 6px 0 0;
}

.qf-form .qf-error::before { content: "!"; font-weight: 900; }
.qf-form .qf-error[hidden] { display: none; }

.qf-form .qf-input[aria-invalid="true"],
.qf-form .qf-textarea[aria-invalid="true"] {
  background: #d874570a;
  border-color: var(--color-5, #d87457);
}

.qf-form .qf-input[aria-invalid="true"]:focus,
.qf-form .qf-textarea[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px #d8745733; }

/* ---------- rodapé do formulário ---------- */
.qf-form .qf-foot {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  justify-content: space-between;
  margin: 24px 0 0;
}

.qf-form .qf-note {
  color: #102536b8;
  flex: 1 1 260px;
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
}

.qf-form .qf-status {
  color: var(--color-8, #b65a3a);
  flex: 1 1 100%;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
  order: -1;
}

.qf-form .qf-status:empty { display: none; }

/* ---------- botão ---------- */
.qf-form .qf-submit {
  -webkit-appearance: none;
  appearance: none;
  align-items: center;
  background: linear-gradient(135deg, #f7d86c 0%, #efbf44 100%);
  border: 0;
  border-radius: 100px;
  box-shadow: 0 8px 28px #f4c84b5c, 0 2px 6px #f4c84b2e, inset 0 1px #fff6;
  color: var(--color-2, #102536);
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font-family: inherit;
  font-size: 15px;
  font-weight: 900;
  gap: 10px;
  justify-content: center;
  letter-spacing: -.025em;
  line-height: 1.2;
  min-height: 54px;
  padding: 16px 28px;
  text-align: center;
  text-transform: none;
  transition: transform .22s var(--ease-out, ease), box-shadow .22s var(--ease-out, ease), background .22s var(--ease-out, ease);
}

.qf-form .qf-submit:hover {
  background: linear-gradient(135deg, #f8de80 0%, #f1c34d 100%);
  box-shadow: 0 14px 36px #f4c84b7a, 0 3px 8px #f4c84b38;
  transform: translateY(-2px);
}

.qf-form .qf-submit svg {
  flex-shrink: 0;
  height: 18px;
  width: 18px;
}

/* Âncora real usada para abrir o WhatsApp: mantém o link nativo (e o binder
   de conversão existente) sem aparecer na interface nem no foco. */
.qf-form .qf-hidden-link {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

/* ---------- variante de destaque (páginas de rota) ---------- */
.qf-section--featured { background: linear-gradient(180deg, #f4f7fb 0%, #ffffff 100%); }

.qf-section--featured .qf-card {
  border-color: #f4c84b6b;
  box-shadow: var(--shadow-lg, 0 18px 52px #10253624);
}

/* ---------- responsivo ---------- */
@media (max-width: 991px) {
  .qf-section { padding: 60px 0; }
  .qf-section .qf-card { padding: 26px; }
}

@media (max-width: 767px) {
  .qf-shell { padding: 0 20px; }
  .qf-section .qf-sub { font-size: 16px; }
}

@media (max-width: 640px) {
  .qf-section { padding: 52px 0; }
  .qf-section .qf-head { margin-bottom: 24px; text-align: left; }
  .qf-section .qf-card { border-radius: 20px; padding: 22px 18px; }
  .qf-form .qf-grid { gap: 16px; grid-template-columns: minmax(0, 1fr); }
  .qf-form .qf-foot { gap: 16px; }
  .qf-form .qf-submit { width: 100%; }
  .qf-form .qf-note { flex: 1 1 100%; }
}

@media (max-width: 380px) {
  .qf-section .qf-card { padding: 20px 16px; }
  .qf-form .qf-submit { font-size: 14.5px; padding: 16px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .qf-form .qf-submit,
  .qf-form .qf-input,
  .qf-form .qf-textarea { transition: none; }
  .qf-form .qf-submit:hover { transform: none; }
}
