/* =========================================================
   form.css — Seção de Contato, Formulário adaptativo,
              Upload de arquivos, Mensagem de sucesso,
              Cards de informação
   ========================================================= */

.contato-section {
  padding-block: var(--section-v);
  border-top: 1px solid var(--gray-border);
}
@media (min-width: 1024px) { .contato-section { padding-block: var(--section-v-lg); } }

/* ---------------------------------------------------------
   GRID 2 COLUNAS (form + info)
   --------------------------------------------------------- */
.contato-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}
@media (min-width: 960px) {
  .contato-grid {
    grid-template-columns: 1fr 320px;
    gap: 56px;
    align-items: start;
  }
}

/* ---------------------------------------------------------
   WRAPPER DO FORMULÁRIO
   --------------------------------------------------------- */
.form-wrapper {
  background: var(--gray-dark);
  border: 1px solid var(--gray-border);
  border-radius: 2px;
  padding: 22px 24px;
}

/* ---------------------------------------------------------
   TOGGLE DE TIPO (Projeto / Parceria)
   Fica no topo do formulário — condiciona os campos abaixo
   --------------------------------------------------------- */
.form-type-label {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: block;
}

.form-type-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 28px;
}
@media (max-width: 400px) {
  .form-type-selector { grid-template-columns: 1fr; }
}

/* Card de seleção de tipo */
.type-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  background: var(--black);
  border: 1px solid var(--gray-border);
  border-radius: 2px;
  padding: 18px;
  cursor: pointer;
  text-align: left;
  transition: border-color var(--ease), background var(--ease);
  position: relative;
}

.type-card-icon { font-size: 22px; }

.type-card-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13px;
  color: var(--white);
}

.type-card-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Estado ativo */
.type-card.is-active {
  border-color: var(--red);
  background: var(--red-dim);
}
.type-card.is-active .type-card-title { color: var(--red); }

/* Indicador de selecionado (checkmark) */
.type-card.is-active::after {
  content: '✓';
  position: absolute;
  top: 10px; right: 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--red);
}

/* ---------------------------------------------------------
   SEPARADOR VISUAL ENTRE TIPO E CAMPOS
   --------------------------------------------------------- */
.form-divider {
  border: none;
  border-top: 1px solid var(--gray-border);
  margin-block: 24px;
}

/* ---------------------------------------------------------
   GRUPOS DE CAMPOS
   --------------------------------------------------------- */
/* Linha dupla — dois campos lado a lado em desktop */
.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
@media (min-width: 640px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
  }
}

.field-group { margin-bottom: 20px; }

.field-label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.field-required { color: var(--red); margin-left: 2px; }
.field-optional { color: var(--text-faint); font-weight: 400; text-transform: none; letter-spacing: 0; }

/* Input base */
.field-input {
  display: block;
  width: 100%;
  background: var(--black);
  border: 1px solid var(--gray-border);
  border-radius: 2px;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--white);
  transition: border-color var(--ease), box-shadow var(--ease);
  appearance: none;
  -webkit-appearance: none;
}
.field-input::placeholder { color: var(--text-faint); }
.field-input:focus {
  outline: none;
  border-color: rgba(254,0,0,0.5);
  box-shadow: 0 0 0 2px var(--red-dim);
}
.field-input.is-error { border-color: var(--red); }

/* Textarea */
.field-textarea { resize: vertical; min-height: 120px; line-height: 1.6; }

/* Select */
.select-wrapper { position: relative; }
.field-select { cursor: pointer; padding-right: 36px; }
.select-arrow {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 12px;
  pointer-events: none;
}
.field-select option { background: var(--gray-dark); color: var(--white); }

/* Mensagem de erro */
.field-error {
  display: block;
  font-size: 11px;
  color: var(--red);
  margin-top: 5px;
  min-height: 15px;
}

/* Campos adaptáveis por tipo — ocultos/visíveis via JS */
.fields-conditional {
  transition: opacity 0.25s ease;
}
.fields-conditional.is-hidden {
  display: none;
}

/* ---------------------------------------------------------
   CAMPO HONEYPOT (anti-spam, invisível para humanos)
   --------------------------------------------------------- */
.field-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden; opacity: 0;
  pointer-events: none;
}

/* ---------------------------------------------------------
   UPLOAD DE ARQUIVOS
   --------------------------------------------------------- */
.upload-area {
  position: relative;
  background: var(--black);
  border: 1px dashed var(--gray-border);
  border-radius: 2px;
  cursor: pointer;
  transition: border-color var(--ease), background var(--ease);
}
.upload-area:hover,
.upload-area.is-dragover {
  border-color: rgba(254,0,0,0.4);
  background: var(--red-dim);
}

.upload-input {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.upload-content {
  padding: 20px 22px;
  text-align: center;
  pointer-events: none;
}
.upload-icon { font-size: 24px; color: var(--text-muted); margin-bottom: 8px; }
.upload-text { font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }
.upload-link { color: var(--red); text-decoration: underline; text-underline-offset: 2px; }
.upload-formats { font-size: 11px; color: var(--text-faint); }

.upload-files-list {
  list-style: none;
  padding: 0 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative; z-index: 3;
}
.upload-file-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--gray-dark);
  border: 1px solid var(--gray-border);
  border-radius: 2px;
  padding: 7px 12px;
}
.upload-file-item::before { content: '📎'; font-size: 12px; }

/* ---------------------------------------------------------
   BOTÃO SUBMIT
   --------------------------------------------------------- */
.btn-submit {
  width: 100%;
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: 2px;
  padding: 16px 24px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--ease), opacity var(--ease);
  margin-top: 8px;
}
.btn-submit:hover { background: #cc0000; }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }

/* Estados de loading */
.btn-text-loading { display: none; }
.btn-submit.is-loading .btn-text-default { display: none; }
.btn-submit.is-loading .btn-text-loading { display: inline; }

/* ---------------------------------------------------------
   MENSAGEM DE SUCESSO
   --------------------------------------------------------- */
.form-success {
  text-align: center;
  padding: 52px 32px;
}
.success-icon {
  width: 60px; height: 60px;
  background: var(--red);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin: 0 auto 24px;
}
.success-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 22px;
  margin-bottom: 12px;
}
.success-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 28px;
  max-width: 360px;
  margin-inline: auto;
}
.success-desc strong { color: var(--white); }

/* ---------------------------------------------------------
   INFORMAÇÕES DE CONTATO (coluna direita)
   --------------------------------------------------------- */
.contato-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.info-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--gray-dark);
  border: 1px solid var(--gray-border);
  padding: 18px 20px;
  transition: background var(--ease);
}
.info-card:hover { background: #1f1f1f; }

.info-card-icon { font-size: 18px; flex-shrink: 0; margin-top: 2px; }

.info-card-body { flex: 1; }

.info-card-label {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 5px;
}
.info-card-value {
  font-size: 13px;
  color: var(--white);
  line-height: 1.5;
}
.info-card-value a { color: var(--white); transition: color var(--ease); }
.info-card-value a:hover { color: var(--red); }

/* Mapa placeholder */
.map-placeholder {
  background: var(--gray-dark);
  border: 1px solid var(--gray-border);
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.map-placeholder-inner {
  text-align: center;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.map-placeholder-icon { font-size: 26px; }
.map-placeholder-text { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.map-link {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--red);
  margin-top: 4px;
}
.map-link:hover { opacity: 0.75; }

/* ---------------------------------------------------------
   WIZARD DE TIPO — cabeçalho de etapa
   --------------------------------------------------------- */
.form-step-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.form-step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--red);
  color: var(--white);
  border-radius: 50%;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 10px;
  flex-shrink: 0;
}

.form-step-label {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Quando campos comuns estão visíveis, tipo-label herda estilo de step */
.form-type-label {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Erro no label de tipo */
.form-type-label.is-error-label { color: var(--red); }

/* =========================================================
   MODAL DE CONFIRMAÇÃO DE PRODUTO
   ========================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: #111111;
  border: 1px solid var(--gray-border);
  border-top: 2px solid var(--red);
  border-radius: 4px;
  padding: 36px 32px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  transform: translateY(12px);
  transition: transform 0.2s ease;
}

.modal-overlay.is-open .modal-box {
  transform: translateY(0);
}

.modal-icon {
  font-size: 28px;
  margin-bottom: 14px;
}

.modal-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
  color: var(--white);
  margin-bottom: 10px;
}

.modal-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 24px;
}
.modal-desc strong { color: var(--white); }

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
