/* =========================================================================
   print.css — BAN IN

   Nguoi dung may tinh hay IN hai thu: trang tai lieu (mang xuong xuong doc)
   va ghi chu phat hanh / thong tin ban quyen (dinh kem ho so mua hang).

   NGUYEN TAC BAN IN:
     1. Bo het thu khong in duoc: thanh nav, nut bam, toast, hop thoai.
     2. Chu den tren giay trang — nen mau vua ton muc vua lam chu kho doc,
        va nhieu may in mac dinh bo qua nen.
     3. Hien duong dan sau moi lien ket — tren giay khong bam duoc.
     4. Khong cat doi tieu de va bang giua hai trang giay.

   Nap CUOI CUNG. Chi co hieu luc khi in (@media print).
   ========================================================================= */

@media print {

  /* ── 1. Bo phan khong thuoc ve trang giay ──────────────── */
  .nav, .topbar, .drawer, .totop, .toasts, .mobar,
  .lightbox, .modal, .pal, .langsw, .theme-btn, .findbtn,
  .burger, .progress, .acct, .car-nav, .tblbar,
  .skip-link, .deco, .hero__badges, .hero__gear,
  .marquee, .video__play, .composer, .filters,
  [data-account-slot], [data-palette-open] {
    display: none !important;
  }

  /* Nut bam khong con y nghia tren giay. Rieng nut DANG LA LIEN KET (the <a>)
     thi giu lai — duong dan cua no se duoc in ra o luat so 3. */
  button, .btn--primary, .btn--ghost:not(a) { display: none !important; }

  /* ── 2. Chu den tren giay trang ─────────────────────────── */
  :root {
    --surface: #fff; --surface-2: #fff; --surface-3: #fff; --card: #fff;
    --text: #000; --text-muted: #333; --text-faint: #555;
    --border: #bbb; --border-strong: #999;
    --accent: #000; --accent-solid: #000; --accent-fg: #fff; --accent-soft: #f0f0f0;
    --sh-sm: none; --sh-md: none; --sh-lg: none; --sh-xl: none; --sh-glow: none;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
    line-height: 1.5;
  }

  .card, .shot, .callout, .req, .titleblock, .lic {
    border: 1px solid #bbb !important;
    box-shadow: none !important;
    break-inside: avoid;
  }

  /* ── 3. In duong dan sau lien ket ───────────────────────── */
  /* Chi in duong dan NGOAI trang (http) va tep tai ve — neo trong trang
     (#tai-ve) in ra chi to rac. */
  a[href^="http"]::after,
  a[href$=".pdf"]::after,
  a[href$=".exe"]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #555;
    word-break: break-all;
  }

  /* ── 4. Khong cat doi giua hai trang giay ───────────────── */
  h1, h2, h3 { break-after: avoid; }
  .rel__item, .faq__item, .step, .machine, tr { break-inside: avoid; }
  thead { display: table-header-group; }   /* lap lai dong tieu de bang */

  /* ── 5. Bo cuc mot cot ──────────────────────────────────── */
  .docs, .split, .forum, .contact, .profile, .showcase {
    display: block;
  }
  .docs__nav, .forum__side, .board { display: none; }
  .docs__body { max-width: none; }

  .section { padding-block: 0 18pt; }
  .container { max-width: none; padding: 0; }

  /* Anh: vua trang giay, khong tran. */
  img { max-width: 100% !important; break-inside: avoid; }

  /* Bang: tra ve dang bang that (mobile.css co the da xep thanh the). */
  .tbl, .tbl thead, .tbl tbody, .tbl tr, .tbl td, .tbl th {
    display: revert;
  }
  .tbl td::before { content: none; }
  .tablewrap { overflow: visible; border: 0; }

  /* Le trang giay. */
  @page { margin: 16mm 14mm; }
}
