/* ==========================================================================
   TraceMyLetter.com - Printable Worksheet Stylesheet
   Optimized for US Letter (8.5 x 11 in) and A4 sheets
   ========================================================================== */

@page {
  size: letter portrait;
  margin: 0.35in 0.45in;
}

@media print {
  /* Hide all interactive app UI */
  .no-print,
  .app-header,
  .nav-tabs,
  .btn,
  .faq-section,
  .app-footer,
  .alphabet-pills,
  .alphabet-grid,
  .tracing-playground,
  .studio-options-card,
  .btn-sound,
  .star-counter,
  .name-input-box,
  .name-preset-chips {
    display: none !important;
  }

  body {
    background: #FFFFFF !important;
    color: #000000 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body::before {
    display: none !important;
  }

  .main-container {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .tab-pane {
    display: block !important;
  }

  /* Only show the active printable container */
  #tab-play, #tab-all {
    display: none !important;
  }

  .worksheet-studio-grid {
    display: block !important;
  }

  .worksheet-preview-area {
    display: block !important;
    width: 100% !important;
    gap: 0 !important;
  }

  .worksheet-page {
    width: 100% !important;
    max-width: none !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 0 1in 0 !important;
    page-break-inside: avoid;
    break-after: page;
  }

  .worksheet-page:last-child {
    break-after: auto;
    margin-bottom: 0 !important;
  }

  /* Force high contrast lines for printer inks */
  .sheet-guidelines-row .line-headline {
    border-top: 1.5px solid #64748B !important;
  }

  .sheet-guidelines-row .line-midline {
    border-top: 2px dashed #94A3B8 !important;
  }

  .sheet-guidelines-row .line-baseline {
    border-top: 2.5px solid #1E293B !important;
  }

  .sheet-coloring-box {
    border: 2px dashed #475569 !important;
    background: #FFFFFF !important;
  }

  .sheet-info-field {
    border-bottom: 2px solid #64748B !important;
  }

  .sheet-watermark {
    border-top: 1px solid #CBD5E1 !important;
    color: #64748B !important;
  }

  /* Print specific link text */
  a[href]:after {
    content: none !important;
  }
}
