/* ═══════════════════════════════════════════════════════════════════════
   REVERB WORKBOOK — PRINT.CSS
   Estilos para geração de PDF (server-side via Puppeteer ou print direto)
   ═══════════════════════════════════════════════════════════════════════ */

@page {
  size: A4;
  margin: 20mm 18mm;
}

@media print {
  /* Reset visual */
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }

  body {
    background: white !important;
    color: #1A1330 !important;
    font-size: 11pt;
  }

  /* Esconde UI shell */
  .top-progress,
  .header,
  .sidebar,
  .toast,
  .canvas__toolbar,
  .footer-actions,
  .bridge,
  .field__example-btn,
  .canvas__progress,
  .btn-icon,
  .nav-chapter__arrow {
    display: none !important;
  }

  /* Main full-width */
  .main {
    margin-left: 0 !important;
    margin-top: 0 !important;
  }
  .main__inner {
    padding: 0 !important;
    max-width: 100% !important;
  }

  /* Hero — simplificar */
  .stage-hero, .page-hero {
    margin: 0 0 24px !important;
    padding: 32px !important;
    background: linear-gradient(135deg, #4B0082 0%, #8A2BE2 100%) !important;
    color: white !important;
    page-break-inside: avoid;
    border-radius: 0 !important;
  }
  .stage-hero__waves { display: none !important; }
  .stage-hero h1, .page-hero h1 {
    font-size: 28pt !important;
    color: white !important;
  }
  .page-hero h1 { color: #1A1330 !important; }
  .page-hero { background: #F8F6FA !important; }

  /* Section */
  .section { page-break-inside: avoid; margin-bottom: 32px !important; }
  .section__title { font-size: 20pt !important; }

  /* Canvas no PDF — mostrar valores preenchidos como texto fluido */
  .canvas {
    border: 1.5px solid #4B0082 !important;
    box-shadow: none !important;
    page-break-inside: avoid;
    margin: 24px 0 !important;
  }
  .canvas__header {
    background: #F8F6FA !important;
  }

  /* Forçar exemplos a ficar fechados */
  .field__example { display: none !important; }

  /* Inputs como texto preenchido */
  .field__input,
  .field__textarea {
    border: none !important;
    background: transparent !important;
    padding: 4px 0 !important;
    box-shadow: none !important;
    color: #1A1330 !important;
    font-size: 11pt !important;
    border-bottom: 1px solid #E8DFEF !important;
    border-radius: 0 !important;
    min-height: auto !important;
  }
  .field__textarea {
    /* mostrar texto completo, sem scroll */
    height: auto !important;
    overflow: visible !important;
  }

  .persona-id__name, .persona-id__role {
    border-bottom: 1px solid #E8DFEF !important;
  }

  /* Esconde campos vazios */
  .field:has(.field__textarea:placeholder-shown):not(.field--required) {
    /* mantém pelo menos o label */
  }

  /* Quebras de página intencionais */
  .canvas { page-break-before: auto; }
  .stage-hero, .page-hero { page-break-after: auto; }

  /* Anel de progresso vira número simples */
  .canvas__progress-ring { display: none !important; }

  /* Callouts mais discretos */
  .callout { page-break-inside: avoid; }

  /* Roles table */
  .roles-table { page-break-inside: avoid; }
}
