/* =============================================================================
   123Whats - estilos
   Layout reproduz fielmente a versão em tabelas (2015), agora em HTML semântico
   e modo padrão (standards mode). Medidas em px mantidas de propósito.
   ========================================================================== */

:root {
  --verde: #128C7E;
  --verde-claro: #32BCAD;
  --fundo: #F0F4F9;
  --creme: #FAF7ED;
  --creme-aba: #FDFCF9;
  --creme-campo: #FCFAF5;
  --azul-borda: #044062;
  --texto: #273443;
  --amarelo: #FED45B;
  --amarelo-claro: #FEE69C;
  --salmao: #FFF0EA;
  --dourado: #F0DF9F;
  --azul-switch: #8AB0FF;
  --verde-switch: #a5dc86;
  --fonte-base: Montserrat, sans-serif;
}

/* ---------- Base ---------- */
html, body { margin: 0; padding: 0; }
body {
  background-color: var(--verde-claro);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
img { border: 0; }
input, select, textarea, button { box-sizing: border-box; }
.hidden, [hidden] { display: none !important; }

a:link, a:visited { color: var(--dourado); text-decoration: none; }
a:hover { color: var(--verde-claro); text-decoration: underline; }
a:active { color: #fff; text-decoration: none; }
/* Foco por teclado nos interruptores (os rádios são visualmente ocultos). */
.switch-field input:focus-visible + label,
.switch-field-saudacao input:focus-visible + label,
.switch-field-saber input:focus-visible + label {
  outline: 2px solid #FFA500;
  outline-offset: 2px;
}

/* ---------- Botões de idioma ---------- */
#language-buttons {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.language-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 17px;
  line-height: 40px;
  color: #374151;
  background-color: #fff;
  border: none;
  border-radius: 9999px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s ease;
}
.language-btn:hover { transform: scale(1.1); }
.language-btn.active { outline: 1px solid #FFA500; }

/* ---------- Topo ---------- */
.topo {
  background-color: var(--verde);
  color: #fff;
  text-align: center;
  font-family: "Open Sans", Montserrat, sans-serif;
}
.topo__conteudo { width: 90%; margin: 0 auto; padding: 15px 0; }
.topo__logo { display: block; width: 230px; margin: 0 auto; }
.topo__logo img { display: block; }
.topo__linha { height: 1px; margin: 15px 0; background-color: var(--verde-claro); }
.topo__slogan { margin: 0; font-family: Quicksand, sans-serif; font-size: 15px; }

/* ---------- Área principal ---------- */
.principal { background-color: var(--fundo); padding-top: 30px; }
.envio { margin: 0 0 16px; }

/* Caixas do formulário (equivalem às antigas tabelas de 90%) */
.caixa {
  box-sizing: border-box;
  width: 90%;
  margin: 0 auto;
  padding: 20px;
  border: 1px dashed var(--azul-borda);
  background-color: #fff;
  background-clip: padding-box;
  font-family: var(--fonte-base);
  font-size: 16px;
  color: var(--texto);
  text-align: center;
}
.caixa--pontilhada { border-style: dotted; }
.caixa--mensagem { border-style: dotted; border-radius: 10px; background-clip: border-box; }
.caixa__corpo { width: 95%; margin: 0 auto; }

/* Na versão antiga as tabelas internas (quirks mode) não herdavam a cor: rótulos em preto. */
.rotulo { line-height: normal; color: #000; }
.rotulo ~ .campo-numero,
.rotulo + .switch-field-saudacao,
.rotulo + .switch-field-saber,
.rotulo + .campo { margin-top: 15px; }

.espaco-linha { height: 18px; }   /* equivale ao <br> entre as antigas tabelas */

/* Campos */
.campo {
  font-family: var(--fonte-base);
  text-align: left;
  color: var(--verde);
  background: var(--creme-campo);
  border: 2px solid;
}
.campo--prefixo { padding: 10px; border-radius: 15px 0 0 15px; font-size: 15px; }
.campo--numero { padding: 10px; border-radius: 0 15px 15px 0; font-size: 16px; }
.campo--intl { color: #7BA6FF; }
.campo--nome,
.campo--mensagem { display: block; width: 90%; margin-left: auto; margin-right: auto; font-size: 16px; }
.campo--nome { padding: 10px; border-radius: 25px; }
.campo--mensagem { padding: 20px; border-radius: 5px; }

/* Aba com o seletor de país (antiga tabela de 55%) */
.aba-pais,
.aba-qr {
  box-sizing: border-box;
  width: 55%;
  margin: 0 auto;
  padding: 20px;
  border: 1px solid var(--verde);
  border-top-style: none;
  border-radius: 0 0 10px 10px;
  background-color: var(--creme-aba);
  color: var(--texto);
  text-align: center;
}
.aba-qr { width: 75%; }
/* As tabelas antigas cresciam para caber o conteúdo (ex.: captcha de 304px em telas estreitas). */
.caixa, .aba-pais, .aba-qr, .qr__descricao { min-width: min-content; }
.aba-pais__linha { display: flex; justify-content: center; min-height: 20px; }
.campo-pais {
  padding: 10px;
  border: 1px solid;
  border-radius: 10px;
  font-family: var(--fonte-base);
  font-size: 13px;
  text-align: left;
  color: var(--verde);
  background: #fff;
}

/* Separador pontilhado entre perguntas */
.separador {
  height: 4px;
  margin: 20px 0;
  background-image: url("../imagens/linha_separa.gif");
}

/* Interruptores SIM / NÃO / WEB / APP */
.switch-field,
.switch-field-saudacao,
.switch-field-saber {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
}
.switch-field input,
.switch-field-saudacao input,
.switch-field-saber input {
  position: absolute !important;
  clip: rect(0, 0, 0, 0);
  width: 1px;
  height: 1px;
  border: 0;
  overflow: hidden;
}
.switch-field label,
.switch-field-saudacao label,
.switch-field-saber label {
  background-color: #e4e4e4;
  color: rgba(0, 0, 0, 0.6);
  font-size: 14px;
  line-height: 1;
  text-align: center;
  padding: 8px 16px;
  margin-right: -1px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px rgba(255, 255, 255, 0.1);
  transition: all 0.1s ease-in-out;
  cursor: pointer;
}
.switch-field label:first-of-type,
.switch-field-saudacao label:first-of-type,
.switch-field-saber label:first-of-type { border-radius: 4px 0 0 4px; }
.switch-field label:last-of-type,
.switch-field-saudacao label:last-of-type,
.switch-field-saber label:last-of-type { border-radius: 0 4px 4px 0; }
.switch-field input:checked + label { background-color: var(--azul-switch); box-shadow: none; }
.switch-field-saudacao input:checked + label,
.switch-field-saber input:checked + label { background-color: var(--verde-switch); box-shadow: none; }

/* Aba "abrir no navegador ou no app" (somente computador) */
.aba-abertura {
  box-sizing: border-box;
  width: 75%;
  margin: 0 auto;
  padding: 20px;
  border: 1px solid var(--verde);
  border-bottom-style: none;
  border-radius: 10px 10px 0 0;
  background-color: var(--creme);
  font-family: var(--fonte-base);
  color: var(--texto);
  text-align: center;
}
.aba-abertura__pergunta { margin: 0 0 15px; font-size: 14px; }
.aba-abertura .switch-field { font-size: 13px; flex-wrap: wrap; }   /* quebra linha em janelas estreitas */
.aba-abertura .switch-field p { margin: 13px 0; }

/* Captcha + botão enviar */
.g-recaptcha { display: flex; justify-content: center; }
.espaco-captcha { height: 19px; }
.envio__acoes .botao { vertical-align: top; }

.botao,
.botao-qrcode {
  display: inline-block;
  padding: 10px 20px;
  border: none;
  border-radius: 18px;
  font-family: var(--fonte-base);
  font-size: 15px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.botao { background-color: var(--verde); color: #fff; }
.botao-qrcode { background-color: var(--amarelo); color: var(--texto); }

/* Compartilhar */
.compartilhar { padding: 1px 0 18px; }
.compartilhar a { display: block; width: 50px; margin: 0 auto; }
.compartilhar img { display: block; }

/* Faixas decorativas entre seções */
.faixa { height: 4px; background-repeat: repeat-x; }
.faixa--01 { background-image: url("../imagens/linha_separa_wt_01.gif"); }
.faixa--02 { background-image: url("../imagens/linha_separa_wt_02.gif"); }
.faixa--03 { background-image: url("../imagens/linha_separa_wt_03.gif"); }
.faixa--04 { background-image: url("../imagens/linha_separa_wt_04.gif"); }

/* ---------- Apresentação ---------- */
.apresentacao { background-color: var(--creme); padding: 25px 0; text-align: center; }
.apresentacao__chamada {
  width: 90%;
  margin: 0 auto;
  font-family: "Indie Flower", cursive;
  font-size: 20px;
  color: #333;
}
.apresentacao__imagem { display: block; margin: 25px auto; }
.apresentacao__texto {
  width: 90%;
  margin: 0 auto;
  font-family: Comfortaa, sans-serif;
  font-size: 15px;
  line-height: 25px;
  color: #666;
}
.apresentacao__texto p,
.qr__descricao p { margin: 15px 0; }
.apresentacao__texto p:first-child,
.qr__descricao p:first-child { margin-top: 0; }
.apresentacao__texto p:last-child,
.qr__descricao p:last-child { margin-bottom: 0; }

/* ---------- QR Code ---------- */
.qr { padding: 30px 0 20px; text-align: center; }
div.card {
  width: 90%;
  margin: 0 auto;
  background-color: var(--amarelo);
  color: #CCCCCC;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
  text-align: center;
  border-radius: 58px 10px 10px 10px;
  border: 1px dashed;
}
div.header { padding: 10px; }
.card__titulo {
  margin: 0;
  font-family: Kanit, sans-serif;
  font-size: 30px;
  font-weight: normal;
  line-height: normal;
  color: var(--texto);
}
.qr__descricao {
  box-sizing: border-box;
  width: 90%;
  margin: 30px auto;
  padding: 15px;
  border: 1px dashed #999;
  border-radius: 45px 10px 45px 10px;
  background-color: var(--salmao);
  font-family: Comfortaa, sans-serif;
  font-size: 15px;
  line-height: 25px;
  color: #666;
}
.aba-qr__instrucao {
  margin: 0 0 20px;
  font-family: var(--fonte-base);
  font-size: 13px;
  line-height: 25px;
  color: #333;
}
.qr__dica { width: 75%; margin: 0 auto; padding-top: 20px; }
div.card_qrcode {
  width: 80%;
  margin: 0 auto;
  background-color: var(--amarelo-claro);
  color: #CCCCCC;
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
  text-align: center;
  border-radius: 28px 28px 5px 5px;
  border: 1px dashed;
}
div.header_qrcode { padding: 5px 20px; }
.header_qrcode p {
  margin: 15px 0;
  font-family: Comfortaa, sans-serif;
  font-size: 15px;
  line-height: 25px;
  color: #666;
}
.qr__moldura {
  display: table;
  margin: 0 auto;
  padding: 20px;
  border: 1px dashed var(--azul-borda);
  border-radius: 20px;
  background-color: #fff;
}
.qr-code { display: block; max-width: 200px; margin: 10px; }

/* ---------- Rodapé ---------- */
.rodape { font-family: var(--fonte-base); color: #fff; text-align: center; }
.rodape__apoio { background-color: var(--verde); padding: 35px 0; font-size: 15px; }
.rodape__texto { width: 90%; margin: 0 auto; }
.rodape__pix { display: block; margin: 25px auto; }
.rodape__chave p { margin: 0 0 15px; }
.rodape__selo { background-color: var(--verde-claro); padding: 25px 0; }
.rodape__ssl { display: block; width: 160px; margin: 0 auto 25px; }
.rodape__ssl img { display: block; }
.rodape__aviso { width: 90%; margin: 0 auto; font-size: 12px; }
.rodape__autor {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 55px;
  background-color: var(--verde);
  font-family: Raleway, serif;
  font-size: 15px;
  color: var(--dourado);
}

.sem-js { margin: 0; padding: 10px; background: #fff3cd; color: #333; font-family: var(--fonte-base); text-align: center; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Telas muito estreitas (< 346px): reduz o captcha (304px) para não gerar rolagem lateral. */
@media (max-width: 345px) {
  .g-recaptcha { zoom: 0.85; }
}

/* =============================================================================
   Recursos novos (2026-10): botões, atalhos locais, QR e aviso flutuante.
   Mesma linguagem visual: pílulas arredondadas, Montserrat, verde #128C7E.
   ========================================================================== */

/* Linha de botões (Enviar + Copiar link / Baixar + Copiar) */
.botoes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.botao--contorno {
  padding: 8px 18px;                 /* + borda 2px = mesma altura do .botao */
  background-color: #fff;
  color: var(--verde);
  border: 2px solid var(--verde);
}
.botao--contorno:hover { background-color: var(--verde); color: #fff; }
.botao:hover { filter: brightness(1.05); }
.botao--instalar { display: block; margin: 12px auto 0; font-size: 14px; }
.instalar-dica {
  width: 80%;
  max-width: 380px;
  margin: 12px auto 0;
  padding: 5px 20px;
  background-color: var(--amarelo-claro);
  border: 1px dashed #CCCCCC;
  border-radius: 28px 28px 5px 5px;
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
  font-family: Comfortaa, sans-serif;
  font-size: 14px;
  line-height: 22px;
  color: #666;
}
.instalar-dica p { margin: 12px 0; }
/* Botões que surgem conforme o preenchimento (ex.: "Copiar link") */
.aparecer { animation: aparecer 0.25s ease; }
@keyframes aparecer { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: scale(1); } }
a.botao-qrcode, a.botao-qrcode:visited { color: var(--texto); text-decoration: none; }
a.botao-qrcode:hover { color: var(--texto); filter: brightness(0.97); }
.qr__acoes { margin-top: 20px; }

/* Atalhos guardados só no aparelho: recentes e modelos */
.atalhos {
  margin-top: 12px;
  font-family: var(--fonte-base);
  font-size: 13px;
  color: rgba(0, 0, 0, 0.6);
  line-height: 1.2;
}
.atalhos__titulo { margin-right: 4px; font-weight: bold; }
.chip {
  display: inline-flex;
  align-items: center;
  margin: 4px 3px;
  background-color: #e4e4e4;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 15px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  max-width: 100%;
}
.chip__usar,
.chip__remover {
  border: 0;
  background: transparent;
  font-family: var(--fonte-base);
  font-size: 13px;
  color: rgba(0, 0, 0, 0.7);
  cursor: pointer;
}
.chip__usar { padding: 6px 4px 6px 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip__remover { padding: 6px 10px 6px 6px; color: rgba(0, 0, 0, 0.45); font-size: 15px; line-height: 1; }
.chip:hover { background-color: var(--verde-switch); }
.chip__remover:hover { color: #b91c1c; }
.link-acao {
  padding: 4px 6px;
  border: 0;
  background: none;
  font-family: var(--fonte-base);
  font-size: 13px;
  color: var(--verde);
  text-decoration: underline;
  cursor: pointer;
}
.link-acao:hover { color: var(--verde-claro); }

/* Aviso flutuante (link copiado, número reconhecido...) */
.aviso {
  position: fixed;
  left: 16px;
  right: 72px;                       /* não cobre os botões de idioma */
  bottom: 24px;
  z-index: 10000;
  width: fit-content;
  max-width: 480px;
  margin: 0 auto;
  padding: 10px 20px;
  background-color: var(--verde);
  color: #fff;
  font-family: var(--fonte-base);
  font-size: 14px;
  text-align: center;
  border-radius: 18px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.aviso.visivel { opacity: 1; transform: translateY(0); }
