/* [Claude - 2026-11-09] COMPRA POR TAMANHO — estilo do bloco gerado por nv_compra_form() (inc.funcoes-especificas.php), para páginas com o tema padrão do site
   (index, detalhe). NÃO é usado pela vitrine (produtos), que tem as mesmas regras dentro de nova-vitrine.css. Tudo fica dentro de .nv-form, sem afetar o resto da página.
   As cores seguem o tema (Bootstrap/main.css): grafite = --bs-secondary, escuro = --bs-dark, vermelho = --bs-danger, foco rosa = --bs-focus-border-color. */
.nv-form {
    --nv-escuro: var(--bs-dark, #212529);
    --nv-grafite: var(--bs-secondary, #6c757d);
    --nv-preco: var(--bs-danger, #dc3545);
    --nv-texto: var(--bs-body-color, #212529);
    --nv-borda: var(--bs-border-color, #dee2e6);
    --nv-foco: var(--bs-focus-border-color, rgba(222, 49, 99, .5));
    --nv-desabilitado: var(--bs-secondary-bg, #e9ecef);
    margin: 10px 0 0;
    text-align: center;
}
.nv-form .nv-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.nv-form .nv-tamanhos { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 3px; margin: 0 0 8px; padding: 0; border: 0; min-width: 0; }
/* cada tamanho: letra em cima e, embaixo, o campo da quantidade (digitar já marca o tamanho) */
.nv-form .nv-tam { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 2px; width: 40px; }
.nv-form .nv-tam label { display: inline-flex; align-items: center; justify-content: center; width: 100%; min-width: 0; height: 42px; margin: 0; padding: 0 4px; border: 1px solid transparent; background: transparent; color: #495057; font-size: 1.05rem; font-weight: 400; line-height: 1; cursor: pointer; }
.nv-form .nv-tam label:hover { color: var(--nv-texto); }
.nv-form .nv-tam.is-ativo label { background: var(--nv-grafite); border-color: var(--nv-grafite); color: #fff; }
/* nome de tamanho longo (kits como "M/G/GG/XG"): a caixa acompanha o texto e o campo fica centralizado embaixo */
.nv-form .nv-tam.nv-tam--longo { width: auto; min-width: 40px; }
.nv-form .nv-tam--longo label { padding: 0 8px; white-space: nowrap; }
.nv-form .nv-tam--longo .nv-tam__qtd { align-self: center; width: 40px; }
.nv-form .nv-tam--indisp label { opacity: .35; text-decoration: line-through; background: transparent; cursor: not-allowed; }
.nv-form .nv-tam__qtd { display: block; width: 100%; min-width: 0; height: 32px; margin: 0; padding: 0 2px; border: 1px solid var(--nv-borda); border-radius: 0; background: #fff; color: var(--nv-texto); font-size: 1rem; font-weight: 300; line-height: 1; text-align: center; font-family: inherit; box-sizing: border-box; box-shadow: none; }
.nv-form .nv-tam__qtd::placeholder { color: #adb5bd; }
.nv-form .nv-tam__qtd:focus { border-color: var(--nv-foco); outline: none; box-shadow: none; }
.nv-form .nv-tam.is-ativo .nv-tam__qtd { border-color: var(--nv-grafite); font-weight: 400; }
.nv-form .nv-tam__qtd.is-invalido { border-color: var(--nv-preco); color: var(--nv-preco); }
/* linha do total (e dos avisos de mínimo/estoque), com a mesma largura do botão */
.nv-form .nv-resumo { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; margin: 0 auto 6px; width: 100%; max-width: 240px; font-size: .82rem; font-weight: 400; color: #495057; text-align: left; }
.nv-form .nv-resumo strong { font-weight: 400; color: var(--nv-texto); }
.nv-form .nv-resumo__erro { display: none; }
.nv-form .nv-resumo.tem-erro [data-nv-pecas], .nv-form .nv-resumo.tem-erro [data-nv-subtotal] { display: none; }
.nv-form .nv-resumo.tem-erro .nv-resumo__erro { display: block; width: 100%; text-align: center; color: var(--nv-preco); font-weight: 400; line-height: 1.25; }
.nv-form .nv-compra { display: flex; align-items: stretch; justify-content: center; width: 100%; max-width: 240px; margin: 0 auto; }
.nv-form .nv-botao { flex: 1 1 auto; min-width: 0; height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 12px; border: 1px solid var(--nv-escuro); border-radius: 0; background: var(--nv-escuro); color: #fff; font-size: .92rem; font-weight: 400; font-family: inherit; cursor: pointer; white-space: nowrap; transition: background-color .15s, border-color .15s, color .15s; }
.nv-form .nv-botao:hover:not(:disabled) { background: #000; }
/* botão delicado enquanto não há quantidade válida; vira o preto quando há (classe is-pronto, posta pelo JS) */
.nv-form .nv-botao:not(:disabled):not(.is-pronto) { background: #fff; border-color: #adb5bd; color: var(--nv-escuro); }
.nv-form .nv-botao:not(:disabled):not(.is-pronto):hover { background: #f1f3f5; }
.nv-form .nv-botao:disabled { background: var(--nv-desabilitado); border-color: var(--nv-borda); color: var(--nv-grafite); cursor: not-allowed; }
.nv-form .nv-botao--indisp .bi { display: none; }
.nv-form .nv-botao[aria-busy="true"] { opacity: .7; cursor: progress; }
.nv-form .nv-botao .bi { line-height: 1; }

/* Variação para a página de detalhe (nv_compra_form com a classe nv-form--detalhe): alinhado à esquerda e um pouco mais largo */
.nv-form.nv-form--detalhe { text-align: left; margin-top: 0; }
.nv-form--detalhe .nv-tamanhos { justify-content: flex-start; }
.nv-form--detalhe .nv-tam { width: 48px; }
.nv-form--detalhe .nv-tam.nv-tam--longo { width: auto; min-width: 48px; }
.nv-form--detalhe .nv-tam label { height: 46px; font-size: 1.1rem; }
.nv-form--detalhe .nv-tam__qtd { height: 36px; }
.nv-form--detalhe .nv-tam--longo .nv-tam__qtd { width: 48px; }
.nv-form--detalhe .nv-resumo, .nv-form--detalhe .nv-compra { max-width: 360px; margin-left: 0; margin-right: 0; }
.nv-form--detalhe .nv-resumo.tem-erro .nv-resumo__erro { text-align: left; }
.nv-form--detalhe .nv-botao { height: 46px; font-size: 1rem; }

/* Aviso (toast) de "Adicionado à sacola" — fica no topo da tela, fora do formulário */
.nv-toast { position: fixed; left: 50%; top: 12px; transform: translate(-50%, -140%); z-index: 1070; width: calc(100% - 32px); max-width: 420px; display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--bs-dark, #212529); color: #fff; font-size: .95rem; font-weight: 400; transition: transform .25s ease; }
.nv-toast.is-visivel { transform: translate(-50%, 0); }
.nv-toast.is-erro { background: var(--bs-danger, #dc3545); }
.nv-toast a { color: #fff; font-weight: 400; text-decoration: underline; white-space: nowrap; margin-left: auto; }
@media (prefers-reduced-motion: reduce) { .nv-toast { transition: none; } }
