/* ============================================================
   Recibo de Vale-Transporte (bluefix.com.br/recibo-online/recibo-vale-transporte/)
   Complementa o style6.css (cabeçalho, rodapé, cores e Bootstrap).
   Ao alterar este arquivo, troque o número no nome (vt2.css, vt3.css...)
   e atualize index.php e recibo-vt.php, para o cache do navegador não segurar a versão antiga.
   ============================================================ */

/* ── Página e formulário ───────────────────────────────── */
.vt-breadcrumb { font-size: .82rem; color: #8aa5bf; margin-bottom: .5rem; }
.vt-breadcrumb a { color: #cbd5e1; text-decoration: none; }
.vt-breadcrumb span { margin: 0 .3rem; }
.vt-hero-sub { max-width: 760px; margin: .5rem auto 0; }

.vt-ferramenta { background: #fff; border-radius: 12px; box-shadow: 0 6px 28px rgba(13,31,51,.12); padding: 1.7rem; }
.vt-ferramenta h2 { font-size: 1.25rem; font-weight: 700; color: var(--primary); margin-bottom: .2rem; }
.vt-ajuda { font-size: .85rem; color: #64748b; margin-bottom: 1rem; }
.vt-ferramenta label.rotulo { font-weight: 600; font-size: .85rem; margin-bottom: .2rem; display: block; color: #334155; }
.vt-ferramenta .form-control, .vt-ferramenta .form-select { padding: .55rem .75rem; }
.vt-opc { font-weight: 400; color: #94a3b8; font-size: .8rem; }
.vt-bloco { border-top: 1px solid #eef2f6; padding-top: 1.1rem; margin-top: 1.1rem; }
.vt-bloco > h3 { font-size: .95rem; font-weight: 700; color: var(--primary); margin-bottom: .8rem; }

/* escolha do tipo de documento */
.vt-tipos { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .6rem; margin-bottom: 1.2rem; }
.vt-tipos input { position: absolute; opacity: 0; }
.vt-tipos label { border: 2px solid #e2e8f0; border-radius: 10px; padding: .7rem .85rem; cursor: pointer; margin: 0; display: block; height: 100%; background: #fff; transition: border-color .15s, background .15s; }
.vt-tipos label strong { display: block; font-size: .92rem; color: var(--primary); }
.vt-tipos label span { display: block; font-size: .78rem; color: #64748b; margin-top: .15rem; line-height: 1.35; }
.vt-tipos label:hover { border-color: #cbd5e1; }
.vt-tipos input:checked + label { border-color: var(--secondary); background: #fff7ed; }
.vt-tipos input:focus-visible + label { outline: 3px solid #93c5fd; outline-offset: 2px; }

/* logo */
.vt-logo-area { display: flex; gap: 1rem; align-items: flex-start; }
.vt-logo-previa { width: 150px; height: 70px; flex-shrink: 0; border: 2px dashed #cbd5e1; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #94a3b8; font-size: .75rem; text-align: center; padding: .3rem; background: #f8fafc; }
.vt-logo-previa img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* cálculo */
.vt-calculo { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: .9rem 1rem; font-size: .9rem; color: #334155; margin-top: .9rem; }
.vt-calculo dl { display: grid; grid-template-columns: 1fr auto; gap: .25rem 1rem; margin: 0; }
.vt-calculo dt { font-weight: 400; color: #64748b; }
.vt-calculo dd { margin: 0; font-weight: 700; text-align: right; }
.vt-calculo .total dt, .vt-calculo .total dd { color: var(--primary); border-top: 1px solid #e2e8f0; padding-top: .3rem; margin-top: .2rem; }

/* controle de entrega: linhas de colaboradores */
.vt-linha { display: grid; grid-template-columns: 2.2fr 1.4fr 1fr 1fr auto; gap: .5rem; align-items: start; margin-bottom: .5rem; }
.vt-linha .vt-remover { border: 0; background: #fee2e2; color: #b91c1c; border-radius: 8px; width: 2.4rem; height: 2.4rem; font-weight: 700; cursor: pointer; }
.vt-linha-cab { font-size: .75rem; font-weight: 700; color: #64748b; margin-bottom: .2rem; }

/* botões */
.vt-btn { display: block; text-align: center; background: var(--secondary); color: #fff; font-weight: 700; border: 0; border-radius: 10px; padding: .85rem 1rem; text-decoration: none; width: 100%; cursor: pointer; font-size: 1rem; }
.vt-btn:hover, .vt-btn:focus { background: #d48f18; color: #fff; }
.vt-btn-sec { display: inline-block; background: #fff; color: var(--primary); border: 2px solid #cbd5e1; font-weight: 600; font-size: .88rem; border-radius: 8px; padding: .5rem .9rem; cursor: pointer; text-decoration: none; }
.vt-btn-sec:hover, .vt-btn-sec:focus { border-color: var(--secondary); color: var(--primary); }
.vt-acoes { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .8rem; }
.vt-aviso-legal { background: #fff7ed; border-left: 4px solid var(--secondary); border-radius: 8px; padding: .7rem .9rem; font-size: .85rem; color: #1f2937; margin: 1.2rem 0 0; }
.vt-privado { font-size: .78rem; color: #64748b; margin: .8rem 0 0; }

/* ── Conteúdo ──────────────────────────────────────────── */
.vt-texto { background: #fff; border-radius: 12px; box-shadow: 0 4px 20px rgba(13,31,51,.08); padding: 1.8rem; }
.vt-texto h2 { font-size: 1.3rem; font-weight: 700; color: var(--primary); margin: 1.8rem 0 .7rem; }
.vt-texto h2:first-child { margin-top: 0; }
.vt-texto p, .vt-texto li { line-height: 1.7; }
.vt-texto a { color: var(--primary); font-weight: 600; }
.vt-resposta { background: #fff7ed; border-left: 4px solid var(--secondary); border-radius: 8px; padding: 1rem 1.2rem; line-height: 1.65; color: #1f2937; }
.vt-autoria { font-size: .82rem; color: #64748b; margin: .6rem 0 1.2rem; }
.vt-tabela { font-size: .92rem; }
.vt-tabela thead th { background: #eef2f6; color: var(--primary); }
.vt-figura { margin: 1rem 0; }
.vt-figura img { width: 100%; height: auto; border-radius: 10px; border: 1px solid #e2e8f0; }
.vt-figura figcaption { font-size: .8rem; color: #64748b; margin-top: .3rem; }
.vt-faq details { border-bottom: 1px solid #e2e8f0; padding: .8rem 0; }
.vt-faq summary { font-weight: 600; cursor: pointer; color: var(--primary); }
.vt-faq details p { margin: .6rem 0 0; color: #475569; }

/* ── Página do documento (recibo-vt.php) ───────────────── */
.vt-barra { background: var(--bg-dark); padding: .9rem 0; }
.vt-barra .container { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.vt-barra .vt-dica { color: #8aa5bf; font-size: .8rem; margin: 0; flex-basis: 100%; }
.vt-barra .form-check-label { color: #e2e8f0; font-size: .88rem; }
.vt-papel { background: #fff; width: 210mm; max-width: calc(100% - 24px); margin: 1.5rem auto 2.5rem; padding: 10mm; box-shadow: 0 6px 30px rgba(0,0,0,.18); }
.vt-vazio { max-width: 560px; margin: 3rem auto; text-align: center; background: #fff; border-radius: 12px; padding: 2rem; box-shadow: 0 4px 20px rgba(13,31,51,.08); }
.vt-anuncio:empty { display: none; }
.vt-anuncio { max-width: 210mm; margin: 1rem auto; text-align: center; }

/* ── O documento (tela, impressão e PDF) ───────────────── */
.vt-via { border: 1.5px solid #1f2937; border-radius: 3mm; padding: 4.5mm 6.5mm; font-family: Georgia, 'Times New Roman', serif; font-size: 9.6pt; line-height: 1.4; color: #111; background: #fff; break-inside: avoid; page-break-inside: avoid; }
.vt-topo { display: flex; align-items: center; gap: 5mm; border-bottom: 1px solid #9ca3af; padding-bottom: 2.5mm; margin-bottom: 3mm; }
.vt-logo { max-width: 46mm; max-height: 15mm; width: auto; height: auto; object-fit: contain; }
.vt-titulo h2 { font-family: 'Segoe UI', Arial, sans-serif; font-size: 12.5pt; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; margin: 0; color: #111; line-height: 1.2; }
.vt-titulo h2.longo { font-size: 11pt; }
.vt-sub { font-family: 'Segoe UI', Arial, sans-serif; font-size: 9pt; color: #374151; margin-top: 1mm; }
.vt-rotulo-via { margin-left: auto; font-family: 'Segoe UI', Arial, sans-serif; font-size: 8.5pt; color: #374151; border: 1px solid #9ca3af; padding: .8mm 3mm; border-radius: 2mm; white-space: nowrap; }
.vt-texto-doc { text-align: justify; margin: 0 0 1.8mm; }
.vt-tab { width: 100%; border-collapse: collapse; font-size: 9pt; margin: 1mm 0 2mm; }
.vt-tab th, .vt-tab td { border: 1px solid #6b7280; padding: 1.1mm 2mm; vertical-align: middle; }
.vt-tab th { background: #f1f5f9; font-family: 'Segoe UI', Arial, sans-serif; font-size: 8.5pt; text-align: left; }
.vt-tab td.num, .vt-tab th.num { text-align: right; white-space: nowrap; }
.vt-tab tr { break-inside: avoid; page-break-inside: avoid; }
.vt-tab .ass { width: 42mm; height: 9mm; }
.vt-tab tfoot td { font-weight: 700; background: #f8fafc; }
.vt-local { text-align: right; margin: 1.5mm 0 0; }
.vt-assinaturas { display: flex; gap: 10mm; margin-top: 8mm; }
.vt-ass { flex: 1; text-align: center; border-top: 1px solid #111; padding-top: .8mm; font-size: 9pt; line-height: 1.3; }
.vt-ass small { display: block; font-size: 8.5pt; color: #374151; }
.vt-testemunhas { margin-top: 7mm; font-size: 8.5pt; }
.vt-testemunhas .vt-assinaturas { margin-top: 8mm; }
.vt-corte { border-top: 1.5px dashed #6b7280; margin: 3.5mm -3mm; position: relative; text-align: center; }
.vt-corte span { position: relative; top: -.75em; background: #fff; padding: 0 3mm; font-family: 'Segoe UI', Arial, sans-serif; font-size: 8pt; color: #6b7280; }
.vt-falta { color: #94a3b8; font-style: italic; }

@media (max-width: 767.98px) {
    .vt-linha { grid-template-columns: 1fr 1fr; }
    .vt-linha .vt-remover { width: 100%; }
    /* só na visualização da tela: o documento do PDF e da impressão mantém o layout de folha A4 */
    .vt-papel { padding: 4mm; }
    .vt-papel .vt-via { padding: 4mm; font-size: 10pt; }
    .vt-papel .vt-topo { flex-wrap: wrap; }
    .vt-papel .vt-rotulo-via { margin-left: 0; }
    .vt-papel .vt-assinaturas { flex-direction: column; gap: 8mm; }
}
@media (max-width: 575.98px) {
    .vt-ferramenta, .vt-texto { padding: 1.1rem; }
    .vt-logo-area { flex-direction: column; }
    .hero-section h1 { font-size: 1.6rem; }
}

/* ── Impressão: só o documento ─────────────────────────── */
@media print {
    @page { size: A4; margin: 8mm 10mm; }
    html, body { background: #fff !important; }
    .site-header, .site-footer, .vt-barra, .vt-anuncio, .no-print { display: none !important; }
    .vt-papel { width: auto; max-width: none; margin: 0; padding: 0; box-shadow: none; }
    .vt-via { break-inside: avoid; page-break-inside: avoid; }
}
