/* Ficha de medidas das calculadoras (assets/js/ficha.js). Na tela abre por cima
   da página; na impressão (Salvar em PDF) só a folha aparece. */

.ficha {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  overflow-y: auto;
  background: rgba(20, 24, 34, 0.82);
  padding: 0 16px 40px;
  -webkit-overflow-scrolling: touch;
}
html.ficha-aberta, html.ficha-aberta body { overflow: hidden; }

.ficha-barra {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 12px 0;
  max-width: 820px;
  margin: 0 auto;
}
.ficha-barra button {
  font: 700 0.95rem var(--font-display, sans-serif);
  border-radius: 999px;
  padding: 12px 22px;
  border: 0;
  cursor: pointer;
}
.ficha-pdf { background: var(--yellow, #FFC40E); color: var(--navy, #28324B); }
.ficha-fechar { background: #3A4256; color: #FFFFFF; }

.ficha-folha {
  max-width: 820px;
  margin: 0 auto;
  background: #FFFFFF;
  color: #1D2230;
  border-radius: 6px;
  padding: clamp(18px, 4vw, 40px);
  font-family: var(--font-text, sans-serif);
  font-size: 15px;
  line-height: 1.45;
}

.ficha-topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--navy, #28324B);
}
.ficha-topo img { height: 38px; width: auto; }
.ficha-topo div { text-align: right; }
.ficha-topo b { display: block; font: 800 1.15rem var(--font-display, sans-serif); color: var(--navy, #28324B); }
.ficha-topo span { font-size: 0.85rem; color: #5A6275; }

.ficha-resumo { margin: 14px 0 0; font-weight: 600; }

.ficha-bloco { margin-top: 22px; break-inside: avoid; page-break-inside: avoid; }
.ficha-bloco h2 {
  font: 800 0.8rem var(--font-display, sans-serif);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5A6275;
  margin: 0 0 8px;
}

.ficha-tab { width: 100%; border-collapse: collapse; }
.ficha-tab th, .ficha-tab td { text-align: left; padding: 7px 8px; border-bottom: 1px solid #E5E5E0; vertical-align: top; }
.ficha-tab th { font-size: 0.78rem; color: #5A6275; font-weight: 700; }
.ficha-tab .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ficha-tab small { display: block; color: #5A6275; }

.ficha-desenho {
  background: #262C3C;
  border-radius: 4px;
  padding: 12px;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.ficha-desenho svg { display: block; width: 100%; height: auto; max-height: 520px; }
.ficha-desenho + .ficha-desenho { margin-top: 10px; }
.ficha-desenho figcaption, .ficha-legenda { font-size: 0.85rem; color: #5A6275; margin: 6px 0 0; }
.ficha-desenho figcaption { color: #C9CEDA; }

.ficha-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.ficha-grade .dp-pc svg { background: #FFFFFF; }
.ficha-cores { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 0.82rem; color: #5A6275; margin: 0 0 10px; }
.ficha-cores i { display: inline-block; width: 12px; height: 12px; border: 1px solid #9AA2B4; margin-right: 5px; vertical-align: -1px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

.ficha-pe { margin-top: 26px; padding-top: 12px; border-top: 1px solid #E5E5E0; font-size: 0.8rem; color: #5A6275; }
.ficha-pe p { margin: 0 0 4px; }
.ficha-pe a { color: inherit; word-break: break-all; }

/* salvar projeto na conta */
.ficha-salvar { max-width: 520px; }
.ficha-salvar h2 { font: 800 1.35rem var(--font-display, sans-serif); color: var(--navy, #28324B); margin: 0 0 8px; }
.ficha-salvar form { display: grid; gap: 12px; margin-top: 16px; }
.ficha-campo { display: grid; gap: 5px; font-size: 0.85rem; font-weight: 700; color: #3A4256; }
.ficha-campo input {
  font: 400 1rem var(--font-text, sans-serif);
  padding: 11px 12px;
  border: 1.5px solid #CDD2DC;
  border-radius: 8px;
  background: #FFFFFF;
  color: #1D2230;
  width: 100%;
  box-sizing: border-box;
}
.ficha-campo input:focus { outline: 2px solid var(--yellow, #FFC40E); outline-offset: 1px; border-color: var(--navy, #28324B); }
.ficha-duas { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .ficha-duas { grid-template-columns: 1fr; } }
.ficha-opcoes { border: 1px solid #E5E5E0; border-radius: 8px; padding: 10px 12px; margin: 0; display: grid; gap: 6px; font-size: 0.92rem; }
.ficha-opcoes legend { font-size: 0.8rem; font-weight: 700; color: #5A6275; padding: 0 4px; }
.ficha-aceite { display: flex; gap: 8px; align-items: flex-start; font-size: 0.85rem; color: #3A4256; line-height: 1.4; }
.ficha-aceite input { margin-top: 3px; flex: none; }
.ficha-aceite a { color: inherit; }
.ficha-largo { width: 100%; padding: 13px 18px; border: 0; border-radius: 999px; font: 700 0.95rem var(--font-display, sans-serif); cursor: pointer; text-align: center; text-decoration: none; display: block; box-sizing: border-box; }
.ficha-largo:disabled { opacity: 0.6; cursor: default; }
.ficha-claro { background: #EEF0F4; color: var(--navy, #28324B); }
.ficha-acoes { display: grid; gap: 8px; margin-top: 18px; }
.ficha-msg { margin: 0; font-size: 0.88rem; color: #3A4256; min-height: 1.2em; }
.ficha-msg.is-erro { color: #B42318; font-weight: 600; }
.ficha-ou { display: flex; align-items: center; gap: 10px; margin: 16px 0 12px; color: #5A6275; font-size: 0.82rem; }
.ficha-ou::before, .ficha-ou::after { content: ""; flex: 1; height: 1px; background: #E5E5E0; }
.ficha-google { display: flex; justify-content: center; min-height: 44px; }
.ficha-salvar .ficha-legenda a { color: var(--navy, #28324B); font-weight: 700; }
/* sem conta aberta (21/10/2026): Criar conta | Já tenho conta, com e-mail e senha */
.ficha-abas { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 14px; padding: 4px; border-radius: 999px; background: #EEF0F4; }
.ficha-abas button { padding: 9px 12px; border: 0; border-radius: 999px; background: none; color: #4A5163; font: 700 0.9rem var(--font-display, sans-serif); cursor: pointer; }
.ficha-abas button[aria-pressed="true"] { background: #FFFFFF; color: var(--navy, #28324B); box-shadow: 0 1px 3px rgba(40, 50, 75, 0.15); }
.ficha-mostrar { display: inline-flex; align-items: center; gap: 8px; justify-self: start; font-size: 0.85rem; color: #4A5163; cursor: pointer; }
.ficha-texto { justify-self: center; border: 0; background: none; padding: 6px 2px; color: #4A5163; font: 600 0.88rem var(--font-text, sans-serif); text-decoration: underline; cursor: pointer; }
[data-salvar-projeto][hidden] { display: none !important; }
.kit-salvar { width: 100%; margin-top: 8px; }

/* botão da calculadora */
.calc-ficha {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  background: none;
  border: 1.5px solid var(--navy, #28324B);
  border-radius: 999px;
  color: var(--navy, #28324B);
  font: 700 0.95rem var(--font-display, sans-serif);
  cursor: pointer;
}
.ficha-abrir {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: 700 0.95rem var(--font-display, sans-serif);
  padding: 12px 18px;
  border-radius: 999px;
  border: 1.5px solid currentColor;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.ficha-abrir[disabled] { opacity: 0.4; cursor: default; }

@media print {
  @page { size: A4; margin: 12mm; }
  html.ficha-aberta, html.ficha-aberta body { overflow: visible; background: #FFFFFF; }
  html.ficha-aberta body > *:not(.ficha) { display: none !important; }
  .ficha { position: static; overflow: visible; background: none; padding: 0; }
  .ficha-barra { display: none; }
  .ficha-folha { max-width: none; padding: 0; border-radius: 0; font-size: 12px; }
  .ficha-bloco.is-quebra { break-before: page; page-break-before: always; }
  .ficha-desenho svg { max-height: 120mm; }
}
