/* Feedback dos visitantes: convite discreto + formulário. Usa as variáveis de cor do app.css (claro/escuro). */

/* A janela vive na camada de cartões da .dock (dock.css): em fluxo normal, empilhada com os outros avisos (cookies,
   notificações), sem position: fixed e sem distâncias escritas à mão. Direita no computador; largura total no celular. */
.fb { width: min(380px, 100%); }
.fb[hidden] { display: none; }
.fb__card { position: relative; max-height: calc(100vh - 190px); max-height: calc(100dvh - 190px); overflow-y: auto; padding: 18px 18px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); font-size: .92rem; line-height: 1.4; animation: fb-in .3s ease-out; overscroll-behavior: contain; }
.fb__x { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.fb__x:hover { background: var(--surface-2); color: var(--ink); }
.fb__x svg { width: 18px; height: 18px; }
.fb__ico { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 10px; border-radius: 12px; background: var(--ink); color: var(--surface); }
.fb__ico svg { width: 20px; height: 20px; }
.fb__ico--ok { background: var(--good); color: #fff; }
.fb__title { margin: 0 28px 6px 0; font-size: 1.08rem; line-height: 1.25; font-weight: 750; letter-spacing: -.01em; }
.fb__title:focus { outline: none; }
.fb__text { margin: 0 0 10px; color: var(--ink-2); }
.fb__count { margin: 0 0 14px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); color: var(--ink-2); font-size: .85rem; }
.fb__count:not(:has(> :not([hidden]))) { display: none; }
.fb__count strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.fb__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.fb__form .field { margin-bottom: 12px; }
.fb__form textarea { min-height: 112px; }
.fb__opt { font-weight: 500; color: var(--muted); }
.fb__meta { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; min-height: 1.2em; }
.fb__chars { margin-left: auto; font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fb__chars.is-near { color: var(--warn-text); }
.fb__chars.is-over { color: var(--crit-text); font-weight: 700; }
.fb__err { font-size: .8rem; font-weight: 600; color: var(--crit-text); }
.fb__err:empty { display: none; }
.fb__hint { margin: 2px 0 0; font-size: .78rem; line-height: 1.4; color: var(--ink-2); }
.fb__form [aria-invalid="true"] { border-color: var(--crit); }
.fb__form .form-msg { margin: 0 0 10px; }
.fb__form .form-msg:empty { display: none; }
.fb__form .form-msg.is-error { color: var(--crit-text); }
.fb__legal { margin: 12px 0 0; font-size: .74rem; color: var(--muted); }
.fb__legal a { color: inherit; }
.fb__never { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--border); }
.fb__never .check { font-size: .8rem; color: var(--muted); align-items: center; min-height: 32px; }
.fb__never .check input { width: 18px; height: 18px; margin: 0; }
.fb__ack { margin: 6px 0 0; font-size: .78rem; color: var(--ink-2); }
/* Entrada só com opacidade e escala (nunca deslocando o cartão para cima dos vizinhos da .dock durante a animação). */
@keyframes fb-in { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.fb__card { transform-origin: bottom right; }

@media (max-width: 640px) {
  .fb { width: auto; }
  .fb__card { padding: 16px 14px 12px; }
  .fb__actions .btn { flex: 1 1 100%; min-height: 48px; font-size: 1rem; }
  .fb__form textarea { min-height: 96px; }
}

/* link permanente do rodapé */
.fb-foot { margin-top: 2px; color: var(--muted); }
.fb-foot strong { color: var(--ink-2); font-weight: 650; }

@media print { .fb { display: none !important; } }

/* botão permanente que reabre o formulário (aparece quando a janela está fechada); encaixe direito da faixa de botões da .dock */
.fb-fab { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px 0 14px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink); font: inherit; font-weight: 650; font-size: .88rem; cursor: pointer; box-shadow: var(--shadow-lg); }
.fb-fab[hidden] { display: none; }
.fb-fab:hover { background: var(--surface-2); }
.fb-fab svg { width: 18px; height: 18px; flex: none; }
@media (max-width: 640px) {
  /* celular: só o ícone (a faixa de botões é estreita) */
  .fb-fab { width: 48px; height: 48px; padding: 0; justify-content: center; }
  .fb-fab span { display: none; }
}
@media print { .fb-fab { display: none !important; } }
