/* 
 * Ember — Print Stylesheet
 * Optimized for A4 / Letter PDF export
 */

@media print {
  /* Reset everything to white background and black text for ink saving */
  :root {
    --bg-primary: #ffffff !important;
    --bg-secondary: #f8f9fa !important;
    --text-primary: #000000 !important;
    --text-secondary: #333333 !important;
    --text-muted: #666666 !important;
    --border-color: #dddddd !important;
    --primary: #000000 !important;
  }

  body {
    background-color: #ffffff !important;
    color: #000000 !important;
  }

  /* Hide interactive / non-essential elements */
  .navbar,
  .mobile-nav-drawer,
  .footer,
  .btn,
  .theme-toggle-btn,
  #btn-share-protocol,
  #btn-restart-checkin,
  #btn-export-pdf,
  .action-science-trigger,
  .action-science-body,
  .focus-mode-btn,
  .hamburger-btn,
  .decompress-trigger-btn,
  #decompress-modal,
  #focus-modal {
    display: none !important;
  }

  /* Ensure the container takes full width */
  .container {
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .protocol-grid {
    display: block !important;
  }

  .protocol-main, .protocol-sidebar {
    width: 100% !important;
    margin-bottom: 2rem !important;
  }

  /* Prevent page breaks inside important cards */
  .timeline-phase-card,
  .action-card,
  .subtask-card,
  .dashboard-card {
    page-break-inside: avoid;
    break-inside: avoid;
    border: 1px solid #ddd !important;
    background: #fff !important;
    box-shadow: none !important;
    margin-bottom: 1rem !important;
  }

  /* Style adjustments for print */
  .action-row {
    align-items: flex-start !important;
  }

  .action-checkbox {
    border-color: #000 !important;
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #000;
    border-radius: 4px;
    position: relative;
    top: 2px;
  }

  /* Add a header for the print version */
  body::before {
    content: "Ember — 48-Hour Survival Blueprint";
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 24pt;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #000;
  }

  /* Ensure text is clearly visible */
  * {
    text-shadow: none !important;
    filter: none !important;
  }

  .severity-pill {
    border: 2px solid #000 !important;
    background: transparent !important;
    color: #000 !important;
  }
}
