/* Folha de checkout: sobe de baixo no celular, vira caixa central no desktop. */
.folha { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.folha-fundo { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); opacity: 0; transition: opacity .2s ease; }
.folha.aberta .folha-fundo { opacity: 1; }
.folha-cartao {
  position: relative; width: 100%; max-height: 92dvh; overflow-y: auto; background: #fff;
  border-radius: 22px 22px 0 0; padding: 10px 20px calc(20px + env(safe-area-inset-bottom));
  box-sizing: border-box; transform: translateY(100%); transition: transform .22s ease;
}
.folha.aberta .folha-cartao { transform: translateY(0); }
.folha-alca { width: 40px; height: 5px; border-radius: 3px; background: #d2d2d7; margin: 0 auto 12px; }
.folha-cabeca { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.folha-cabeca h2 { font-size: 22px; }
.folha-plano { color: #4a4a4f; font-size: 15px; margin-top: 4px; }
.folha-plano s { color: var(--apagado); margin-left: 4px; }
.folha-fechar {
  flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; background: #e9e9eb;
  font-size: 20px; line-height: 1; cursor: pointer; color: #4a4a4f;
}
.campo { display: block; margin-bottom: 14px; }
.campo > span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.campo input {
  width: 100%; box-sizing: border-box; min-height: 48px; padding: 10px 14px; font-size: 16px;
  border: 1px solid var(--borda-forte); border-radius: 12px; background: #fff; font-family: var(--fonte);
}
.campo input:focus { border-color: var(--marinho); outline: 0; box-shadow: 0 0 0 3px rgba(1, 25, 72, .18); }
.campo input.invalido { border-color: var(--vermelho); }
.campo small { display: block; font-size: 13px; color: var(--apagado); margin-top: 5px; }
.campo [data-erro] { color: var(--vermelho); }

fieldset { border: 0; padding: 0; margin: 0 0 14px; }
legend { font-size: 14px; font-weight: 600; margin-bottom: 8px; padding: 0; }
.opcoes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.opcao {
  display: flex; flex-direction: column; gap: 2px; padding: 12px; border: 1px solid var(--borda-forte);
  border-radius: 12px; cursor: pointer; min-height: 44px; position: relative;
}
.opcao input { position: absolute; opacity: 0; }
.opcao:has(input:checked) { border-color: var(--marinho); background: var(--limao-fundo); box-shadow: inset 0 0 0 1px var(--marinho); }
.opcao strong { font-size: 15px; }
.opcao small { font-size: 12px; color: var(--apagado); }

.bumps { display: grid; gap: 8px; }
.bump { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--borda); border-radius: 12px; cursor: pointer; }
.bump input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--marinho); }
.bump-texto { flex: 1; display: flex; flex-direction: column; }
.bump-texto strong { font-size: 15px; }
.bump-texto small { font-size: 12px; color: var(--apagado); }
.bump-preco { font-weight: 700; font-size: 14px; white-space: nowrap; }

.folha-aviso {
  background: rgba(255, 59, 48, .08); color: #b3261e; border: 1px solid rgba(255, 59, 48, .3);
  border-radius: 12px; padding: 12px 14px; font-size: 14px; margin-bottom: 12px;
}
.folha .botao { width: 100%; min-width: 0; }
.folha-seguro { font-size: 13px; color: var(--apagado); text-align: center; margin-top: 12px; }

@media (min-width: 768px) {
  .folha { align-items: center; }
  .folha-cartao { width: 520px; max-height: 90vh; border-radius: 22px; padding: 20px 28px 28px; transform: translateY(24px) scale(.98); opacity: 0; transition: transform .2s ease, opacity .2s ease; }
  .folha.aberta .folha-cartao { transform: none; opacity: 1; }
  .folha-alca { display: none; }
}
