/*
 * Brasil Wap — camada visual mobile (Variante A)
 * Carregada somente com a flag design_mobile=1.
 * Não define cores de fundo/texto: preserva o CSS gerado pelo cores-site.php.
 * Compatível com Android 7 / iOS 12 (sem :is(), sem :focus-visible obrigatório).
 */

:root {
  --bw-font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --bw-radius: 10px;
  --bw-radius-sm: 8px;
  --bw-line: rgba(90, 90, 90, 0.35);
  --bw-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 5px 14px rgba(0, 40, 60, 0.06);
}

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

body {
  font-family: var(--bw-font);
  font-size: 15px;
  line-height: 1.45;
}

/* Centralização do “app” mobile no desktop, sem wrapper novo */
.barra-topo,
.content,
#rodape {
  width: 100%;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.content {
  padding-left: 10px;
  padding-right: 10px;
}

/* Topo: mesma ordem (data/hora, ícones), só mais compacto */
.barra-topo {
  padding: 5px 8px;
}

.barra-topo table {
  width: 100%;
}

.barra-topo td {
  padding-left: 2px;
  padding-right: 2px;
}

.barra-topo table:first-child td {
  font-size: 13px;
  line-height: 1.35;
}

.barra-topo #clock_tm,
.barra-topo #clock_dt {
  font-size: 12px;
}

.barra-topo hr {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  margin: 4px 0 3px;
}

.barra-topo i {
  vertical-align: middle;
}

/* Menu rápido — mesmo lugar; se existir na página */
#menurapido {
  width: 100%;
  height: 40px;
  margin: 6px 0 8px;
  padding: 0 10px;
  border: 1px solid rgba(120, 120, 120, 0.35);
  border-radius: var(--bw-radius);
  font-family: var(--bw-font);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  box-sizing: border-box;
}

/* Títulos de seção — mantém o gradiente do dono */
.subbar2,
#titulo {
  padding: 9px 12px;
  border-radius: var(--bw-radius);
  font-size: 18px;
  line-height: 1.2;
  margin: 6px 0;
}

/* Cartões da hall — mantém os gradientes do dono */
#divhall1,
.divhall1,
#divhall2,
.divhall2 {
  padding: 11px;
  margin: 5px 0;
  border: 1px solid var(--bw-line);
  border-radius: var(--bw-radius);
  box-shadow: var(--bw-shadow);
}

/* Listas/cartões genéricos — mantém os fundos do dono */
div#div1,
div.div1,
div#div2,
div.div2,
#diva,
.diva,
#divb,
.divb {
  padding: 10px;
  margin: 4px 0;
  border: 1px solid var(--bw-line);
  border-radius: var(--bw-radius);
  box-shadow: var(--bw-shadow);
}

/* Células de tabela que usam div1/div2: só padding/raio */
td#div1,
td.div1,
td#div2,
td.div2 {
  padding: 10px;
  border-radius: var(--bw-radius);
}

/* Formulários: mesma posição, tipografia e altura consistentes */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="tel"],
input[type="search"],
select,
textarea {
  font-family: var(--bw-font);
  font-size: 14px;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: var(--bw-radius);
  box-sizing: border-box;
}

textarea {
  min-height: 80px;
}

/* Botões principais: mantém o fundo/gradiente do dono */
input[type="submit"],
input[type="button"],
.new-button,
.clean-gray,
.botao3d {
  font-family: var(--bw-font);
  font-size: 14px;
  font-weight: 700;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: var(--bw-radius);
  box-sizing: border-box;
}

/* Botões só de ícone não recebem altura/padding de botão de texto */
button {
  font-family: var(--bw-font);
}

/* Foco visível sem fixar cor de marca (fallback para iOS 12) */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Rodapé */
#rodape {
  padding: 10px 8px;
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 640px) {
  .barra-topo,
  .content,
  #rodape {
    max-width: 100%;
  }

  .content {
    padding-left: 8px;
    padding-right: 8px;
  }
}
