/* ============================================
   Print Styles - Printer-Friendly Layout
   ============================================ */

@media print {
  /* Reset for print */
  *,
  *::before,
  *::after {
    background: white !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  /* Hide non-essential elements */
  .header,
  .footer,
  .mobile-nav,
  .btn,
  .decision-tool,
  .modal,
  [data-print-hide] {
    display: none !important;
  }

  /* Page setup */
  @page {
    size: A4;
    margin: 2cm;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
    font-family: Georgia, 'Times New Roman', serif;
  }

  /* Content layout */
  main {
    padding: 0;
  }

  .container {
    max-width: none;
    padding: 0;
  }

  /* Typography */
  h1 {
    font-size: 24pt;
    margin-bottom: 12pt;
    page-break-after: avoid;
  }

  h2 {
    font-size: 18pt;
    margin-top: 24pt;
    margin-bottom: 12pt;
    page-break-after: avoid;
    border-bottom: 1pt solid #333;
    padding-bottom: 6pt;
  }

  h3 {
    font-size: 14pt;
    margin-top: 18pt;
    margin-bottom: 8pt;
    page-break-after: avoid;
  }

  p {
    orphans: 3;
    widows: 3;
  }

  /* Links */
  a {
    text-decoration: underline;
  }

  a[href]::after {
    content: ' (' attr(href) ')';
    font-size: 9pt;
    color: #666 !important;
  }

  a[href^="#"]::after,
  a[href^="javascript"]::after {
    content: '';
  }

  /* Tables */
  table {
    border-collapse: collapse;
    width: 100%;
    margin: 12pt 0;
    font-size: 10pt;
  }

  th,
  td {
    border: 1pt solid #333;
    padding: 6pt 8pt;
    text-align: left;
  }

  th {
    font-weight: bold;
    background: #f0f0f0 !important;
  }

  /* Lists */
  ul,
  ol {
    margin-left: 18pt;
    margin-bottom: 12pt;
  }

  li {
    margin-bottom: 4pt;
  }

  /* Cards become simple boxes */
  .card {
    border: 1pt solid #333;
    padding: 12pt;
    margin-bottom: 12pt;
    page-break-inside: avoid;
  }

  /* Print-specific content */
  .print-only {
    display: block !important;
  }

  .screen-only {
    display: none !important;
  }

  /* Page breaks */
  .page-break-before {
    page-break-before: always;
  }

  .page-break-after {
    page-break-after: always;
  }

  .no-page-break {
    page-break-inside: avoid;
  }

  /* Quick reference specific */
  .quick-ref-print {
    display: block !important;
  }

  .quick-ref-print__header {
    text-align: center;
    margin-bottom: 24pt;
    border-bottom: 2pt solid black;
    padding-bottom: 12pt;
  }

  .quick-ref-print__title {
    font-size: 28pt;
    font-weight: bold;
    margin-bottom: 6pt;
  }

  .quick-ref-print__subtitle {
    font-size: 12pt;
    font-style: italic;
  }

  /* Tier table for print */
  .print-tier-table {
    width: 100%;
    font-size: 9pt;
  }

  .print-tier-table th {
    background: #e0e0e0 !important;
    font-size: 8pt;
    text-transform: uppercase;
  }

  .print-tier-table td {
    vertical-align: top;
  }

  .print-tier-table .tier-name {
    font-weight: bold;
  }

  /* Partner-only checklist for print */
  .print-checklist {
    columns: 2;
    column-gap: 24pt;
  }

  .print-checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 6pt;
    margin-bottom: 6pt;
    page-break-inside: avoid;
  }

  .print-checklist-box {
    width: 12pt;
    height: 12pt;
    border: 1pt solid black;
    flex-shrink: 0;
    margin-top: 2pt;
  }

  .print-checklist-text {
    font-size: 10pt;
  }

  /* Principles for print */
  .print-principles {
    border: 2pt solid black;
    padding: 12pt;
    margin: 18pt 0;
  }

  .print-principles__title {
    font-weight: bold;
    font-size: 12pt;
    margin-bottom: 8pt;
    text-transform: uppercase;
  }

  .print-principles__list {
    list-style: decimal;
    margin-left: 18pt;
  }

  .print-principles__item {
    margin-bottom: 6pt;
  }

  /* Decision tree for print */
  .print-decision-tree {
    font-family: 'Courier New', monospace;
    font-size: 10pt;
    white-space: pre;
    background: #f5f5f5 !important;
    padding: 12pt;
    border: 1pt solid #333;
  }

  /* Time limits box */
  .print-time-limits {
    border: 2pt solid black;
    padding: 12pt;
    margin: 12pt 0;
  }

  .print-time-limits__title {
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 8pt;
  }

  .print-time-limits__item {
    display: flex;
    justify-content: space-between;
    padding: 4pt 0;
    border-bottom: 1pt dotted #999;
  }

  .print-time-limits__item:last-child {
    border-bottom: none;
  }

  /* Footer for print */
  .print-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 8pt;
    color: #666 !important;
    padding-top: 6pt;
    border-top: 1pt solid #ccc;
  }
}

/* Print button (screen only) */
.print-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.print-btn__icon {
  width: 18px;
  height: 18px;
}

@media print {
  .print-btn {
    display: none !important;
  }
}
