/* ==========================================================================
   SEKHOBOOKS EARLY LEARNING PRESS - PRINT STYLESHEET (print.css)
   Clean, professional paper and PDF print-outs for parents and educators.
   Hides non-essential website navigation, headers, footers, interactive forms,
   and buttons on the Product Detail and Tax Invoice / Order Status pages.
   ========================================================================== */

/* Screen Defaults: Print-only elements remain hidden on browser view */
.print-only {
  display: none !important;
}

@media print {
  /* Page Setup & Margins for Standard A4 / Letter */
  @page {
    size: A4 portrait;
    margin: 12mm 12mm 15mm 12mm;
  }

  /* Reset layout, background colors, and typography for clean paper print */
  html,
  body {
    background-color: #ffffff !important;
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 11pt !important;
    line-height: 1.4 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    min-height: auto !important;
    box-shadow: none !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  /* -------------------------------------------------------------------------
     1. HIDE ALL NON-ESSENTIAL UI, NAVIGATION, HEADERS & BUTTONS
     ------------------------------------------------------------------------- */
  header,
  footer,
  nav,
  aside,
  button,
  input,
  textarea,
  select,
  form:not(.printable-form),
  .no-print,
  [data-no-print="true"],
  .cart-drawer,
  .sample-modal,
  .social-share-modal,
  .toast-container,
  .toast-notification,
  .floating-action-button,
  .whatsapp-floating-desk,
  .interactive-button,
  .search-tabs-container,
  .utr-submission-form,
  .faq-accordion-button,
  .related-products-section,
  .product-gallery-thumbnails,
  .purchase-cta-actions,
  .quick-preview-badge,
  .share-action-bar,
  /* Product detail non-essentials */
  .product-breadcrumbs,
  .product-quantity-selector,
  .add-to-bag-button,
  .buy-now-button,
  .look-inside-button,
  .share-snippet-button,
  .back-to-catalog-button,
  /* Invoice & order status non-essentials */
  .order-search-card,
  .order-lookup-form,
  .orders-selector-list,
  .utr-form-card,
  .whatsapp-verification-desk,
  .digital-send-actions,
  .customer-support-card {
    display: none !important;
  }

  /* -------------------------------------------------------------------------
     2. REVEAL AND FORMAT DEDICATED PRINT COMPONENTS
     ------------------------------------------------------------------------- */
  .print-only {
    display: block !important;
  }

  .print-flex {
    display: flex !important;
  }

  .print-grid {
    display: grid !important;
  }

  /* Expand main containers to full page width without screen constraints */
  main,
  #root,
  .max-w-7xl,
  .max-w-5xl,
  .max-w-4xl,
  .max-w-3xl {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: none !important;
  }

  /* -------------------------------------------------------------------------
     3. HIGH-CONTRAST TYPOGRAPHY & READABILITY
     ------------------------------------------------------------------------- */
  h1, h2, h3, h4, h5, h6 {
    color: #000000 !important;
    page-break-after: avoid;
    break-after: avoid;
  }

  p, span, td, th {
    color: #1e293b !important;
  }

  /* -------------------------------------------------------------------------
     4. PAGE BREAK CONTROLS
     ------------------------------------------------------------------------- */
  .avoid-page-break,
  .print-avoid-break,
  .invoice-card,
  .spec-card,
  table,
  tr,
  figure {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  /* Crisp table borders for invoices and specification tables */
  .border,
  .border-stone-200,
  .border-stone-300,
  .border-stone-400,
  .border-amber-200,
  .border-emerald-200 {
    border-color: #cbd5e1 !important;
  }

  /* Preserve essential colored badge and table header backgrounds */
  .bg-stone-50,
  .bg-stone-100,
  .bg-amber-50,
  .bg-emerald-50,
  .bg-sky-50 {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Invoice and spec sheets table layout */
  table.print-table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 9.5pt !important;
  }

  table.print-table th,
  table.print-table td {
    border: 1px solid #cbd5e1 !important;
    padding: 6px 10px !important;
  }

  table.print-table th {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    font-size: 8.5pt !important;
  }

  /* Clean print images */
  img {
    max-width: 100% !important;
    page-break-inside: avoid;
    break-inside: avoid;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Strip hyperlinked URL annotations */
  a[href]::after {
    content: "" !important;
  }

  /* Official print letterhead styling */
  .print-letterhead {
    border-bottom: 2px solid #0f172a !important;
    padding-bottom: 12px !important;
    margin-bottom: 16px !important;
  }

  /* Official print footer / authenticity notice */
  .print-footer-notice {
    border-top: 1px dashed #94a3b8 !important;
    padding-top: 10px !important;
    margin-top: 24px !important;
    font-size: 8pt !important;
    color: #64748b !important;
  }
}
