/* Loaded only on the client homepage. */
.product-search, #datatableDiv { --search-purple: #7b2cbb; --search-ink: #211a30; --search-muted: #80758f; --search-border: #e1dfea; }
.product-search { padding: 12px 0 6px; color: var(--search-ink); }
.product-search [hidden], #datatableDiv [hidden] { display: none !important; }
.client-search-icon { display: inline-block; flex-shrink: 0; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.product-search__header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.product-search__title { margin: 0; font-size: clamp(22px, 2vw, 26px); font-weight: 700; line-height: 1.25; letter-spacing: -.6px; }
.product-search__help { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 0 6px 8px; border: 0; background: transparent; color: var(--search-purple); font-size: 13px; text-align: left; }
.product-search__help .client-search-icon { width: 23px; height: 23px; }
.product-search__field { position: relative; display: flex; align-items: stretch; gap: 12px; }
.product-search__query { display: flex; align-items: center; flex: 1; min-width: 0; gap: 8px; padding: 5px; border: 1px solid #ded0ec; border-radius: 12px; background: #fff; transition: border-color .18s ease, box-shadow .18s ease; }
.product-search__query:focus-within { border-color: #a36ac4; box-shadow: 0 0 0 3px #8e44ad12; }
.product-search__icon { display: inline-flex; margin: 0 8px 0 12px; color: #88709a; }
#searchinput { flex: 1; min-width: 0; width: 100%; height: 44px; padding: 4px 0; border: 0; outline: none; border-radius: 0; background: transparent; color: var(--search-ink); font-size: 16px; }
#searchinput::placeholder, #search-exclusion-input::placeholder { color: #918799; }
.product-search__submit { flex-shrink: 0; min-height: 44px; min-width: 132px; border: 0; border-radius: 11px; padding: 10px 24px; background: linear-gradient(120deg, #8e3bbb, #792daf); color: #fff; font-size: 14px; font-weight: 600; box-shadow: 0 3px 8px #762ea014; }
.product-search__clear { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: #f3f0f7; color: #7d718d; }
.product-search__clear .client-search-icon { width: 17px; height: 17px; }
.product-search__filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin-top: 12px; padding: 8px 16px 14px; border: 1px solid #e7e3ee; border-radius: 12px; background: #f8f9fc; }
.product-search__filters[data-has-words="false"] { grid-template-columns: 1fr; }
.product-search__details, .product-search__exclude-group { min-width: 0; }
.product-search__filters[data-has-words="true"] .product-search__exclude-group { padding-left: 20px; border-left: 1px solid #e7e3ee; }
.product-search__group-header { position: relative; display: flex; align-items: center; min-height: 44px; margin: 0 0 2px; gap: 0; }
.product-search__caption { margin: 0; font-size: 14px; font-weight: 600; line-height: 1.3; }
.product-search__info, .product-search__collapse, .product-search__wish { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 9px; background: transparent; color: #9184a5; }
.product-search__info { width: 36px; color: #a79cb6; }
.product-search__info .client-search-icon { width: 16px; height: 16px; }
.product-search__info[aria-expanded="true"] { color: var(--search-purple); background: #efe6f8; }
.product-search__wish { margin-left: auto; color: var(--search-purple); }
.product-search__collapse { margin-left: auto; color: #81728f; }
.product-search__wish + .product-search__collapse { margin-left: 0; }
.product-search__collapse .client-search-icon { transition: transform .22s ease; }
.product-search__collapse[aria-expanded="true"] .client-search-icon { transform: rotate(180deg); }
/* Extend the native collapse button across its header, keeping sibling actions separate. */
.product-search__group-header .product-search__collapse::before { content: ''; position: absolute; inset: 0; border-radius: 9px; cursor: pointer; }
.product-search__group-header .product-search__info, .product-search__group-header .product-search__wish { position: relative; z-index: 1; }
.product-search__group-header .product-search__collapse:focus-visible { outline: none; }
.product-search__group-header .product-search__collapse:focus-visible::before { outline: 2px solid #8d54b5; outline-offset: 2px; }
.product-search__group-header .product-search__collapse:active { transform: none; }
.product-search__group-body { min-width: 0; }
.product-search__words { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; }
.product-search__term, .product-search__exclusion { display: inline-flex; align-items: stretch; max-width: 100%; border: 1px solid #e2ccef; border-radius: 24px; background: #f3e9fa; color: #74319c; transition: color .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease; }
.product-search__word { display: inline-flex; align-items: center; gap: 7px; min-width: 0; max-width: 100%; min-height: 44px; padding: 5px 4px 5px 9px; border: 0; border-radius: 24px 0 0 24px; background: transparent; color: inherit; font-size: 13px; line-height: 20px; text-align: left; }
.product-search__word > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.product-search__word-mark { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg, #a04bc1, #7b2bb0); color: #fff; }
.product-search__word-mark svg { display: block; width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.product-search__term[data-enabled="false"], .product-search__exclusion[data-enabled="false"] { border-style: dashed; border-color: #ccc4d4; background: #fcfbfd; color: #79717f; }
.product-search__word[aria-pressed="false"] .product-search__word-mark { background: #e8e4eb; color: #766a7d; }
.product-search__exclusion { border-color: #ffc3ce; background: #fff0f3; color: #b42332; }
.product-search__word--exclude[aria-pressed="true"] .product-search__word-mark { background: linear-gradient(135deg, #ed6479, #c52541); }
.product-search__exclusion-remove { display: grid; place-items: center; flex-shrink: 0; width: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 0 24px 24px 0; background: transparent; color: inherit; }
.product-search__exclusion-remove .client-search-icon { width: 16px; height: 16px; }
.product-search__term:focus-within, .product-search__exclusion:focus-within { box-shadow: 0 0 0 3px #8e44ad14; }
.product-search__exclusions-summary { min-width: 0; max-width: 100%; }
/* Frequent words come first; a custom word is the rarer action. */
.product-search__exclusions-panel { display: flex; flex-direction: column; gap: 10px; }
.product-search__exclusion-form { order: 3; display: flex; align-items: stretch; gap: 8px; }
.product-search__exclusions-panel > .product-search__error { order: 4; margin: 0; }
.product-search__presets-label { order: 1; color: var(--search-muted); font-size: 12px; line-height: 1.3; }
#search-exclusion-input { flex: 1; min-width: 0; width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid #dcd9e7; border-radius: 10px; outline: none; background: #fff; color: var(--search-ink); font-size: 16px; transition: border-color .18s ease, box-shadow .18s ease; }
#search-exclusion-input:focus { border-color: #a36ac4; box-shadow: 0 0 0 3px #8e44ad12; }
#search-exclusion-input[aria-invalid="true"] { border-color: #c53040; }
.product-search__exclusion-add { flex-shrink: 0; min-height: 44px; padding: 9px 18px; border: 0; border-radius: 10px; background: #eadcf3; color: #7b2cbb; font-size: 13px; font-weight: 600; transition: background .18s ease; }
.product-search__presets { order: 2; display: flex; flex-wrap: wrap; gap: 6px; }
/* Presets read as "add" actions; a chosen one is already shown as a red chip above. */
.product-search__preset { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 44px; max-width: 100%; padding: 8px 14px 8px 11px; border: 1px dashed #d5cbe0; border-radius: 24px; background: #fff; color: #5d5070; font-size: 13px; line-height: 20px; transition: border-color .18s ease, background .18s ease, color .18s ease; }
.product-search__preset::before { content: '+'; color: #b23a52; font-size: 16px; font-weight: 600; line-height: 1; }
.product-search__preset [data-preset-mark] { display: none; font-size: 14px; }
.product-search__preset[aria-pressed="true"] { border-style: solid; border-color: transparent; background: #efecf3; color: #9a90a5; cursor: default; }
.product-search__preset[aria-pressed="true"]::before { content: none; }
.product-search__preset[aria-pressed="true"] [data-preset-mark] { display: inline; }
.product-search__error { margin: 8px 0 0; color: #b42332; font-size: 13px; line-height: 1.5; }
.product-search__suggestions { position: absolute; top: calc(100% + 7px); left: 0; right: 0; z-index: 1040; max-height: min(250px, 45vh); overflow-y: auto; padding: 6px; border: 1px solid #e2d9e8; border-radius: 12px; background: #fff; box-shadow: 0 8px 25px #2b15331a; animation: search-appear .16s ease-out; }
.product-search__suggestions [role="option"] { font-size: 13px; min-height: 44px; padding: 10px 14px; border-radius: 8px; cursor: pointer; color: #51405e; overflow-wrap: anywhere; }
.product-search__suggestions [role="option"][aria-selected="true"], .product-search__suggestions [role="option"]:hover { background: #f3e9fa; color: #74319c; }
.product-search__suggestions strong { font-weight: 700; color: #74319c; }
.client-search-tooltip { position: fixed; z-index: 1100; width: max-content; max-width: min(340px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow-y: auto; padding: 12px 14px; border: 1px solid #5b456c; border-radius: 12px; background: #362343; color: #fff; box-shadow: 0 8px 28px #27113228; font-size: 13px; font-weight: 400; line-height: 1.5; text-align: left; animation: search-appear .16s ease-out; }
.client-search-tooltip strong { font-weight: 600; }
.client-search-tooltip ul { margin: 6px 0 0; padding-left: 17px; }
.client-search-tooltip li + li { margin-top: 4px; }

/* Table controls stay compact; the native select also works on phones. */
#datatableDiv .dataTables_length label, #datatableDiv .page-link { font-size: 13px; }
#datatableDiv .client-table-toolbar { gap: 16px; margin: 16px 0 14px; }
.client-search-sort { display: flex; align-items: center; gap: 12px; color: var(--search-muted); font-size: 13px; }
.client-search-sort > label { margin: 0; }
.client-search-sort__field { display: flex; align-items: center; position: relative; min-width: 0; border: 1px solid var(--search-border); border-radius: 10px; background: #fff; }
.client-search-sort__field > .client-search-icon { position: absolute; left: 12px; width: 18px; height: 18px; pointer-events: none; color: var(--search-purple); }
.client-search-sort__field > .client-search-icon:last-child { left: auto; right: 10px; width: 15px; height: 15px; color: #7c6c8c; }
#search-sort { width: 240px; max-width: 100%; min-height: 44px; padding: 8px 30px 8px 38px; border: 0; border-radius: 10px; appearance: none; background: transparent; color: var(--search-ink); font-size: 13px; cursor: pointer; }
#datatableDiv .dataTables_length select { min-height: 44px; min-width: 80px; padding-right: 22px; border: 1px solid var(--search-border); border-radius: 10px; background-color: #fff; color: var(--search-ink); }
#datatableDiv table.dataTable { margin: 0 !important; border: 1px solid var(--search-border); border-radius: 12px; border-collapse: separate !important; border-spacing: 0; background: #fff; color: var(--search-ink); font-size: 13px; }
#datatable th, #datatable td { box-sizing: border-box; }
#datatable thead th { padding: 9px 14px; border-top: 0; border-bottom: 1px solid #e5e3ee; background: #f3f4f8; font-size: 12px; font-weight: 600; white-space: nowrap; }
#datatable .tb-small-cell { min-width: 0; max-width: none; }
#datatable thead th:first-child { border-radius: 11px 0 0 0; }
#datatable thead th:last-child { border-radius: 0 11px 0 0; }
#datatable thead th.sorting_asc, #datatable thead th.sorting_desc { background: #f3ebf9; color: #63348b; }
#datatable tbody td { padding: 5px 14px; border: 0; border-bottom: 1px solid #e9e7ef; background: transparent; }
#datatable tbody tr:last-child td { border-bottom: 0; }
#datatable tbody tr:last-child td:first-child { border-radius: 0 0 0 11px; }
#datatable tbody tr:last-child td:last-child { border-radius: 0 0 11px 0; }
#datatable tbody tr { background: #fff; animation: search-row .18s ease-out both; }
#datatable tbody tr:nth-child(2) { animation-delay: 15ms; }
#datatable tbody tr:nth-child(3) { animation-delay: 30ms; }
#datatable tbody tr:nth-child(4) { animation-delay: 45ms; }
#datatable tfoot { display: none; }
#datatable .client-search-date-heading { padding-top: 4px; padding-bottom: 4px; padding-right: 18px !important; }
.client-date-label { display: inline-block; vertical-align: middle; line-height: 1.3; }
#datatable .client-search-date-heading .product-search__info { width: 44px; min-height: 44px; margin-left: 0; vertical-align: middle; }
.client-offer__heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; min-width: 0; }
.client-offer__title { min-width: 0; }
.client-offer__name { overflow-wrap: anywhere; line-height: 1.4; }
#datatable .client-new-badge { margin: 3px 0 3px 7px; font-size: 10px; }
.client-offer__supplier { color: var(--search-purple); overflow-wrap: anywhere; }
.client-offer__updated { white-space: nowrap; color: #6f637f; font-variant-numeric: tabular-nums; }
.client-offer__quantity { display: inline-grid; grid-template-columns: 44px 44px 44px; width: 134px; min-width: 134px; overflow: hidden; border: 1px solid #e6e2ed; border-radius: 10px; background: #fbfafc; }
.client-offer__quantity button { display: grid; place-items: center; flex: 0 0 44px; width: 44px; min-height: 44px; padding: 0; border: 0; background: transparent; color: #6b6078; }
.client-offer__quantity button .client-search-icon { width: 15px; height: 15px; }
.client-offer__quantity input { min-width: 44px; width: 44px; padding: 2px; border: 0; border-right: 1px solid #e6e2ed; border-left: 1px solid #e6e2ed; border-radius: 0; background: #fff; color: var(--search-ink); font-size: 16px; text-align: center; }
.client-offer__actions { display: flex; justify-content: flex-end; gap: 8px; }
.client-offer__action { display: grid; place-items: center; flex: 0 0 44px; width: 44px; min-height: 44px; padding: 0; border: 1px solid #e2dfea; border-radius: 10px; background: #fcfbfe; color: #8a7d9d; }
.client-offer__action--cart { position: relative; border-color: #e5d4f6; background: #f8f2fe; color: var(--search-purple); }
/* Offer already in the basket: green button with a check badge in the corner. */
.client-offer__action--cart[data-in-basket="true"] { border-color: #a7dcbb; background: #edf9f1; color: #1f8a4c; }
.client-offer__action--cart[data-in-basket="true"]::after { content: ''; position: absolute; top: -6px; right: -6px; width: 16px; height: 16px; border: 2px solid #fff; border-radius: 50%; background: #22a559 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; animation: search-appear .18s ease-out; }
.client-offer__action--favorite[aria-pressed="true"] { border-color: #ffc3ce; background: #fff0f3; color: #c52541; }
.client-offer__action--favorite[aria-pressed="true"] .client-search-icon { fill: currentColor; }
.product-search button, .client-offer__action, .client-offer__quantity button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: background .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .12s ease; }
.product-search button:active, .client-offer__action:active, .client-offer__quantity button:active { transform: scale(.96); }
.product-search button:focus-visible, #datatableDiv button:focus-visible, #datatableDiv select:focus-visible, .client-offer__quantity input:focus-visible { outline: 2px solid #8d54b5; outline-offset: 3px; }
.product-search .is-new { animation: search-appear .18s ease-out; }
@keyframes search-appear { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: translateY(0); } }
@keyframes search-row { from { opacity: .3; } to { opacity: 1; } }
/* With a mouse the panel is compact; touch screens keep 44px targets. */
@media (pointer: fine) {
    .product-search__filters { gap: 16px; margin-top: 10px; padding: 6px 14px 10px; }
    .product-search__filters[data-has-words="true"] .product-search__exclude-group { padding-left: 16px; }
    .product-search__group-header { min-height: 32px; margin-bottom: 4px; }
    .product-search__info, .product-search__collapse, .product-search__wish { width: 32px; min-height: 32px; }
    .product-search__words { gap: 6px; }
    .product-search__word { gap: 6px; min-height: 30px; padding: 3px 2px 3px 5px; }
    .product-search__word-mark { width: 20px; height: 20px; }
    .product-search__word-mark svg { width: 12px; height: 12px; }
    .product-search__exclusion-remove { width: 30px; min-height: 30px; }
    .product-search__exclusion-remove .client-search-icon { width: 14px; height: 14px; }
    .product-search__exclusions-panel { gap: 8px; }
    .product-search__preset { min-height: 30px; padding: 4px 11px 4px 9px; }
    #search-exclusion-input { min-height: 34px; padding: 6px 10px; }
    .product-search__exclusion-add { min-height: 34px; padding: 6px 14px; }
}
@media (min-width: 768px) and (pointer: fine) {
    .product-search__exclusions-summary + .product-search__group-body .product-search__exclusions-panel { margin-top: 8px; padding-top: 8px; }
}
@media (hover: hover) {
    .product-search__preset[aria-pressed="false"]:hover { border-style: solid; border-color: #f1a9b7; background: #fff6f8; color: #b42332; }
    .product-search__submit:hover { box-shadow: 0 4px 14px #7b2cbb30; filter: brightness(1.04); }
    .product-search__help:hover, .product-search__info:hover, .product-search__collapse:hover, .product-search__wish:hover { color: var(--search-purple); background: #efe6f8; }
    .product-search__clear:hover { color: #6a2b98; background: #ece5f3; }
    .product-search__term:hover { border-color: #c5a3de; }
    .product-search__exclusion:hover { border-color: #ed9eae; }
    .product-search__word:hover, .product-search__exclusion-remove:hover { background: #71328f08; }
    .product-search__exclusion-add:hover { background: #ddc7ee; }
    #datatable tbody tr:hover { background: #faf8fd; }
    .client-offer__action:hover, .client-offer__quantity button:hover { border-color: #bd9ad8; background: #eee4f8; color: #7b2cbb; }
    .client-offer__action--cart[data-in-basket="true"]:hover { border-color: #7fc99b; background: #dff3e6; color: #187a42; }
}
@media (min-width: 768px) {
    .product-search__exclusions-summary + .product-search__group-body .product-search__exclusions-panel { margin-top: 12px; padding-top: 12px; border-top: 1px dashed #e2dcea; }
    #datatable { table-layout: fixed; }
    #datatable thead th:first-child { width: auto; }
    #datatable thead th:nth-child(2) { width: 96px; }
    #datatable thead th:nth-child(3) { width: 120px; }
    #datatable thead th:nth-child(4) { width: 140px; }
    #datatable thead th:nth-child(5) { width: 162px; }
    #datatable thead th:nth-child(6) { width: 124px; }
    #datatable tbody td:nth-child(2), #datatable tbody td:nth-child(4) { white-space: nowrap; }
    #datatable thead th { position: relative; }
}
@media (min-width: 768px) and (max-width: 1100px) {
    #datatable thead th { white-space: normal; }
    #datatable thead th:nth-child(2) { width: 76px; }
    #datatable thead th:nth-child(3) { width: 104px; }
    #datatable thead th:nth-child(4) { width: 140px; }
    #datatable thead th:nth-child(5) { width: 150px; }
    #datatable thead th:nth-child(6) { width: 112px; }
}
@media (max-width: 991px) {
    .product-search__filters { gap: 16px; padding-right: 14px; padding-left: 14px; }
    .product-search__filters[data-has-words="true"] .product-search__exclude-group { padding-left: 16px; }
    #datatable tbody td, #datatable thead th { padding-right: 8px; padding-left: 8px; }
}
@media (max-width: 767px) {
    #searchSection { margin-top: 12px !important; }
    .product-search { padding-top: 8px; }
    .product-search__header { margin-bottom: 12px; gap: 8px; }
    .product-search__title { font-size: 22px; letter-spacing: -.4px; }
    .product-search__field { gap: 4px; padding: 5px; border: 1px solid #ded0ec; border-radius: 12px; background: #fff; transition: box-shadow .18s ease, border-color .18s ease; }
    .product-search__field:focus-within { border-color: #a36ac4; box-shadow: 0 0 0 3px #8e44ad12; }
    .product-search__query { gap: 4px; padding: 0; border: 0; border-radius: 0; background: transparent; }
    .product-search__query:focus-within { box-shadow: none; }
    .product-search__icon { margin: 0 4px 0 6px; }
    .product-search__icon .client-search-icon { width: 19px; height: 19px; }
    #searchinput { font-size: 16px; }
    .product-search__submit { min-width: 76px; padding: 8px 12px; font-size: 13px; border-radius: 9px; }
    .product-search__filters { display: flex; flex-direction: column; gap: 12px; padding: 0; border: 0; background: transparent; }
    .product-search__details, .product-search__exclude-group { padding: 10px 12px 12px; border: 1px solid #e4e0ed; border-radius: 13px; background: #fafafe; }
    .product-search__filters[data-has-words="true"] .product-search__exclude-group, .product-search__exclude-group { padding-left: 12px; border: 1px solid #ffd3dc; background: #fff7f9; }
    .product-search__group-header { margin-bottom: 5px; }
    .product-search__words { gap: 7px; }
    .product-search__exclusions-panel { margin-top: 12px; padding: 10px; border: 1px solid #ffdae3; border-radius: 12px; background: #fff4f7; }
    .product-search__preset { padding: 8px 10px; font-size: 13px; }
    .product-search__exclusion-add { padding-right: 14px; padding-left: 14px; }
    .client-search-sort { display: grid; gap: 5px; min-width: 0; font-size: 13px; }
    .client-search-sort__field { width: 100%; }
    .client-search-sort__field > .client-search-icon { left: 8px; width: 16px; height: 16px; }
    .client-search-sort__field > .client-search-icon:last-child { right: 7px; }
    #search-sort { width: 100%; padding-left: 29px; padding-right: 24px; font-size: 13px; }
    #datatableDiv .client-table-toolbar { margin-top: 14px; }
    #datatableDiv .dataTables_length label { display: flex; gap: 8px; margin: 0; color: var(--search-muted); font-size: 13px; line-height: 1.5; }
    #datatableDiv .dataTables_length select { width: 100%; margin: 0; font-size: 13px; }
    #datatableDiv table.dataTable { display: block; border: 0; border-radius: 0; background: transparent; }
    #datatable thead { display: none; }
    #datatable tbody { display: grid; gap: 12px; width: 100%; }
    #datatable tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 12px; border: 1px solid #e3dfec; border-radius: 13px; box-shadow: 0 2px 5px #33204003; }
    #datatable tbody td { display: block; width: auto !important; padding: 0; border: 0; border-radius: 0 !important; }
    #datatable tbody .client-offer-name-cell { grid-column: 1 / -1; }
    .client-offer__heading { gap: 12px; }
    .client-offer__name { font-size: 13px; font-weight: 500; }
    .client-offer__price { flex-shrink: 0; color: #211a30; font-size: 16px; font-weight: 700; line-height: 1.4; }
    #datatable .client-new-badge { display: inline-flex; margin: 5px 0 0; font-size: 9px; }
    .client-offer__meta { display: flex; flex-direction: column; align-items: flex-start; gap: 0; margin-top: 6px; color: #80758f; font-size: 13px; }
    .client-offer__supplier-line { display: flex; align-items: center; gap: 8px; min-height: 28px; color: var(--search-purple); }
    .client-offer__supplier-line a { display: inline-flex; align-items: center; min-height: 28px; }
    .client-offer__meta .client-search-icon { width: 17px; height: 17px; }
    .client-offer__date { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin: -4px 0 0; padding: 0; border: 0; border-radius: 6px; background: transparent; color: #80758f; font-size: 13px; font-variant-numeric: tabular-nums; text-align: left; }
    .client-offer__date[aria-expanded="true"] { color: #7b2cbb; }
    .client-offer-quantity-cell { align-self: end; justify-self: start; }
    .client-offer-actions-cell { align-self: end; }
    .client-offer__action .client-search-icon { width: 22px; height: 22px; }
    #datatable_paginate .pagination { flex-wrap: wrap; justify-content: center; row-gap: 6px; }
    #datatable_paginate .page-link { display: grid; place-items: center; min-width: 40px; min-height: 44px; }
}
@media (max-width: 479px) {
    .product-search__help { justify-content: center; width: 44px; padding: 0; }
    .product-search__help > span { display: none; }
}
@media (max-width: 359px) {
    .product-search__title { font-size: 20px; }
    .product-search__icon { margin-left: 2px; margin-right: 0; }
    .product-search__clear { width: 44px; }
    .product-search__details, .product-search__exclude-group { padding-right: 10px; padding-left: 10px; }
    .product-search__exclusions-panel { padding: 8px; }
    .product-search__exclusion-form { flex-direction: column; }
    .product-search__word { font-size: 13px; gap: 6px; }
    .client-offer__heading { gap: 8px; }
    .client-offer__name { font-size: 13px; }
    .client-offer__price { font-size: 16px; }
    #search-sort { font-size: 12px; padding-left: 27px; padding-right: 20px; }
    #datatableDiv .dataTables_length label, .client-search-sort { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    .product-search *, #datatableDiv *, .client-search-tooltip { animation: none !important; transition: none !important; }
    .product-search button:active, .client-offer__action:active, .client-offer__quantity button:active { transform: none; }
}

/* HTML lists and the bottom page controls belong only to the search page. */
#datatableDiv .client-table-toolbar { display: flex; justify-content: flex-start; }
.client-search-sort__field { border: 0; }
.client-search-sort__field > .client-search-icon { z-index: 1; }
.client-search-sort__field > .client-search-icon:last-child { display: none; }
.client-select { display: inline-flex; position: relative; min-width: 0; }
.client-select__trigger { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid #e1dfea; border-radius: 10px; background: #fff; color: #211a30; font-size: 13px; line-height: 1.4; text-align: left; transition: border-color .16s, box-shadow .16s; }
.client-search-sort .client-select { width: 240px; max-width: 100%; }
.client-search-sort .client-select__trigger { padding-left: 38px; }
.client-select__trigger:hover, .client-select__trigger[aria-expanded="true"] { border-color: #b78bd1; background: #fcfaff; }
.client-select__trigger:focus-visible { outline: 2px solid #8d54b5; outline-offset: 2px; }
.client-select__arrow { width: 7px; height: 7px; flex-shrink: 0; border-right: 1.5px solid #80758f; border-bottom: 1.5px solid #80758f; transform: rotate(45deg) translateY(-2px); }
.client-select__menu { position: fixed; z-index: 1120; overflow-y: auto; overscroll-behavior: contain; padding: 5px; border: 1px solid #e1dfea; border-radius: 12px; background: #fff; box-shadow: 0 8px 28px #27113224; animation: search-appear .16s ease-out; }
.client-select__menu[hidden] { display: none; }
.client-select__option { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 44px; padding: 9px 10px; border: 0; border-radius: 7px; background: #fff; color: #51405e; font-size: 13px; text-align: left; }
.client-select__option:hover, .client-select__option:focus { outline: none; background: #f7f1fb; }
.client-select__option[aria-selected="true"] { background: #f1e6f9; color: #74319c; font-weight: 600; }
.client-select__option[aria-selected="true"]::after { content: '✓'; }
#datatableDiv .client-table-bottom { display: flex; align-items: center; justify-content: flex-end; gap: 12px 24px; margin: 14px 0 0; padding: 12px 0; border-top: 1px solid #eeeaf3; }
#datatableDiv .dataTables_length { margin-right: 0; }
#datatableDiv .dataTables_length label { display: flex; align-items: center; gap: 10px; margin: 0; }
#datatableDiv .dataTables_length .client-select { width: 80px; }
#datatableDiv .dataTables_info { width: 100%; padding: 0; color: #80758f; font-size: 12px; text-align: right; }
#datatableDiv .dataTables_paginate { padding: 0; }
#datatable_paginate .pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; margin: 0; }
#datatable_paginate .page-link { display: grid; place-items: center; min-width: 44px; min-height: 44px; margin: 0; padding: 8px; border: 1px solid #e1dfea; border-radius: 9px; background: #fff; color: #796889; font-size: 13px; transition: background .16s, color .16s; }
#datatable_paginate .page-item.active .page-link { background: #7b2cbb; border-color: #7b2cbb; color: #fff; box-shadow: 0 2px 6px #7b2cbb20; }
#datatable_paginate .page-item:not(.active):not(.disabled) .page-link:hover { background: #f3eafa; border-color: #cbb4df; color: #74319c; }
#datatable_paginate .page-item.disabled .page-link { opacity: .45; background: #faf9fc; }
#datatable_paginate .page-link:focus-visible { outline: 2px solid #8d54b5; outline-offset: 2px; box-shadow: none; }
.client-column-resize { position: absolute; right: -5px; top: 0; bottom: 0; z-index: 2; width: 10px; cursor: col-resize; touch-action: none; }
.client-column-resize::after { content: ''; position: absolute; top: 25%; bottom: 25%; left: 4px; width: 2px; border-radius: 2px; background: #d7c9e2; }
.client-column-resize:hover::after, .client-column-resize:focus::after { background: #8d54b5; }
.client-column-resize:focus-visible { outline: 2px solid #8d54b5; outline-offset: -2px; }
#datatable.is-resizing { cursor: col-resize; user-select: none; }
@media (max-width: 767px) {
    .client-column-resize { display: none; }
    .client-search-sort { display: flex; align-items: center; gap: 8px; }
    .client-search-sort .client-select { width: 230px; }
    .client-search-sort .client-select__trigger { padding-left: 30px; }
    #datatableDiv .client-table-bottom { justify-content: center; gap: 12px; }
    #datatableDiv .dataTables_length { width: 100%; margin: 0; }
    #datatableDiv .dataTables_length label { justify-content: center; }
    #datatableDiv .dataTables_info { text-align: center; }
}
@media (max-width: 359px) {
    .client-search-sort .client-select { width: 202px; }
    .client-search-sort__field { max-width: calc(100vw - 120px); }
    .client-select__trigger { font-size: 12px; gap: 8px; }
    #datatable_paginate .pagination { gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
    .client-select__menu { animation: none; }
    .client-select__trigger, #datatable_paginate .page-link { transition: none; }
}

/* Explicit preview of matching products with exclusions temporarily omitted. */
#datatable .dataTables_empty { grid-column: 1 / -1; padding: 20px 14px; white-space: normal; }
.search-recovery { margin-top: 12px; padding: 16px; border: 1px solid #eadcf3; border-radius: 12px; background: #fcf9ff; font-size: 13px; }
.search-recovery__header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.search-recovery p { margin: 0; }
#search-disable-exclusions { min-height: 44px; padding: 9px 14px; border: 1px solid #c7a6df; border-radius: 9px; background: #f1e6f9; color: #74319c; font-size: 13px; }
#search-disable-exclusions:hover { background: #e8d7f4; }
#search-recovery-status { margin-top: 12px; color: #756783; }
.search-recovery__products { list-style: none; margin: 12px 0 0; padding: 0; }
.search-recovery__products li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; padding: 12px 0; border-top: 1px solid #eae3f0; }
.search-recovery__name { overflow-wrap: anywhere; }
.search-recovery__products strong { white-space: nowrap; }
.search-recovery__meta { grid-column: 1 / -1; color: #80758f; font-size: 12px; overflow-wrap: anywhere; }
@media (max-width: 479px) {
    .search-recovery { padding: 12px; }
    #search-disable-exclusions { width: 100%; }
}

/* Same compact scale as the search panel for the mouse; touch keeps 44px targets. */
@media (pointer: fine) {
    .product-search__header { margin-bottom: 12px; }
    .product-search__help { min-height: 32px; }
    .product-search__query { padding: 3px; }
    #searchinput { height: 36px; }
    .product-search__clear { width: 34px; height: 34px; }
    .product-search__submit { min-height: 38px; }
    .product-search__suggestions [role="option"] { min-height: 34px; padding: 7px 12px; }
    #datatable tbody td { padding-top: 4px; padding-bottom: 4px; }
    .client-offer__quantity { grid-template-columns: 30px 44px 30px; width: 106px; min-width: 106px; }
    .client-offer__quantity button { flex-basis: 30px; width: 30px; min-height: 30px; }
    .client-offer__quantity input { font-size: 14px; }
    .client-offer__actions { gap: 6px; }
    .client-offer__action { flex-basis: 32px; width: 32px; min-height: 32px; border-radius: 8px; }
    .client-offer__action .client-search-icon { width: 17px; height: 17px; }
    #datatable .client-search-date-heading .product-search__info { width: 32px; min-height: 32px; }
    #search-sort, #datatableDiv .dataTables_length select { min-height: 34px; }
    .client-select__trigger { min-height: 34px; padding-top: 6px; padding-bottom: 6px; }
    .client-select__option { min-height: 34px; padding-top: 7px; padding-bottom: 7px; }
    #datatable_paginate .page-link { min-width: 34px; min-height: 34px; padding: 6px; }
    #search-disable-exclusions { min-height: 34px; padding: 6px 12px; }
}
