:root {
  --fd-bg: #f4f8ff;
  --fd-surface: #ffffff;
  --fd-text: #0f172a;
  --fd-muted: #52607a;
  --fd-border: #d9e3f3;
  --fd-primary: linear-gradient(135deg, #1dd1a1, #4096ff);
  --fd-primary-shadow: 0 14px 28px rgba(64, 150, 255, 0.24);
}

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

body {
  margin: 0;
  font-family: Inter, "Plus Jakarta Sans", Arial, sans-serif;
  color: var(--fd-text);
  background:
    radial-gradient(circle at 12% 10%, rgba(29, 209, 161, 0.18), transparent 38%),
    radial-gradient(circle at 88% 95%, rgba(64, 150, 255, 0.22), transparent 40%),
    var(--fd-bg);
}

.header-simplificada {
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(148, 163, 184, 0.24);
  backdrop-filter: blur(10px);
}

.container-header {
  min-height: 72px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo-depoimentos-nav img {
  height: 40px;
  width: auto;
}

.form-depoimento {
  width: min(860px, calc(100% - 32px));
  margin: 34px auto 52px;
}

#formDepoimento {
  background: var(--fd-surface);
  border: 1px solid var(--fd-border);
  border-radius: 20px;
  box-shadow: 0 24px 56px rgba(15, 23, 42, 0.12);
  padding: clamp(18px, 3.2vw, 34px);
}

.etapa h2 {
  margin: 0 0 10px;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  line-height: 1.2;
  font-weight: 800;
  color: var(--fd-text);
}

.subtitulo {
  margin: 0 0 22px;
  color: var(--fd-muted);
  line-height: 1.65;
}

.form-grupo {
  margin-bottom: 16px;
}

.form-grupo label {
  display: block;
  margin-bottom: 7px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #1e293b;
}

.form-grupo input,
.form-grupo textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--fd-border);
  background: #fcfdff;
  color: #0f172a;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.form-grupo input:focus,
.form-grupo textarea:focus {
  outline: none;
  border-color: #3fa2ff;
  box-shadow: 0 0 0 4px rgba(64, 150, 255, 0.14);
}

.grupo-upload-duplo {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.form-upload input[type="file"] {
  display: none;
}

.custom-file-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px dashed #82a8d6;
  background: #f5f9ff;
  color: #0f2a52;
  font-weight: 700;
  cursor: pointer;
}

.nome-arquivo {
  margin-top: 8px;
  display: block;
  font-size: 0.82rem;
  color: #64748b;
}

.preview-logo {
  max-width: 120px;
  border-radius: 10px;
  border: 1px solid #dbe6f5;
  margin-top: 8px;
}

.hidden {
  display: none;
}

.avaliacao-nota {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 6px;
}

.avaliacao-nota input {
  display: none;
}

.avaliacao-nota label {
  font-size: 30px;
  color: #c9d4e6;
  cursor: pointer;
}

.avaliacao-nota label:hover,
.avaliacao-nota label:hover ~ label,
.avaliacao-nota input:checked ~ label {
  color: #f5b301;
}

.texto-aceite {
  font-size: 0.95rem;
  line-height: 1.68;
  color: #30425f;
  background: #f8fbff;
  border: 1px solid #dce8f8;
  border-radius: 14px;
  padding: 14px;
}

.form-aceite {
  margin-top: 14px;
}

.form-aceite label {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  color: #1f2f4b;
}

.form-aceite a {
  color: #206ecf;
  text-decoration: none;
}

.botoes-etapa {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.botao-proxima,
.botao-voltar {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  border: none;
  font-weight: 700;
  cursor: pointer;
}

.botao-proxima {
  color: #fff;
  background: var(--fd-primary);
  box-shadow: var(--fd-primary-shadow);
}

.botao-proxima:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.botao-voltar {
  background: #edf2fb;
  color: #24364f;
}

.etapa-status {
  margin-top: 16px;
  text-align: center;
  font-weight: 700;
  color: #3e5474;
}

.invalid-feedback {
  margin-top: 5px;
  color: #b42318;
  font-size: 0.83rem;
}

input.erro,
textarea.erro {
  border-color: #f04438;
  background: #fff5f5;
}

.preview-depoimento {
  margin-bottom: 18px;
}

.preview-card {
  border-radius: 22px;
  padding: 1.2rem 1.25rem;
}

.preview-card--depo {
  border: 1px solid rgba(29, 209, 161, 0.35);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.06) 0%, rgba(0, 0, 0, 0.48) 100%);
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(29, 209, 161, 0.1);
}

.preview-stars {
  margin-bottom: 0.45rem;
  font-size: 0.92rem;
  letter-spacing: 0.12em;
  color: #0d9488;
}

.preview-quote {
  margin: 0;
}

.preview-quote p {
  margin: 0;
  font-size: clamp(0.9rem, 1.65vw, 1rem);
  line-height: 1.56;
  font-weight: 600;
  color: rgba(248, 250, 252, 0.94);
}

.preview-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.preview-author img {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  object-fit: cover;
  border: 2px solid rgba(29, 209, 161, 0.25);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.preview-name {
  display: block;
  font-size: 0.9rem;
  color: #ffffff;
}

.preview-role {
  display: block;
  margin-top: 2px;
  font-size: 0.8rem;
  color: rgba(226, 232, 240, 0.72);
}

.envio-hints {
  margin: 12px 0 18px;
  padding: 12px 14px;
  border: 1px solid #d7e4f6;
  background: #f8fbff;
  border-radius: 12px;
}

.envio-hints p {
  margin: 0 0 6px;
  font-weight: 700;
  color: #233a5d;
}

.envio-hints ul {
  margin: 0;
  padding-left: 18px;
  color: #4a607f;
}

.envio-hints li {
  margin: 4px 0;
}

html:not([data-theme="dark"]) .preview-card--depo {
  border-color: rgba(148, 163, 184, 0.28);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.96) 0%, rgba(241, 247, 255, 0.98) 100%);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
}

html:not([data-theme="dark"]) .preview-stars {
  color: #0f766e;
}

html:not([data-theme="dark"]) .preview-quote p {
  color: #1e2b4a;
}

html:not([data-theme="dark"]) .preview-author {
  border-top-color: rgba(148, 163, 184, 0.32);
}

html:not([data-theme="dark"]) .preview-name {
  color: #0b1736;
}

html:not([data-theme="dark"]) .preview-role {
  color: #5f6f8f;
}

.mensagem-sucesso {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  background: rgba(3, 10, 26, 0.6);
}

.mensagem-sucesso.mostrar {
  display: flex;
}

.sucesso-wrap {
  width: min(540px, 92vw);
  background: #fff;
  border-radius: 18px;
  border: 1px solid #dbe5f3;
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.24);
  padding: 24px;
  text-align: center;
}

.sucesso-icone {
  display: none;
}

.sucesso-titulo {
  margin: 0 0 8px;
}

.sucesso-texto {
  color: #435775;
}

.sucesso-progress {
  height: 8px;
  background: #eaf0f8;
  border-radius: 999px;
  overflow: hidden;
}

.sucesso-progress-bar {
  width: 0%;
  height: 100%;
  background: var(--fd-primary);
  transition: width .2s linear;
}

.btn-primario {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  color: #fff;
  text-decoration: none;
  background: var(--fd-primary);
}

@media (max-width: 760px) {
  .container-header {
    min-height: 64px;
    padding: 0 12px;
  }

  .logo-depoimentos-nav img {
    height: 34px;
  }

  .form-depoimento {
    width: min(860px, calc(100% - 20px));
    margin: 18px auto 34px;
  }

  #formDepoimento {
    border-radius: 16px;
    padding: 16px 14px;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.1);
  }

  .etapa h2 {
    font-size: 1.34rem;
    line-height: 1.22;
    margin-bottom: 8px;
  }

  .subtitulo {
    margin-bottom: 16px;
    line-height: 1.5;
    font-size: 0.94rem;
  }

  .form-grupo {
    margin-bottom: 12px;
  }

  .form-grupo input,
  .form-grupo textarea {
    padding: 11px 12px;
    border-radius: 10px;
    font-size: 16px; /* evita zoom automático no iOS */
  }

  .custom-file-label {
    width: 100%;
    min-height: 42px;
  }

  .preview-logo {
    max-width: 100px;
  }

  .avaliacao-nota {
    gap: 4px;
  }

  .avaliacao-nota label {
    font-size: 28px;
    line-height: 1;
  }

  .preview-card {
    padding: 1rem;
    border-radius: 16px;
  }

  .preview-author img {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .envio-hints {
    margin: 10px 0 14px;
    padding: 10px 12px;
  }

  .texto-aceite {
    padding: 12px;
    line-height: 1.58;
    font-size: 0.9rem;
  }

  .botoes-etapa {
    flex-direction: column-reverse;
    gap: 10px;
    margin-top: 16px;
  }

  .botao-proxima,
  .botao-voltar {
    width: 100%;
    min-height: 46px;
    border-radius: 10px;
  }

  .etapa-status {
    margin-top: 12px;
    font-size: 0.9rem;
  }

  .sucesso-wrap {
    width: min(540px, calc(100vw - 16px));
    padding: 16px;
    border-radius: 14px;
  }

  .sucesso-titulo {
    font-size: 1.06rem;
  }

  .sucesso-texto {
    font-size: 0.92rem;
  }

}

@media (max-width: 520px) {
  body {
    background:
      radial-gradient(circle at 18% 4%, rgba(29, 209, 161, 0.14), transparent 36%),
      radial-gradient(circle at 90% 98%, rgba(64, 150, 255, 0.16), transparent 40%),
      var(--fd-bg);
  }

  .form-depoimento {
    width: calc(100% - 14px);
    margin: 12px auto 26px;
  }

  #formDepoimento {
    padding: 14px 12px;
    border-radius: 14px;
  }

  .etapa h2 {
    font-size: 1.22rem;
  }

  .subtitulo {
    font-size: 0.9rem;
  }

  .form-grupo label {
    font-size: 0.88rem;
  }

  .avaliacao-nota label {
    font-size: 25px;
  }

  .envio-hints li {
    margin: 3px 0;
    font-size: 0.88rem;
  }

  .preview-quote p {
    font-size: 0.88rem;
    line-height: 1.5;
  }

  .preview-name {
    font-size: 0.84rem;
  }

  .preview-role {
    font-size: 0.76rem;
    line-height: 1.3;
  }

  .btn-primario {
    width: 100%;
  }
}

/* Página de formulário: não exibir banner/flutuante de cookies */
#cookie-consent,
#cookie-toggle,
#cookie-modal,
.cookie-banner,
.cookie-modal-overlay {
  display: none !important;
}
