/* Feedback do beta - botao global e folha de apontamento.
   Breakpoint unico 767/768, como toda a fundacao mobile.
   Regra do hidden: nenhuma classe com display fora de :not([hidden]).
   --fab-base e definido em base_mobile_v15.css e mede a altura ocupada
   pela barra inferior; aqui so consumimos. */

/* Reserva do canto inferior direito.
   Sem isto o botao cobre a ultima acao da pagina no desktop: a medicao
   pegou o CTA de assinatura em /planos. No mobile a barra ja reserva
   esse espaco, entao a regra volta ao valor da fundacao la embaixo. */
.main { padding-bottom: calc(var(--fab-base) + 60px); }

.fb-botao {
  position: fixed;
  right: 16px;
  bottom: var(--fab-base);
  z-index: 220;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 44px;
  min-width: 44px;
  padding: 0 .85rem;
  border: 1px solid var(--1300);
  border-radius: var(--rmax);
  background: var(--1600);
  color: white;
  font-family: var(--fb);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--sh2);
}

.fb-botao:hover { background: var(--1700); }
.fb-botao:focus-visible { outline: 3px solid var(--foco); outline-offset: 2px; }
.fb-botao svg { width: 18px; height: 18px; }
.fb-rotulo { white-space: nowrap; }

.fb-fundo { position: fixed; }
.fb-fundo:not([hidden]) {
  display: block;
  inset: 0;
  z-index: 260;
  background: rgba(42, 34, 64, .4);
}

.fb-folha { position: fixed; }
.fb-folha:not([hidden]) {
  display: flex;
  flex-direction: column;
  z-index: 261;
  right: 16px;
  bottom: calc(var(--fab-base) + 52px);
  width: 360px;
  max-width: calc(100vw - 32px);
  max-height: 78vh;
  overflow-y: auto;
  background: white;
  border: 1px solid var(--br);
  border-radius: var(--rlg);
  padding: 1rem 1.1rem;
  box-shadow: var(--sh3);
}

.fb-topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .5rem;
}

.fb-titulo {
  font-family: var(--fd);
  font-size: 1.15rem;
  color: var(--tp);
  margin: 0;
}

.fb-x {
  min-height: 44px;
  min-width: 44px;
  border: 0;
  background: none;
  color: var(--ts);
  font-size: 20px;
  cursor: pointer;
}

.fb-tipos { display: flex; gap: .4rem; margin-bottom: .6rem; }

.fb-tipo {
  flex: 1;
  min-height: 44px;
  border: 1px solid var(--br);
  border-radius: var(--rsm);
  background: var(--sf2);
  color: var(--ts);
  font-family: var(--fb);
  font-size: 13px;
  cursor: pointer;
}

.fb-tipo.on {
  background: var(--1100);
  border-color: var(--1400);
  color: var(--1700);
  font-weight: 600;
}

.fb-texto {
  width: 100%;
  min-height: 96px;
  padding: .6rem .7rem;
  border: 1px solid var(--br);
  border-radius: var(--rsm);
  background: var(--sf);
  color: var(--tp);
  font-family: var(--fb);
  font-size: 16px;
  resize: vertical;
}

.fb-contador { text-align: right; font-size: 11px; color: var(--tm); }

.fb-anexo {
  min-height: 44px;
  width: 100%;
  margin-top: .35rem;
  border: 1px dashed var(--1300);
  border-radius: var(--rsm);
  background: var(--sf2);
  color: var(--1700);
  font-family: var(--fb);
  font-size: 13px;
  cursor: pointer;
}

.fb-arquivo { position: absolute; left: -9999px; }

.fb-mini { display: none; }
.fb-mini:not([hidden]) {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: .4rem;
}

.fb-mini img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: var(--rsm);
  border: 1px solid var(--br);
}

.fb-nota { font-size: 11.5px; color: var(--tm); margin: .6rem 0 .5rem; }

.fb-acoes { display: flex; gap: .5rem; justify-content: flex-end; }

.fb-cancelar,
.fb-enviar {
  min-height: 44px;
  padding: 0 1rem;
  border-radius: var(--rsm);
  font-family: var(--fb);
  font-size: 14px;
  cursor: pointer;
}

.fb-cancelar {
  border: 1px solid var(--br);
  background: white;
  color: var(--ts);
}

.fb-enviar {
  border: 1px solid var(--1600);
  background: var(--1600);
  color: white;
  font-weight: 600;
}

.fb-enviar[disabled] { opacity: .5; cursor: default; }

.fb-erro { display: none; }
.fb-erro:not([hidden]) {
  display: block;
  margin-top: .5rem;
  padding: .5rem .6rem;
  border-radius: var(--rsm);
  background: var(--er-bg);
  color: var(--er-fg-forte);
  font-size: 12.5px;
}

.fb-obrigada { display: none; }
.fb-obrigada:not([hidden]) {
  display: block;
  text-align: center;
  padding: 1.2rem .5rem .6rem;
}

.fb-selo { font-size: 26px; color: var(--1500); }
.fb-obrigada p { color: var(--ts); font-size: 14px; margin: .5rem 0 0; }

@media (max-width: 767px) {
  .fb-botao { padding: 0; justify-content: center; }
  .fb-rotulo { display: none; }
  .main { padding-bottom: calc(var(--fab-base) + 1.25rem); }
  .fb-folha:not([hidden]) {
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    max-width: none;
    max-height: 86vh;
    border-radius: var(--rlg) var(--rlg) 0 0;
    padding: 1rem 1.1rem calc(1rem + env(safe-area-inset-bottom));
  }
}
