/* Печат. Разпечатката е каналът за доставка на резултата — тя ще се
   препраща на брокери и продавачи, затова дисклеймърът пътува с нея. */

@media print {
  @page {
    size: A4;
    margin: 16mm 14mm 18mm;
  }

  html { scroll-behavior: auto; }

  body {
    background: #fff !important;
    background-image: none !important;
    color: #000;
    font-size: 10.5pt;
    line-height: 1.45;
  }

  /* Скриваме всичко, което не е резултат */
  .masthead,
  .progress,
  .actionbar,
  .hero,
  .screen,
  .cta,
  .audit,
  .print-hide,
  .btn,
  form,
  nav {
    display: none !important;
  }

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

  /* Разгъваме всички секции — на хартия няма кликане */
  details { display: block !important; }
  details > summary { list-style: none; cursor: default; }
  .section__chev { display: none !important; }
  .section__body { display: block !important; padding-bottom: 8mm; }

  /* Заглавна част на разпечатката */
  .print-head {
    display: block !important;
    border-bottom: 1.5pt solid #000;
    padding-bottom: 3mm;
    margin-bottom: 6mm;
  }
  .print-head__title {
    font-family: var(--font-display);
    font-size: 13pt;
    font-weight: 600;
    margin: 0 0 1mm;
  }
  .print-head__meta { font-size: 8.5pt; color: #444; }

  .result { padding: 0; }
  .result h1 { font-size: 17pt; margin-bottom: 3mm; }
  .result__body { font-size: 11pt; }
  .result__band {
    border: 1pt solid #000 !important;
    background: none !important;
    color: #000 !important;
    font-size: 8pt;
  }
  .result__urgent {
    border: 1pt solid #000;
    border-left-width: 3pt;
    background: none;
  }

  /* Регистърът на категориите — чете се добре и в сиво */
  .ledger { break-inside: auto; }
  .ledger__row {
    break-inside: avoid;
    page-break-inside: avoid;
    border-left-width: 3pt;
    border-left-color: #000 !important;
    padding: 4mm 4mm 4mm 5mm;
  }
  .ledger__row[data-status='ok'] { border-left-style: solid; }
  .ledger__row[data-status='warn'] { border-left-style: dashed; }
  .ledger__row[data-status='risk'] { border-left-style: double; }
  .ledger__row[data-status='na'] { border-left-style: dotted; }

  .chip {
    border: 0.75pt solid #000 !important;
    background: none !important;
    color: #000 !important;
    font-size: 8pt;
  }
  .chip svg { display: none; }

  .section { break-inside: auto; }
  .section > summary { break-after: avoid; page-break-after: avoid; font-size: 12pt; padding: 4mm 0 2mm; }
  .section__items li { break-inside: avoid; page-break-inside: avoid; }
  .section__items li::before { border-color: #000; }
  .section__priority { border: 1pt solid #000; border-left-width: 3pt; background: none; }
  .flag-check { color: #000; }

  h1, h2, h3 { break-after: avoid; page-break-after: avoid; }
  a { color: #000; text-decoration: none; }
  a[href^='http']::after { content: ' (' attr(href) ')'; font-size: 8pt; color: #444; }

  .disclaimer {
    border: 1pt solid #000;
    padding: 3mm 4mm;
    margin: 6mm 0;
    font-size: 9pt;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* Блок за ръкописни бележки при оглед */
  .print-notes {
    display: block !important;
    break-before: page;
    page-break-before: always;
  }
  .print-notes h2 { font-size: 12pt; margin-bottom: 4mm; }
  .print-notes__lines {
    border-top: 0.5pt solid #999;
    height: 9mm;
  }

  .print-foot {
    display: block !important;
    border-top: 0.75pt solid #000;
    margin-top: 8mm;
    padding-top: 3mm;
    font-size: 8pt;
    color: #333;
  }

  .footer { border-top: 0.75pt solid #000; font-size: 8pt; color: #333; margin-top: 6mm; }
}

/* На екран тези блокове не съществуват */
.print-head, .print-notes, .print-foot { display: none; }
