/* ==========================================================================
   Gerador de proposta: botão, painel lateral e documento A4 para PDF
   ========================================================================== */

/* ------------------------------------------------------------ botão -- */

.proposta-btn { width: auto !important; gap: 8px; padding: 0 16px 0 13px !important; border-radius: 99px !important; background: var(--grad) !important; color: #fff !important; font: 600 14px/1 var(--f-corpo); box-shadow: 0 6px 18px -6px rgba(227, 6, 19, .7) !important; }
.proposta-btn svg { width: 17px; height: 17px; }

/* ------------------------------------------------------------ painel -- */

.pp { position: fixed; inset: 0; z-index: 200; font-family: var(--f-corpo); color: var(--texto); }
.pp[hidden] { display: none; }
.pp__fundo { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); backdrop-filter: blur(4px); }
.pp__caixa { position: absolute; top: 0; right: 0; bottom: 0; display: flex; flex-direction: column; width: min(560px, 100vw); background: #0d0c0e; box-shadow: -1px 0 0 rgba(255, 255, 255, .08), -30px 0 60px rgba(0, 0, 0, .6); animation: pp-entra .35s var(--ease); }
@keyframes pp-entra { from { transform: translateX(40px); opacity: 0; } }

.pp__topo { display: flex; align-items: flex-start; justify-content: space-between; padding: 22px 26px 16px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.pp__topo small { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--vermelho-claro); }
.pp__topo h2 { margin: 4px 0 0; font: 600 24px/1.1 var(--f-titulo); letter-spacing: -.02em; }
.pp__x { width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .06); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }
.pp__x:hover { background: rgba(255, 255, 255, .12); }

.pp__corpo { flex: 1; overflow-y: auto; padding: 8px 26px 24px; overscroll-behavior: contain; }
.pp__bloco { padding: 18px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.pp__bloco h3 { margin: 0 0 12px; font: 600 15px/1.2 var(--f-titulo); }
.pp__bloco-topo { display: flex; align-items: baseline; justify-content: space-between; }

.pp-campo { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.pp-campo span { font-size: 12px; font-weight: 500; color: var(--texto-2); }
.pp input, .pp textarea { width: 100%; padding: 10px 12px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 10px; background: rgba(255, 255, 255, .04); color: #fff; font: 14px/1.4 var(--f-corpo); outline: none; transition: border-color .2s; }
.pp input:focus, .pp textarea:focus { border-color: var(--vermelho-claro); background: rgba(255, 255, 255, .06); }
.pp input[type="date"] { color-scheme: dark; }
.pp textarea { resize: vertical; }
.pp-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.pp-logo { display: flex; gap: 16px; align-items: center; margin: 4px 0 14px; }
.pp-logo__previa { display: grid; place-items: center; flex: none; width: 120px; height: 80px; padding: 10px; border-radius: 12px; background: #fff; }
.pp-logo__previa img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pp-logo__previa span { font-size: 12px; color: #999; }
.pp-logo__acoes { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.pp-logo__acoes small { font-size: 11.5px; line-height: 1.4; color: var(--suave); }

.pp-botao { display: inline-flex; align-items: center; justify-content: center; padding: 9px 14px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 99px; background: rgba(255, 255, 255, .05); color: #fff; font: 600 13px/1 var(--f-corpo); cursor: pointer; }
.pp-botao:hover { background: rgba(255, 255, 255, .1); }
.pp-botao--linha { width: 100%; margin-top: 8px; border-style: dashed; border-radius: 10px; }
.pp-link { padding: 0; border: 0; background: none; color: var(--vermelho-claro); font: 600 12.5px/1 var(--f-corpo); cursor: pointer; }
.pp-link:hover { text-decoration: underline; }

.pp-opcoes { display: grid; gap: 6px; }
.pp-opcao { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, .03); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); cursor: pointer; }
.pp-opcao:has(input:checked) { background: rgba(227, 6, 19, .1); box-shadow: inset 0 0 0 1px rgba(227, 6, 19, .45); }
.pp-opcao input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--vermelho); flex: none; }
.pp-opcao span { display: flex; flex-direction: column; gap: 2px; }
.pp-opcao b { font-size: 13.5px; font-weight: 600; }
.pp-opcao small { font-size: 12px; color: var(--suave); }

.pp-tabela__cab, .pp-linha { display: grid; grid-template-columns: 1fr 64px 120px 28px; gap: 6px; align-items: center; }
.pp-tabela__cab { margin-bottom: 6px; font-size: 11.5px; font-weight: 600; color: var(--suave); }
.pp-linha { margin-bottom: 6px; }
.pp-linha input { padding: 8px 10px; font-size: 13px; }
.pp-x-linha { width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: var(--suave); font-size: 18px; cursor: pointer; }
.pp-x-linha:hover { background: rgba(255, 255, 255, .08); color: #fff; }

.pp-totais { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; margin-top: 14px; }
.pp-campo--inline { flex-direction: row; align-items: center; gap: 10px; margin: 0; }
.pp-campo--inline input { width: 130px; text-align: right; }
.pp-totais p { margin: 0; font-size: 13px; color: var(--texto-2); }
.pp-totais b { display: inline-block; min-width: 130px; text-align: right; color: #fff; }
.pp-totais__total { font-size: 16px !important; }
.pp-totais__total b { font: 700 20px/1 var(--f-titulo); }

.pp__rodape { display: flex; align-items: center; justify-content: space-between; padding: 16px 26px; border-top: 1px solid rgba(255, 255, 255, .08); background: #0a090b; }
.pp-gerar { display: inline-flex; align-items: center; gap: 10px; padding: 13px 22px; border: 0; border-radius: 99px; background: var(--grad); color: #fff; font: 600 15px/1 var(--f-corpo); cursor: pointer; box-shadow: 0 10px 24px -10px rgba(227, 6, 19, .9); }
.pp-gerar svg { width: 18px; height: 18px; }
.pp-gerar:hover { filter: brightness(1.08); }

/* ------------------------------------------- documento: só na impressão -- */

#proposta-doc { display: none; }

@media print {
  @page { size: A4 portrait; margin: 0; }

  html.imprimindo-proposta, body.imprimindo-proposta { height: auto !important; min-height: 0 !important; overflow: visible !important; background: #fff !important; }
  body.imprimindo-proposta > *:not(#proposta-doc) { display: none !important; }
  body.imprimindo-proposta #proposta-doc { display: block; }

  #proposta-doc { color: #111; font-family: var(--f-corpo); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #proposta-doc em { font-style: normal; color: #e30613; }

  .pd-pagina { position: relative; box-sizing: border-box; width: 210mm; min-height: 297mm; padding: 13mm 16mm 11mm; page-break-after: always; break-after: page; }
  .pd-pagina:last-child { page-break-after: auto; break-after: auto; }

  .pd-cab { display: flex; align-items: center; gap: 10px; margin-bottom: 8mm; padding-bottom: 4mm; border-bottom: 1px solid #e8e6e2; }
  .pd-cab img { height: 7mm; width: auto; }
  .pd-cab span { font-size: 9pt; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #888; }
  .pd-cab .pd-cab__cliente { height: 9mm; max-width: 40mm; margin-left: auto; object-fit: contain; }

  .pd-rot { margin: 0 0 2mm; font-size: 9pt; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #e30613; }
  .pd-pagina h2 { margin: 0 0 6mm; font: 600 24pt/1.05 var(--f-titulo); letter-spacing: -.03em; }
  .pd-intro { margin: -2mm 0 6mm; font-size: 10.5pt; color: #4b4b52; }

  /* capa */
  .pd-capa { display: flex; flex-direction: column; padding: 18mm; background: #050505; color: #fff; }
  .pd-capa::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 95% 0%, rgba(227, 6, 19, .55), transparent 45%), radial-gradient(circle at 0% 100%, rgba(255, 90, 60, .18), transparent 45%); }
  .pd-capa > * { position: relative; }
  .pd-capa__marca { height: 10mm; width: auto; align-self: flex-start; }
  .pd-capa__meio { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; flex: 1; gap: 4mm; }
  .pd-capa__cliente { max-width: 70mm; max-height: 30mm; margin-bottom: 8mm; padding: 5mm 7mm; border-radius: 4mm; background: #fff; object-fit: contain; }
  .pd-capa__rot { margin: 0; font-size: 11pt; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #ff5a4f; }
  .pd-capa h1 { margin: 0; font: 600 64pt/.95 var(--f-titulo); letter-spacing: -.05em; color: #fff; }
  .pd-capa h1 em { color: #ff3b30; }
  .pd-capa__para { margin: 4mm 0 0; font-size: 15pt; color: #d8d4cf; }
  .pd-capa__para b { color: #fff; }
  .pd-capa__contato { margin: 0; font-size: 11pt; color: #9a948d; }
  .pd-capa__meta { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; border-top: 1px solid rgba(255, 255, 255, .15); }
  .pd-capa__meta div { padding: 5mm 4mm 0 0; }
  .pd-capa__meta dt { font-size: 8pt; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #9a948d; }
  .pd-capa__meta dd { margin: 1.5mm 0 0; font-size: 10.5pt; color: #fff; }

  /* desafios */
  .pd-desafios { display: grid; gap: 5mm; }
  .pd-desafios div { padding: 6mm 7mm; border-radius: 4mm; background: #f7f6f4; border: 1px solid #e8e6e2; break-inside: avoid; }
  .pd-desafios span { font: 700 18pt/1 var(--f-titulo); color: #e30613; }
  .pd-desafios h4 { margin: 3mm 0 1.5mm; font: 600 14pt/1.2 var(--f-titulo); }
  .pd-desafios p { margin: 0; font-size: 10.5pt; line-height: 1.5; color: #4b4b52; }
  .pd-nota { margin-top: 7mm; font-size: 10.5pt; color: #4b4b52; }

  /* cartões de treinamento e assessoria */
  .pd-grade { display: grid; grid-template-columns: 1fr 1fr; gap: 5mm; }
  .pd-card { display: flex; flex-direction: column; gap: 2mm; padding: 5mm 5.5mm; border-radius: 4mm; border: 1px solid #e8e6e2; background: #fff; break-inside: avoid; page-break-inside: avoid; }
  .pd-card header { display: flex; align-items: center; justify-content: space-between; }
  .pd-card__num { font: 700 15pt/1 var(--f-titulo); color: #e30613; }
  .pd-card__pub { padding: 1mm 2.5mm; border-radius: 99px; background: rgba(227, 6, 19, .08); border: 1px solid rgba(227, 6, 19, .3); font-size: 7.5pt; font-weight: 600; color: #c4050f; }
  .pd-card h4 { margin: 1mm 0 0; font: 600 12pt/1.2 var(--f-titulo); }
  .pd-card__frase { margin: 0; font-size: 8.5pt; line-height: 1.45; color: #6b6b72; }
  .pd-card ol { margin: 1mm 0 0; padding: 0; list-style: none; counter-reset: pd; }
  .pd-card li { counter-increment: pd; display: grid; grid-template-columns: 6mm 1fr; padding: 1.2mm 0; border-top: 1px solid #f0eeea; font-size: 8.5pt; line-height: 1.35; color: #2a2a2e; }
  .pd-card li::before { content: counter(pd, decimal-leading-zero); font-size: 7.5pt; font-weight: 700; color: #e30613; }
  .pd-auto { display: flex; align-items: center; gap: 3mm; margin: auto 0 0; padding: 2.5mm 3mm; border-radius: 2.5mm; background: #eef3ff; border: 1px solid #b9cdff; font-size: 8.5pt; line-height: 1.35; color: #0b2a7a; }
  .pd-auto b { color: #0747d6; }
  .pd-auto img { height: 4mm; width: auto; margin-left: auto; flex: none; }

  /* investimento */
  .pd-tabela { width: 100%; border-collapse: collapse; font-size: 10pt; }
  .pd-tabela th { padding: 3mm; border-bottom: 2px solid #111; text-align: left; font-size: 8.5pt; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #555; }
  .pd-tabela td { padding: 2.4mm 3mm; border-bottom: 1px solid #e8e6e2; }
  .pd-tabela th:nth-child(n+2), .pd-tabela td:nth-child(n+2) { text-align: right; white-space: nowrap; }
  .pd-tabela tfoot td { border-bottom: 0; padding: 2mm 3mm; color: #4b4b52; }
  .pd-tabela tfoot td:first-child { text-align: right; }
  .pd-tabela__total td { padding-top: 4mm !important; border-top: 2px solid #111; font: 700 15pt/1 var(--f-titulo); color: #111 !important; }
  .pd-tabela__total td:last-child { color: #e30613 !important; }
  .pd-vazio { text-align: center !important; color: #999; }
  .pd-bloco { margin-top: 7mm; break-inside: avoid; }
  .pd-bloco h4 { margin: 0 0 2mm; font: 600 11pt/1.2 var(--f-titulo); }
  .pd-bloco p { margin: 0; font-size: 10pt; line-height: 1.55; color: #4b4b52; }
  .pd-validade { margin-top: 7mm; font-size: 9.5pt; color: #6b6b72; }
  .pd-assinaturas { display: grid; grid-template-columns: 1fr 1fr; gap: 14mm; margin-top: 24mm; break-inside: avoid; }
  .pd-assinaturas span { display: block; border-top: 1px solid #111; }
  .pd-assinaturas p { margin: 2mm 0 0; text-align: center; font-size: 9.5pt; color: #4b4b52; }
}
