/* Formulário de uma pergunta por tela da V2 (COMANDO 23). Classes tf-*, usadas por js/clone.js (seção 5).
   Só variáveis e fontes da V2 (--color-gm-*, Montserrat, JetBrains Mono). Nada da página antiga. */

.tf-overlay { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 1rem;
  background: rgba(10,10,10,.82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: tf-surge .2s ease both; }
.tf-dialogo { position: relative; display: flex; flex-direction: column; width: 100%; max-width: 40rem; height: min(40rem, calc(100vh - 2rem)); /* altura fixa: a janela não pula entre perguntas */
  overflow-y: auto; border: 1px solid var(--color-gm-line); border-radius: 1rem; background: var(--color-gm-black-2);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.9), 0 0 80px -40px rgba(249,101,0,.35); animation: tf-sobe .25s ease both; }
@media (max-width: 639px) {
  .tf-overlay { padding: 0; align-items: stretch; }
  .tf-dialogo { max-width: none; height: 100vh; height: 100dvh; border-radius: 0; border: 0; }
}

.tf-topo { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.5rem 1.5rem 0; }
@media (min-width: 640px) { .tf-topo { padding: 1.75rem 2rem 0; } }
.tf-selo { margin: 0; font-family: var(--font-mono); font-size: 10px; letter-spacing: .28em; text-transform: uppercase; color: var(--color-gm-orange); font-weight: 600; }
.tf-cabecalho { margin: .4rem 0 0; font-family: var(--font-display); font-weight: 800; font-size: 1rem; line-height: 1.25; color: var(--color-gm-muted); letter-spacing: -.01em; }
.tf-fechar { flex-shrink: 0; display: grid; place-items: center; width: 2.5rem; height: 2.5rem; margin: -.4rem -.5rem 0 0; border-radius: 999px; color: var(--color-gm-muted); background: transparent; transition: color .15s, background-color .15s; }
.tf-fechar:hover, .tf-fechar:focus-visible { color: #fff; background: rgba(46,46,48,.6); }
.tf-icone-x { width: 1.25rem; height: 1.25rem; }

.tf-progresso-linha { display: flex; align-items: center; gap: .9rem; padding: 1.1rem 1.5rem 0; }
@media (min-width: 640px) { .tf-progresso-linha { padding: 1.25rem 2rem 0; } }
.tf-progresso { flex: 1; height: 4px; border-radius: 999px; background: var(--color-gm-line); overflow: hidden; }
.tf-progresso span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--color-gm-orange); box-shadow: 0 0 12px rgba(249,101,0,.6); transition: width .35s ease; }
.tf-etapa { margin: 0; flex-shrink: 0; font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--color-gm-subtle); }

.tf-form { flex: 1; display: flex; padding: 0 1.5rem; }
@media (min-width: 640px) { .tf-form { padding: 0 2rem; } }
.tf-armadilha { position: absolute; left: -9999px; top: 0; width: 1px; height: 1px; opacity: 0; }
.tf-palco { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 2rem 0 1.5rem; }
.tf-num { margin: 0 0 .7rem; font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--color-gm-orange); }
.tf-titulo { margin: 0; font-family: var(--font-display); font-weight: 800; color: #fff; font-size: 1.6rem; line-height: 1.15; letter-spacing: -.02em; outline: none; }
@media (min-width: 640px) { .tf-titulo { font-size: 2rem; } }
.tf-apoio { margin: .6rem 0 1.4rem; color: var(--color-gm-subtle); font-size: .95rem; line-height: 1.5; }

.tf-campo { width: 100%; padding: .55rem 0 .7rem; border: 0; border-bottom: 2px solid var(--color-gm-line); border-radius: 0; background: transparent;
  color: #fff; font-family: var(--font-sans); font-size: 1.25rem; transition: border-color .15s; }
@media (min-width: 640px) { .tf-campo { font-size: 1.4rem; } }
.tf-campo::placeholder { color: #4d4d50; }
.tf-campo:focus { outline: none; border-bottom-color: var(--color-gm-orange); }
.tf-campo--longo { font-size: 1.05rem; line-height: 1.5; padding: .8rem .9rem; min-height: 8rem; resize: vertical; border: 1px solid var(--color-gm-line); border-radius: .75rem; background: var(--color-gm-black); }
.tf-campo--longo:focus { border-color: var(--color-gm-orange); box-shadow: 0 0 0 3px rgba(249,101,0,.18); }
.tf-com-erro .tf-campo { border-bottom-color: rgba(225,29,60,.7); }
.tf-com-erro .tf-campo--longo { border-color: rgba(225,29,60,.7); }

.tf-opcoes { display: grid; gap: .55rem; }
.tf-opcao { display: flex; align-items: center; gap: .85rem; width: 100%; text-align: left; padding: .8rem 1rem; border: 1px solid var(--color-gm-line); border-radius: .75rem;
  background: var(--color-gm-black); color: var(--color-gm-muted); font-family: var(--font-sans); font-size: .98rem; font-weight: 500; line-height: 1.3; cursor: pointer;
  transition: border-color .15s, background-color .15s, color .15s; }
.tf-opcao:hover { border-color: var(--color-gm-subtle); color: #fff; }
.tf-opcao:focus-visible { outline: 2px solid var(--color-gm-orange); outline-offset: 2px; }
.tf-letra { flex-shrink: 0; display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border: 1px solid #3a3a3d; border-radius: .4rem; font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--color-gm-subtle); transition: inherit; }
.tf-opcao-texto { flex: 1; }
.tf-check { opacity: 0; color: var(--color-gm-orange); font-weight: 700; transition: opacity .15s; }
.tf-opcao--sel { border-color: var(--color-gm-orange); background: rgba(249,101,0,.1); color: #fff; }
.tf-opcao--sel .tf-letra { background: var(--color-gm-orange); border-color: var(--color-gm-orange); color: #fff; }
.tf-opcao--sel .tf-check { opacity: 1; }
.tf-com-erro .tf-opcao { border-color: rgba(225,29,60,.45); }

.tf-erro { min-height: 1.25rem; margin: .7rem 0 0; color: #ff5a73; font-size: .85rem; }
.tf-dica { margin: .2rem 0 0; font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #5c5c60; }
@media (hover: none) { .tf-dica { display: none; } }
.tf-aviso { margin: 1rem 0 0; padding: .85rem 1rem; border: 1px solid rgba(249,101,0,.45); border-radius: .75rem; background: rgba(249,101,0,.08); color: #fff; font-size: .95rem; font-weight: 600; }
.tf-aviso--erro { border-color: rgba(225,29,60,.55); background: rgba(225,29,60,.08); }
.tf-fim-acoes { display: flex; flex-direction: column-reverse; gap: .75rem; margin-top: .5rem; }
@media (min-width: 640px) { .tf-fim-acoes { flex-direction: row; } }

.tf-nav { display: flex; gap: .75rem; padding: 0 1.5rem; }
.tf-nav[hidden] { display: none; }
@media (min-width: 640px) { .tf-nav { padding: 0 2rem; justify-content: space-between; } }
.tf-nav .tf-botao--prim { flex: 1; }
@media (min-width: 640px) { .tf-nav .tf-botao--prim { flex: 0 0 auto; min-width: 11rem; } }
.tf-botao { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .9rem 1.4rem; border-radius: .75rem; font-family: var(--font-sans); font-weight: 700; font-size: .95rem; letter-spacing: .01em; transition: background-color .15s, border-color .15s, color .15s, opacity .15s; cursor: pointer; }
.tf-botao--prim { background: var(--color-gm-orange); color: #fff; border: 1px solid var(--color-gm-orange); box-shadow: 0 10px 40px -10px rgba(249,101,0,.7); }
.tf-botao--prim:hover { background: var(--color-gm-orange-hover); }
.tf-botao--sec { background: transparent; color: var(--color-gm-muted); border: 1px solid var(--color-gm-line); }
.tf-botao--sec:hover { color: #fff; border-color: var(--color-gm-subtle); }
.tf-botao:focus-visible { outline: 2px solid var(--color-gm-orange); outline-offset: 2px; }
.tf-botao:disabled { opacity: .35; cursor: not-allowed; }
.tf-icone { width: 1rem; height: 1rem; flex-shrink: 0; }
.tf-rodape { margin: 0; padding: 1rem 1.5rem 1.4rem; text-align: center; font-size: .75rem; line-height: 1.5; color: var(--color-gm-subtle); }
.tf-link { color: var(--color-gm-muted); text-decoration: underline; text-underline-offset: 2px; }
.tf-link:hover, .tf-link:focus-visible { color: #fff; }
.tf-link:focus-visible { outline: 2px solid var(--color-gm-orange); outline-offset: 2px; border-radius: 2px; }

/* Transições entre telas (desligadas com "reduzir movimento") */
.tf-entra { animation: tf-entra .32s ease both; }
.tf-volta { animation: tf-volta .32s ease both; }
.tf-treme { animation: tf-treme .3s ease; }
@keyframes tf-surge { from { opacity: 0; } to { opacity: 1; } }
@keyframes tf-sobe { from { transform: translateY(12px); } to { transform: none; } }
@keyframes tf-entra { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes tf-volta { from { opacity: 0; transform: translateY(-18px); } to { opacity: 1; transform: none; } }
@keyframes tf-treme { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) {
  .tf-progresso span, .tf-opcao, .tf-check { transition: none !important; }
  .tf-overlay, .tf-dialogo, .tf-entra, .tf-volta, .tf-treme { animation: none !important; }
}
