/* Language-aware print rules (no design changes) */
@media print {
  /* Kurdish: RTL + K24 Kurdish Light */
  html[lang="ku"], html.ku {
    direction: rtl;
  }
  html[lang="ku"] body, html.ku body, 
  html[lang="ku"] body *, html.ku body * {
    font-family: "K24 Kurdish Light", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important;
    text-align: start; /* logical alignment to avoid layout shifts */
  }

  /* English: LTR + existing English font stack (inherit) */
  html[lang="en"], html:not([lang]), html[lang^="en-"] {
    direction: ltr;
  }
  html[lang="en"] body, html:not([lang]) body, html[lang^="en-"] body,
  html[lang="en"] body *, html:not([lang]) body *, html[lang^="en-"] body * {
    font-family: inherit !important;
    text-align: start;
  }

  /* Inputs and tables should inherit correctly when printed */
  input, textarea, select, button, table, th, td {
    direction: inherit;
  }
}


/* v1.4.3: Clean print — hide interactive controls (applies to all languages) */
@media print {
  /* Generic interactive elements */
  button,
  [type="button"],
  [type="submit"],
  [type="reset"],
  a.btn, .btn, .btn-group, .btn-toolbar,
  .actions, .action, .action-buttons, .toolbar, .controls,
  .dropdown, .dropdown-menu, .dropdown-toggle,
  .select2, .select2-container, .selectize-control, .choices, .choices__list, .choices__inner,
  .autocomplete, .ui-autocomplete, .ui-menu,
  .modal, .modal-backdrop, .toast, .alert-dismissible,
  .pagination, .page-link, .page-item,
  .badge.btn, .chip.btn, .pill.btn,
  .fab, .speed-dial,
  .no-print,
  [data-no-print],
  [role="button"],
  [data-action],
  [data-toggle="dropdown"] {
    display: none !important;
    visibility: hidden !important;
  }

  /* Common form wrappers that only hold controls */
  .input-group, .input-group-append, .input-group-prepend,
  .form-actions, .form-buttons, .filters, .search-bar, .search-controls {
    display: none !important;
    visibility: hidden !important;
  }

  /* Purchases & Online Orders specific (best-effort selectors) */
  #purchases .btn, #purchases .actions, #purchases .toolbar,
  #online-orders .btn, #online-orders .actions, #online-orders .toolbar,
  [data-section="purchases"] .btn, [data-section="online-orders"] .btn {
    display: none !important;
    visibility: hidden !important;
  }
}
