/* ==========================================================================
   Grupo 3corações — Central de Atendimento
   CSS próprio (sem Tailwind/Bootstrap). Só o necessário para este form.
   Paleta original da marca: creme #fbf5eb, marrom #502b0e,
   texto #30271e, destaque dourado #ebcf9d.
   ========================================================================== */

:root {
  --cream: #fbf5eb;
  --ink: #30271e;
  --ink-70: rgba(48, 39, 30, 0.7);
  --ink-50: rgba(48, 39, 30, 0.5);
  --white: #ffffff;
  --coffee-600: #663f18;
  --coffee-700: #502b0e;
  --coffee-800: #3a1f0a;
  --sand: #ebcf9d;
  --sand-soft: #fdf8ef;
  --line: #dcd6c9;
  --line-hover: #c9a260;
  --danger: #dc3545;

  --radius-sm: 0.75rem;
  --radius-md: 0.9rem;
  --radius-lg: 1.25rem;
  --radius-xl: 1.75rem;

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ---------- Reset básico ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
}

a {
  color: inherit;
}

.hidden {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* ---------- Aviso sem JS ---------- */

.noscript-banner {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background-color: var(--sand);
  color: var(--ink);
  padding: 0.75rem 1rem;
  text-align: center;
  font-size: 0.875rem;
}

/* ---------- Layout geral ---------- */

.page {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
}

@media (min-width: 640px) {
  .page {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
}

.card {
  width: 100%;
  max-width: 56rem;
  background-color: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: 0 8px 40px -8px rgba(80, 43, 14, 0.18);
  outline: 1px solid rgba(0, 0, 0, 0.05);
  outline-offset: -1px;
  padding: 1.5rem;
}

@media (min-width: 640px) {
  .card {
    padding: 2.5rem;
  }
}

@media (min-width: 1024px) {
  .card {
    padding: 3.5rem;
  }
}

/* ---------- Cabeçalho ---------- */

.form-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.form-header__logo {
  height: 3.5rem;
  margin: 0 auto 1.5rem;
}

@media (min-width: 640px) {
  .form-header__logo {
    height: 4rem;
  }
}

.form-header__title {
  font-family: var(--font-sans);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--coffee-700);
  font-size: 1.5rem;
  line-height: 1.35;
  margin: 0;
}

.form-header__title i {
  font-style: normal;
  white-space: nowrap;
}

@media (min-width: 640px) {
  .form-header__title {
    font-size: 1.75rem;
  }
}

.form-header__title-icon {
  width: 1.25rem;
  height: 1.25rem;
  display: inline-block;
  vertical-align: middle;
  margin-left: 0.4rem;
}

.form-header__lead {
  margin: 0.75rem 0 0;
  font-size: 1rem;
  color: var(--ink-70);
}

.form-header__note {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--ink-50);
}

/* ---------- Seções do formulário ---------- */

.form-section {
  margin-bottom: 2.5rem;
}

.form-section--last {
  margin-bottom: 0;
}

.form-section__title {
  font-family: var(--font-sans);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--coffee-700);
  font-size: 1.25rem;
  margin: 0 0 1.25rem;
}

.form-section__hint {
  font-size: 0.875rem;
  color: var(--ink-70);
  margin: 0 0 0.75rem;
}

.form-note {
  font-size: 0.75rem;
  color: var(--ink-50);
  margin: 0 0 1.25rem;
}

/* ---------- Grade de campos ---------- */

.field-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .field-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .field-grid--12 {
    grid-template-columns: repeat(12, 1fr);
  }
}

.field-grid--12 {
  margin-top: 1.5rem;
}

.field-grid--12:empty {
  margin-top: 0;
}

.field {
  grid-column: 1 / -1;
}

@media (min-width: 640px) {
  .field--span-2  { grid-column: span 2; }
  .field--span-3  { grid-column: span 3; }
  .field--span-4  { grid-column: span 4; }
  .field--span-6  { grid-column: span 6; }
  .field--span-8  { grid-column: span 8; }
  .field--span-12 { grid-column: span 12; }
}

.field__label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

/* ---------- Inputs de texto/email/tel/select ---------- */

.ca3c-input {
  display: block;
  width: 100%;
  padding: 0.65rem 0.9rem;
  font-size: 0.95rem;
  line-height: 1.4;
  font-family: inherit;
  color: var(--ink);
  background-color: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ca3c-input::placeholder {
  color: #a89f8f;
}

.ca3c-input:hover {
  border-color: var(--line-hover);
}

.ca3c-input:focus {
  outline: none;
  border-color: var(--sand);
  box-shadow: 0 0 0 4px rgba(235, 207, 157, 0.45);
}

.ca3c-input.touched:invalid {
  border-color: var(--danger);
}

.ca3c-input.touched:invalid:focus {
  box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.15);
}

select.ca3c-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23502b0e' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 14px 10px;
  padding-right: 2.5rem;
}

/* ---------- Radio "cards" (Sua solicitação) ---------- */

.radio-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.ca3c-radio-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.ca3c-radio-card:hover {
  border-color: var(--line-hover);
  background-color: var(--cream);
}

.ca3c-radio-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.ca3c-radio-dot {
  flex: 0 0 auto;
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.1rem;
  border-radius: 9999px;
  border: 1.5px solid #c1c2bf;
  position: relative;
  transition: border-color 0.15s ease;
}

.ca3c-radio-dot::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 9999px;
  background-color: var(--coffee-700);
  transform: scale(0);
  transition: transform 0.15s ease;
}

.ca3c-radio-input:checked ~ .ca3c-radio-dot {
  border-color: var(--coffee-700);
}

.ca3c-radio-input:checked ~ .ca3c-radio-dot::after {
  transform: scale(1);
}

.ca3c-radio-input:focus-visible ~ .ca3c-radio-dot {
  box-shadow: 0 0 0 4px rgba(235, 207, 157, 0.55);
}

.ca3c-radio-card:has(.ca3c-radio-input:checked) {
  border-color: var(--sand);
  background-color: var(--sand-soft);
}

.ca3c-radio-text {
  font-size: 0.875rem;
  color: var(--ink);
}

/* ---------- Consentimento (checkbox + texto) ---------- */

.consent {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
  cursor: pointer;
}

.consent__text {
  font-size: 0.875rem;
  color: var(--ink);
}

.consent__link {
  color: var(--coffee-600);
  text-decoration: underline;
  text-decoration-color: var(--sand);
  text-underline-offset: 2px;
}

.consent__link:hover {
  color: var(--coffee-700);
}

.ca3c-checkbox {
  appearance: none;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.15rem;
  flex: 0 0 auto;
  border: 1.5px solid #c1c2bf;
  border-radius: 0.35rem;
  position: relative;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.ca3c-checkbox:hover {
  border-color: var(--line-hover);
}

.ca3c-checkbox:checked {
  background-color: var(--coffee-700);
  border-color: var(--coffee-700);
}

.ca3c-checkbox:checked::after {
  content: "";
  position: absolute;
  left: 3px;
  top: -1px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.ca3c-checkbox:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(235, 207, 157, 0.55);
}

/* ---------- reCAPTCHA / envio ---------- */

.recaptcha-wrap {
  margin-bottom: 2rem;
}

.submit-wrap {
  text-align: center;
}

.ca3c-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--white);
  background-color: var(--coffee-700);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: 0.85rem;
  border-radius: 9999px;
  padding: 0.85rem 3rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
  box-shadow: 0 6px 18px -6px rgba(80, 43, 14, 0.55);
}

.ca3c-submit:hover {
  background-color: var(--coffee-600);
}

.ca3c-submit:active {
  transform: translateY(1px);
}

.ca3c-submit:disabled {
  opacity: 0.6;
  cursor: progress;
}

body.ca3c-loading {
  cursor: progress;
}

/* ---------- Tooltip (imagem de exemplo) ---------- */

.ca3c-tt-wrap {
  position: relative;
  display: inline-flex;
}

.ca3c-tt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 9999px;
  background-color: var(--coffee-700);
  color: #fff;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  line-height: 16px;
  cursor: help;
  user-select: none;
  margin-left: 4px;
  vertical-align: middle;
}

.ca3c-tt-popover {
  position: absolute;
  z-index: 30;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.25);
  padding: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
}

.ca3c-tt-popover img {
  max-width: 220px;
  max-height: 150px;
  border-radius: 0.5rem;
}

.ca3c-tt-wrap.is-open .ca3c-tt-popover,
.ca3c-tt-wrap:hover .ca3c-tt-popover,
.ca3c-tt-wrap:focus-within .ca3c-tt-popover {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* ---------- Aviso de cookies (LGPD) ---------- */

.cookie-banner {
  position: fixed;
  z-index: 50;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  max-width: 42rem;
  margin: 0 auto;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
  outline: 1px solid rgba(0, 0, 0, 0.05);
  outline-offset: -1px;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 30px -6px rgba(0, 0, 0, 0.25);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

@media (min-width: 640px) {
  .cookie-banner {
    left: auto;
    right: 1.5rem;
    bottom: 1.5rem;
    flex-direction: row;
    padding: 1.25rem;
  }
}

.cookie-banner__text {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--ink-70);
}

.cookie-banner__link {
  text-decoration: underline;
  color: var(--coffee-600);
}

.cookie-banner__link:hover {
  color: var(--coffee-700);
}

.cookie-banner__close {
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--white);
  background-color: var(--coffee-700);
  border: none;
  border-radius: 9999px;
  padding: 0.65rem 1.25rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.cookie-banner__close:hover {
  background-color: var(--coffee-800);
}

/* ==========================================================================
   Widget de upload de foto (dentro da opção "info")
   ========================================================================== */

.marca-field {
  margin-bottom: 1.5rem;
}

/* ---------- Dropzone ---------- */

.dropzone {
  position: relative;
  border: 1.5px dashed var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem 1.25rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.dropzone:hover {
  border-color: var(--line-hover);
  background-color: var(--cream);
}

.dropzone.is-dragover {
  border-color: var(--sand);
  background-color: var(--sand-soft);
}

.dropzone__input {
  /* [hidden] já esconde de verdade (display:none) — o clique na área
     visível é encaminhado pra ele via JS (fileInput.click()). Ficar
     de fato escondido, em vez de só invisível por cima da área, evita
     que o navegador trate um drop de arquivo como se fosse solto
     direto no input — que duplicaria o arquivo (change do input +
     drop do nosso JS, os dois de uma vez). */
}

.dropzone__icon {
  color: var(--coffee-700);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dropzone__title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}

.dropzone__hint {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  color: var(--ink-50);
}

/* ---------- Lista de arquivos selecionados ---------- */

.file-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background-color: var(--white);
}

.file-item__thumb {
  width: 40px;
  height: 40px;
  border-radius: 0.5rem;
  object-fit: cover;
  flex: 0 0 auto;
  background-color: var(--cream);
}

.file-item__thumb--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--coffee-700);
  text-transform: uppercase;
}

.file-item__info {
  min-width: 0;
  flex: 1 1 auto;
}

.file-item__name {
  font-size: 0.85rem;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-item__meta {
  font-size: 0.75rem;
  color: var(--ink-50);
}

.file-item__meta--error {
  color: var(--danger);
}

.file-item__remove {
  flex: 0 0 auto;
  border: none;
  background: none;
  color: var(--ink-50);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem;
}

.file-item__remove:hover {
  color: var(--danger);
}

/* ---------- reCAPTCHA do upload ---------- */

.upload-widget__recaptcha {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
}

/* ---------- Botão secundário (upload de foto) ---------- */

.upload-widget__submit {
  text-align: center;
  margin-top: 1rem;
}

.upload-widget__note {
  margin: 0.6rem 0 0;
  font-size: 0.72rem;
  color: var(--ink-50);
  text-align: center;
}

.ca3c-submit--secondary {
  background-color: var(--white);
  color: var(--coffee-700);
  border: 1.5px solid var(--coffee-700);
  box-shadow: none;
  padding: 0.7rem 2.25rem;
}

.ca3c-submit--secondary:hover:not(:disabled) {
  background-color: var(--cream);
}

.ca3c-submit--secondary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ---------- Barra de progresso ---------- */

.progress {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.progress__bar {
  flex: 1 1 auto;
  height: 8px;
  border-radius: 9999px;
  background-color: var(--line);
  overflow: hidden;
  position: relative;
}

.progress__bar::after {
  content: "";
  position: absolute;
  inset: 0;
  width: var(--progress, 0%);
  background-color: var(--coffee-700);
  border-radius: 9999px;
  transition: width 0.15s ease;
}

.progress__label {
  flex: 0 0 auto;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--coffee-700);
  min-width: 2.5rem;
  text-align: right;
}

.spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: currentColor;
  animation: spin 0.7s linear infinite;
  display: inline-block;
  vertical-align: -2px;
}

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

/* ---------- Resultados do upload ---------- */

.results {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.result-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.result-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background-color: var(--sand-soft);
}

.result-item__thumb {
  width: 40px;
  height: 40px;
  border-radius: 0.5rem;
  object-fit: cover;
  flex: 0 0 auto;
}

.result-item__thumb--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--white);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--coffee-700);
  text-transform: uppercase;
}

.result-item__info {
  min-width: 0;
  flex: 1 1 auto;
}

.result-item__name {
  font-size: 0.85rem;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-item__status {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  color: #2f7a4d;
  font-weight: 600;
}

.result-item__check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: #2f7a4d;
  color: #fff;
  font-size: 10px;
  line-height: 1;
}
