/* hs-results-cards-20260929: tariff lookup results as cards at every width (owner 2026-09-29:
   long descriptions squeezed into narrow table columns are not acceptable anywhere on the site).
   Reuses the site's own result card (white card, grey field labels from data-label) that
   styles.css already shows under 1100px, and applies it on wide screens too. Field order follows
   the current columns:
     Syrian (.hs-cols-syr): 1 code, 2 Arabic description, 3 English description, 4 category,
                            5 duty, 6 additional fee, 7 total, 8 source, 9 share
     GCC    (.hs-cols-gcc): 1 code, 2 Arabic description, 3 English description, 4 category,
                            5 duty, 6 source, 7 share
   Code and both descriptions run the full card width; short figures sit side by side. 
   Selectors repeat .hs-results-table three times on purpose: styles.css has tablet rules up to
   six classes deep (.hs-cols-syr.hs-cols-syr …) that would otherwise re-split the descriptions. */
html .public-site .section--hs-lookup:has(.hs-table-form) .hs-table-wrap {
  border: 0; border-radius: 0; overflow: visible; box-shadow: none; background: transparent;
}
html .public-site .section--hs-lookup:has(.hs-table-form) .hs-results-table.hs-results-table.hs-results-table,
html .public-site .section--hs-lookup:has(.hs-table-form) .hs-results-table.hs-results-table.hs-results-table tbody {
  display: block; width: 100%; table-layout: auto;
}
html .public-site .section--hs-lookup:has(.hs-table-form) .hs-results-table.hs-results-table.hs-results-table thead { display: none; }
html .public-site .section--hs-lookup:has(.hs-table-form) .hs-col-resize { display: none; }
html .public-site .section--hs-lookup:has(.hs-table-form) .hs-results-table.hs-results-table.hs-results-table tr {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; row-gap: 2px;
  width: 100%; background: var(--color-white); border: 1px solid var(--color-line); border-radius: 14px;
  box-shadow: 0 8px 20px rgba(7, 26, 47, .05); margin-bottom: 10px; padding: 12px 18px;
}
html .public-site .section--hs-lookup:has(.hs-table-form) .hs-results-table.hs-results-table.hs-results-table td {
  /* width !important: styles.css sizes each column in % with selectors up to 6 classes deep */
  display: block; width: auto !important; min-width: 0 !important; max-width: none; min-height: 0; border: 0; padding: 5px 0;
  font-size: .9rem; line-height: 1.5; overflow-wrap: break-word; word-break: normal; grid-column: auto;
}
html .public-site .section--hs-lookup:has(.hs-table-form) .hs-results-table.hs-results-table.hs-results-table td::before {
  content: attr(data-label); display: block; position: static; inset: auto; width: auto;
  color: #60778b; font-size: .7rem; font-weight: 850; letter-spacing: .02em; line-height: 1.3;
  margin-bottom: 2px; white-space: normal;
}
/* shared by both tables */
html .public-site .section--hs-lookup:has(.hs-table-form) .hs-results-table.hs-results-table.hs-results-table td:nth-child(1) {
  order: 1; grid-column: 1 / -1; font-size: 1.05rem; border-bottom: 1px solid var(--color-faint);
  padding-bottom: 8px; margin-bottom: 4px;
}
html .public-site .section--hs-lookup:has(.hs-table-form) .hs-results-table.hs-results-table.hs-results-table td:nth-child(2) { order: 2; grid-column: 1 / -1; }
html .public-site .section--hs-lookup:has(.hs-table-form) .hs-results-table.hs-results-table.hs-results-table td:nth-child(3) { order: 3; grid-column: 1 / -1; }
html .public-site .section--hs-lookup:has(.hs-table-form) .hs-results-table.hs-results-table.hs-results-table td:nth-child(5) { order: 4; }
/* Syrian */
html .public-site .section--hs-lookup:has(.hs-table-form) .hs-results-table.hs-results-table.hs-results-table.hs-cols-syr td:nth-child(6) { order: 5; }
html .public-site .section--hs-lookup:has(.hs-table-form) .hs-results-table.hs-results-table.hs-results-table.hs-cols-syr td:nth-child(7) { order: 6; }
html .public-site .section--hs-lookup:has(.hs-table-form) .hs-results-table.hs-results-table.hs-results-table.hs-cols-syr td:nth-child(4) { order: 7; }
html .public-site .section--hs-lookup:has(.hs-table-form) .hs-results-table.hs-results-table.hs-results-table.hs-cols-syr td:nth-child(8) { order: 8; grid-column: 1 / -1; font-size: .76rem; }
html .public-site .section--hs-lookup:has(.hs-table-form) .hs-results-table.hs-results-table.hs-results-table.hs-cols-syr td:nth-child(9) { order: 9; grid-column: 1 / -1; }
html .public-site .section--hs-lookup:has(.hs-table-form) .hs-results-table.hs-results-table.hs-results-table.hs-cols-syr td:nth-child(9)::before { display: none; }
/* GCC */
html .public-site .section--hs-lookup:has(.hs-table-form) .hs-results-table.hs-results-table.hs-results-table.hs-cols-gcc td:nth-child(4) { order: 5; }
html .public-site .section--hs-lookup:has(.hs-table-form) .hs-results-table.hs-results-table.hs-results-table.hs-cols-gcc td:nth-child(6) { order: 8; grid-column: 1 / -1; font-size: .76rem; }
html .public-site .section--hs-lookup:has(.hs-table-form) .hs-results-table.hs-results-table.hs-results-table.hs-cols-gcc td:nth-child(7) { order: 9; grid-column: 1 / -1; }
html .public-site .section--hs-lookup:has(.hs-table-form) .hs-results-table.hs-results-table.hs-results-table.hs-cols-gcc td:nth-child(7)::before { display: none; }
/* wider cards: figures four across, source and share on one line */
@media (min-width: 700px) {
  html .public-site .section--hs-lookup:has(.hs-table-form) .hs-results-table.hs-results-table.hs-results-table tr { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  html .public-site .section--hs-lookup:has(.hs-table-form) .hs-results-table.hs-results-table.hs-results-table.hs-cols-gcc td:nth-child(4) { grid-column: span 3; }
  html .public-site .section--hs-lookup:has(.hs-table-form) .hs-results-table.hs-results-table.hs-results-table.hs-cols-syr td:nth-child(8),
  html .public-site .section--hs-lookup:has(.hs-table-form) .hs-results-table.hs-results-table.hs-results-table.hs-cols-gcc td:nth-child(6) { grid-column: span 3; }
  html .public-site .section--hs-lookup:has(.hs-table-form) .hs-results-table.hs-results-table.hs-results-table.hs-cols-syr td:nth-child(9),
  html .public-site .section--hs-lookup:has(.hs-table-form) .hs-results-table.hs-results-table.hs-results-table.hs-cols-gcc td:nth-child(7) { grid-column: span 1; align-self: end; }
}
/* Labels on Arabic pages use the Arabic face with no letter spacing: the code cell is set in a
   monospace face and its label inherited it, which pulled «الكود الجمركي» apart letter by letter. */
html[dir="rtl"] .public-site .section--hs-lookup:has(.hs-table-form) .hs-results-table.hs-results-table.hs-results-table td::before {
  font-family: var(--font-arabic); letter-spacing: 0;
}
/* Search form labels on Arabic pages: no letter spacing (a Latin small-caps habit that pulls
   Arabic letters apart) and no case transform. */
html[dir="rtl"] .public-site .section--hs-lookup .hs-table-form .hs-table-form__field > span {
  letter-spacing: 0; text-transform: none;
}
