/* Advanced Search v2 (owner 2026-11-22). Scoped to .as2 (AdvancedSearch.aspx only).
   Desktop: search bar, filter sidebar (right in Arabic, left in English, 300 px) + results in 1-2 columns.
   Phones/tablets (<= 991 px): the SAME sidebar element becomes a bottom drawer (86% of the screen) - no copied controls.
   Brand: teal #368B94, deep #173c43, orange #F5833D (white text on orange). Logical properties = symmetric RTL/LTR. */

.as2 { --as2-teal: #368B94; --as2-teal-d: #2a737b; --as2-ink: #173c43; --as2-muted: #61767d; --as2-line: #dfe7e9; --as2-soft: #eef6f7;
  --as2-bg: #f4f7f7; --as2-orange: #F5833D; background: var(--as2-bg); padding-bottom: 32px; color: var(--as2-ink); }
.as2 .sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.as2 .as2-ico { width: 20px; height: 20px; flex: none; }

/* ---------- header + search bar ---------- */
.as2-head { background: #fff; border-bottom: 1px solid var(--as2-line); padding: 18px 0 18px; }
.as2-crumbs { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--as2-muted); margin: 0 0 4px; }
.as2-crumbs a { color: var(--as2-muted); text-decoration: none; }
.as2-crumbs a:hover { color: var(--as2-teal); }
.as2-title { font-size: 26px; line-height: 1.4; font-weight: 800; margin: 0; color: var(--as2-ink); }
.as2-lead { margin: 2px 0 14px; font-size: 14px; color: var(--as2-muted); line-height: 1.7; }
.as2-searchbar { display: flex; gap: 10px; align-items: stretch; max-width: 920px; }
.as2-search-field { flex: 1 1 auto; min-width: 0; position: relative; display: flex; align-items: center; margin: 0; }
.as2-search-field .as2-ico { position: absolute; inset-inline-start: 14px; color: #8aa0a5; pointer-events: none; }
.as2 #asTenderName { width: 100%; height: 52px; border: 1.5px solid #cfdcdf; border-radius: 12px; background: #fff; padding-block: 0; padding-inline: 44px 14px;
  font: inherit; font-size: 16px; color: var(--as2-ink); box-shadow: 0 1px 2px rgba(23,60,67,.04); -webkit-appearance: none; appearance: none; }
.as2 #asTenderName::placeholder { color: #8b9ca1; }
.as2 #asTenderName:focus { outline: none; border-color: var(--as2-teal); box-shadow: 0 0 0 3px rgba(54,139,148,.18); }
.as2 #asTenderName::-webkit-search-cancel-button { cursor: pointer; }
.as2 .as2-searchbtn { height: 52px; min-width: 120px; padding: 0 22px; border-radius: 12px; font-size: 15px; font-weight: 700; margin: 0;
  background: var(--as2-orange) !important; border: 0 !important; color: #fff !important; box-shadow: none !important; }
.as2 .as2-searchbtn:hover { filter: brightness(1.05); }
.as2 .as2-searchbtn:focus-visible, .as2 .as2-filterbtn:focus-visible, .as2 .as2-apply:focus-visible, .as2 .as2-linkbtn:focus-visible, .as2 .as2-close:focus-visible {
  outline: 3px solid #e99b61; outline-offset: 2px; }
.as2-filterbtn { display: none; position: relative; flex: none; width: 52px; height: 52px; border-radius: 12px; border: 1.5px solid #cfdcdf;
  background: #fff; color: var(--as2-teal-d); align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.as2-filterbtn[aria-expanded="true"] { border-color: var(--as2-teal); background: var(--as2-soft); }
.as2-badge { position: absolute; top: -6px; inset-inline-end: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  background: var(--as2-orange); color: #fff; font-size: 11px; font-weight: 700; line-height: 20px; text-align: center; }
.as2-badge[hidden] { display: none; }

/* ---------- layout ---------- */
.as2-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; padding-top: 18px; }
.as2-main { min-width: 0; }

/* ---------- filter sidebar ---------- */
.as2-sidebar { position: sticky; top: 84px; max-height: calc(100vh - 100px); display: flex; flex-direction: column; background: #fff;
  border: 1px solid var(--as2-line); border-radius: 14px; box-shadow: 0 1px 3px rgba(23,60,67,.05); overflow: hidden; }
.as2-sb-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--as2-line); }
.as2-sb-title { font-size: 15px; font-weight: 800; margin: 0; flex: 1 1 auto; color: var(--as2-ink); }
.as2-linkbtn { border: 0; background: transparent; color: var(--as2-teal-d); font: inherit; font-size: 13px; font-weight: 700; padding: 6px 4px;
  cursor: pointer; text-decoration: underline; text-underline-offset: 3px; min-height: 36px; }
.as2-close { display: none; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #eef3f4; color: #35474e; font-size: 22px; line-height: 1; cursor: pointer; }
.as2-sb-body { padding: 6px 16px 10px; overflow-y: auto; overscroll-behavior: contain; flex: 1 1 auto; }
.as2-group { border: 0; margin: 0; padding: 12px 0; border-bottom: 1px solid #eef2f3; min-width: 0; }
.as2-group:last-child { border-bottom: 0; }
.as2-group > legend, .as2-label { display: block; width: 100%; font-size: 13px; font-weight: 700; color: var(--as2-ink); margin: 0 0 8px; padding: 0; border: 0; line-height: 1.5; }
.as2-label small, .as2-group > legend small { font-weight: 500; color: var(--as2-muted); font-size: 11.5px; }
.as2 .as2-input { width: 100%; height: 42px; border: 1.5px solid #dfe7e9; border-radius: 10px; padding: 0 12px; font: inherit; font-size: 14px; background: #fff; color: var(--as2-ink); }
.as2 .as2-input:focus { outline: none; border-color: var(--as2-teal); box-shadow: 0 0 0 3px rgba(54,139,148,.15); }
html[dir="rtl"] .as2 .as2-input[type="number"] { text-align: right; }
.as2-sb-foot { padding: 12px 16px; border-top: 1px solid var(--as2-line); background: #fff; }
.as2-apply { width: 100%; height: 46px; border: 0; border-radius: 10px; background: var(--as2-teal); color: #fff; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.as2-apply:hover { background: var(--as2-teal-d); }
.as2-apply--phone { display: none; }

/* status = one segmented control that fills the width */
.as2 .as2-seg { display: flex; width: 100%; height: 40px; background: #f1f5f6; border: 1px solid #e3eaec; border-radius: 10px; padding: 3px; gap: 2px; }
.as2 .as2-seg .as-seg__item { flex: 1 1 0; justify-content: center; font-size: 13px; padding: 0 6px; border-radius: 8px; }
.as2 .as2-seg .as-seg__item.active { background: var(--as2-teal); }
/* tender type + quick options = wrapping chips (not one long joined strip) */
.as2 .as2-pills { display: flex; flex-wrap: wrap; gap: 6px; border: 0; border-radius: 0; overflow: visible; }
.as2 .as2-pills .as-pill { height: 34px; padding: 0 12px; border: 1px solid #dfe7e9 !important; border-radius: 999px; font-size: 12.5px; color: #4d646b; background: #fff; }
.as2 .as2-pills .as-pill::before { border-radius: 999px; }
.as2 .as2-pills .as-pill.active { color: #fff; box-shadow: none; border-color: var(--as2-teal) !important; }
.as2 .as2-pills .as-pill i { display: none; }
/* select2 inside the sidebar */
.as2-sidebar .select2-container { width: 100% !important; }
.as2-sidebar .select2-container .select2-selection--single, .as2-sidebar .select2-container .select2-selection--multiple {
  min-height: 42px !important; border: 1.5px solid #dfe7e9 !important; border-radius: 10px !important; background: #fff !important; }
.as2-sidebar .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 39px !important; padding: 0 12px !important; font-size: 14px !important; color: var(--as2-ink) !important; }
.as2-sidebar .select2-container--default .select2-selection--single .select2-selection__arrow { height: 39px !important; }
.as2-sidebar .select2-container--default.select2-container--focus .select2-selection,
.as2-sidebar .select2-container--default.select2-container--open .select2-selection { border-color: var(--as2-teal) !important; box-shadow: 0 0 0 3px rgba(54,139,148,.15) !important; }
.as2-sidebar .select2-container--default .select2-selection--multiple .select2-selection__choice { background: var(--as2-soft) !important; border: 1px solid #cfe5e7 !important;
  color: var(--as2-teal-d) !important; border-radius: 999px !important; font-size: 12px !important; padding: 2px 8px !important; margin-top: 5px !important; }

/* ---------- results ---------- */
.as2-strip { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 8px; padding: 0; background: transparent !important; border: 0 !important; box-shadow: none !important; }
.as2-strip__status { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; background: var(--as2-soft);
  color: var(--as2-teal-d); font-size: 13px; font-weight: 700; border: 1px solid #cfe5e7; }
.as2-strip__count { font-size: 14px; color: var(--as2-muted); white-space: nowrap; margin: 0 !important; padding: 0 !important; background: transparent !important; }
.as2-strip__count b { color: var(--as2-ink); font-size: 16px; font-weight: 800; unicode-bidi: isolate; }
.as2-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.as2-summary .as-active-filters { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 auto; min-width: 0; }
.as2 .as-tag { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--as2-line); color: #4d646b; }
.as2 .as-btn-save { height: 36px; padding: 0 12px; border-radius: 10px; font-size: 13px; }
.as2-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; align-items: start; }
.as2-results > :not(article) { grid-column: 1 / -1; }   /* featured strips and the loading spinner span the full width */
.as2-results > article.tg-card { margin: 0 !important; height: 100%; }

/* card order inside the results: title, publisher, status/type, dates and price, actions, category */
.as2-results .tg-card .tg-card__body { display: flex; flex-direction: column; height: 100%; }
.as2-results .tg-card .tg-card__body > * { order: 4; }
.as2-results .tg-card .tg-card__body > .tg-title { order: 1; margin: 0 0 4px; font-size: 16px; line-height: 1.6; }
.as2-results .tg-card .tg-card__body > .tg-pub-banner,
.as2-results .tg-card .tg-card__body > .tg-featured-pub { order: 2; }
.as2-results .tg-card .tg-card__body > .tg-badges { order: 3; margin: 2px 0 8px; }
.as2-results .tg-card .tg-card__body > .tg-actions { order: 6; margin-top: auto; }
.as2-results .tg-card .tg-card__body > .tg-category { order: 7; }
.as2-results .tg-card .tg-pub-banner { background: transparent; border: 0; padding: 0; margin: 0 0 6px; min-height: 0; }
.as2-results .tg-card .tg-pub-banner__name { font-size: 13.5px; font-weight: 600; color: #2b7f88; }

/* states */
.as2-state { background: #fff; border: 1px solid var(--as2-line); border-radius: 14px; padding: 18px 20px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.as2-state p { margin: 0; flex: 1 1 260px; color: var(--as2-muted); font-size: 14px; line-height: 1.8; }
.as2-state h3 { margin: 0; font-size: 16px; font-weight: 800; flex: 1 1 100%; }
.as2-state--empty { border-color: #f3d5bf; }
.as2 .as2-startbtn { height: 42px; padding: 0 18px; border-radius: 10px; background: var(--as2-teal) !important; border: 0 !important; color: #fff !important; }
.as2-backdrop { display: none; }

/* ---------- tablets and phones: the sidebar becomes a bottom drawer ---------- */
@media (max-width: 991px) {
  .as2-head { padding: 10px 0 12px; }
  .as2-head > .container { padding-inline: 14px; }
  .as2-crumbs { display: none; }
  .as2-title { font-size: 20px; }
  .as2-lead { font-size: 13px; margin: 0 0 10px; }
  .as2-searchbar { gap: 8px; }
  .as2-filterbtn { display: inline-flex; width: 48px; height: 48px; }
  .as2 #asTenderName { height: 48px; font-size: 16px; padding-inline: 40px 10px; }
  .as2-search-field .as2-ico { inset-inline-start: 12px; }
  .as2 .as2-searchbtn { height: 48px; min-width: 0; padding: 0 16px; font-size: 15px; }
  .as2-layout { display: block; padding-top: 12px; padding-inline: 14px; }

  .as2-backdrop { display: block; position: fixed; inset: 0; z-index: 100040; background: rgba(15,35,40,.5); opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility 0s linear .2s; }
  .as2-sidebar { position: fixed; inset-inline: 0; bottom: 0; top: auto; z-index: 100050; height: 86vh; height: 86dvh; max-height: none; border-radius: 18px 18px 0 0;
    transform: translateY(105%); visibility: hidden; transition: transform .28s cubic-bezier(.2,.8,.2,1), visibility 0s linear .28s; box-shadow: 0 -10px 30px rgba(15,35,40,.25); }
  body.as2-drawer-open .as2-backdrop { opacity: 1; visibility: visible; transition: opacity .2s ease, visibility 0s; }
  body.as2-drawer-open .as2-sidebar { transform: none; visibility: visible; transition: transform .28s cubic-bezier(.2,.8,.2,1), visibility 0s; }
  body.as2-drawer-open { overflow: hidden !important; }
  body.as2-drawer-open .tg-app-banner, body.as2-drawer-open #tg-mobile-bottombar { visibility: hidden; }
  body.as2-drawer-open .select2-container--open { z-index: 100060 !important; }
  .as2-sb-head { padding: 12px 16px; }
  .as2-close { display: inline-flex; align-items: center; justify-content: center; }
  .as2-sb-foot { padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 12px rgba(23,60,67,.06); }
  .as2-apply { height: 50px; background: var(--as2-orange); }
  .as2-apply:hover { background: #e9752f; }
  .as2-apply--phone { display: inline; }
  .as2-apply--desk { display: none; }

  .as2-strip { margin-bottom: 8px; }
  .as2-results { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .as2-state { padding: 14px; }
}
@media (max-width: 400px) {
  .as2 .as2-searchbtn { padding: 0 12px; }
  .as2-title { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) { .as2-sidebar, .as2-backdrop { transition: none !important; } }
/* the search button: text on desktop, a 48 px search icon on phones (its name stays for screen readers via aria-label) */
.as2 .as2-searchbtn__ico { display: none; }
@media (max-width: 991px) {
  .as2 .as2-searchbtn { width: 48px; padding: 0; justify-content: center; }
  .as2 .as2-searchbtn .as-btn-text { display: none; }
  .as2 .as2-searchbtn__ico { display: block; }
  .as2 .as2-searchbtn.as-btn-searching .as2-searchbtn__ico { display: none; }
  .as2 .as2-searchbtn .as-btn-loading [data-searching-text] { display: none; }
}
/* Bootstrap's .container clearfix pseudo-elements would become grid cells */
.as2-layout::before, .as2-layout::after { content: none !important; display: none !important; }
/* hard overrides over advsearch-page.css (its .as-btn / phone rules are more specific) */
.as2 .as2-strip { display: flex !important; flex-direction: row !important; align-items: center !important; justify-content: space-between !important; text-align: start; }
.as2 .as2-strip__count span { background: transparent !important; color: var(--as2-muted) !important; padding: 0 !important; font-weight: 500; font-size: 14px; }
.as2 .as-btn-save { height: 34px !important; padding: 0 12px !important; border-radius: 999px !important; font-size: 12.5px !important; background: #fff !important;
  color: var(--as2-teal-d) !important; border: 1px solid #cfe5e7 !important; box-shadow: none !important; width: auto !important; }
.as2 .as-btn-save i { font-size: 12px; }
@media (max-width: 991px) {
  .as2 .as2-searchbtn { width: 48px !important; min-width: 48px !important; max-width: 48px; flex: none !important; padding: 0 !important; }
}

/* ---------- compact cards inside Advanced Search (all widths) ---------- */
.as2-results .tg-card .tg-card__body { padding: 14px 16px !important; }
.as2-results .tg-card .tg-title { font-size: 16px !important; line-height: 1.6 !important; color: var(--as2-ink); }
.as2-results .tg-card .tg-title a { color: inherit; }
.as2-results .tg-card .tg-badges { gap: 6px !important; flex-wrap: wrap; align-items: center; }
.as2-results .tg-card .tg-id { font-size: 11px !important; color: #7d9197 !important; background: transparent !important; border: 0 !important; padding: 0 !important; margin-inline-start: auto; }
.as2-results .tg-card .tg-meta { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px 12px !important; padding: 10px 0 !important;
  margin: 0 0 10px !important; border-block: 1px solid #edf1f2 !important; border-inline: 0 !important; background: transparent !important; }
.as2-results .tg-card .tg-meta > * { border: 0 !important; padding: 0 !important; min-width: 0; }
.as2-results .tg-card .tg-meta__item { display: flex !important; flex-direction: row !important; align-items: center !important; justify-content: flex-start !important; gap: 8px !important; text-align: start !important; min-height: 0 !important; }
.as2-results .tg-card .tg-meta__item--price { grid-column: 1 / -1; }
.as2-results .tg-card .tg-meta__icon, .as2-results .tg-card .tg-square-progress { flex: none; width: 32px !important; height: 32px !important; min-width: 32px; margin: 0 !important; }
.as2-results .tg-card .tg-meta__icon svg, .as2-results .tg-card .tg-square-progress__svg { width: 32px !important; height: 32px !important; }
.as2-results .tg-card .tg-meta__icon svg { width: 18px !important; height: 18px !important; }
.as2-results .tg-card .tg-meta__copy { display: flex !important; flex-direction: column; align-items: flex-start !important; min-width: 0; text-align: start !important; }
.as2-results .tg-card .tg-meta__copy small { font-size: 11px !important; color: #7d9197 !important; white-space: nowrap; }
.as2-results .tg-card .tg-meta__copy strong { font-size: 13px !important; white-space: nowrap; color: var(--as2-ink); }
.as2-results .tg-card .tg-meta__item--price .tg-price-sq { display: none !important; }
.as2-results .tg-card .tg-meta__item--price .tg-meta__copy { flex-direction: row; align-items: baseline !important; gap: 6px; }
.as2-results .tg-card .tg-meta__item--price .tg-meta__copy small::after { content: ":"; }
.as2-results .tg-card .tg-meta__item--price .tg-cur-tag { background: transparent !important; border: 0 !important; padding: 0 !important; font-size: 13px !important; color: var(--as2-ink) !important; font-weight: 700; }
.as2-results .tg-card .tg-actions { display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important; align-items: center; gap: 6px !important; margin: 0 0 8px !important; padding: 0 !important; }
.as2-results .tg-card .tg-actions__primary { display: flex !important; flex: 1 1 auto; min-width: 0; gap: 6px !important; }
.as2-results .tg-card .tg-btn-split { flex: 1 1 auto; min-width: 0 !important; min-height: 42px; border-radius: 10px !important; }
.as2-results .tg-card .tg-btn-split__main { background: #f6fbfb !important; color: #1e6c75 !important; font-weight: 600 !important; min-height: 42px; display: flex !important; align-items: center; justify-content: center; min-width: 0 !important; }
.as2-results .tg-card .tg-icon-btn { width: 42px !important; height: 42px !important; min-width: 42px !important; border-radius: 10px !important; }
.as2-results .tg-card .tg-actions__icons { display: flex !important; flex: none !important; width: auto !important; gap: 4px !important; flex-wrap: nowrap !important; margin: 0 !important; }
.as2-results .tg-card .tg-actions__icons .tg-icon-btn { width: 36px !important; height: 36px !important; min-width: 36px !important; }
.as2-results .tg-card .tg-actions__icons:empty { display: none !important; }
.as2-results .tg-card .tg-category { margin: 0 !important; }
.as2-results .tg-card .tg-category__toggle { min-height: 40px; padding: 6px 10px !important; }
.as2-results .tg-card .tg-category__copy > span { display: none !important; }
@media (max-width: 360px) {
  .as2-results .tg-card .tg-actions { flex-wrap: wrap !important; }
  .as2-results .tg-card .tg-actions__primary { flex-basis: 100% !important; }
}
/* select2 arrow: a plain chevron instead of the old orange block */
.as2-sidebar .select2-container--default .select2-selection--single .select2-selection__arrow { background: transparent !important; width: 30px !important; border: 0 !important; }
.as2-sidebar .select2-container--default .select2-selection--single .select2-selection__arrow b { border-color: #61767d transparent transparent transparent !important; }

/* ================= v2b: aligned with the approved TENDERJO proposal (owner 2026-11-22) ================= */
.as2 { background: #f5f8f8; }
.as2-head { background: transparent !important; border: 0 !important; padding: 26px 0 0 !important; }
.as2-title { font-size: 30px; }
.as2-lead { font-size: 15px; margin: 4px 0 16px; }
/* one white search box: field + (phone) filter button + orange search button inside it */
.as2-searchbar { max-width: none; background: #fff; border: 1px solid #d7e4e7; border-radius: 14px; padding: 8px; gap: 8px; box-shadow: 0 6px 20px rgba(20,62,68,.03); align-items: center; }
.as2-searchbar:focus-within { border-color: #76b3ba; box-shadow: 0 0 0 3px rgba(55,139,149,.08); }
.as2 #asTenderName { border: 0 !important; box-shadow: none !important; height: 50px; background: transparent; padding-inline: 44px 8px; }
.as2 #asTenderName:focus { box-shadow: none !important; }
.as2-search-field .as2-ico { color: #378b95; width: 22px; height: 22px; }
.as2 .as2-searchbtn { min-width: 138px; height: 50px; }
.as2-filterbtn { background: #edf5f5; border-color: #cfe3e5; }
.as2-layout { padding-top: 22px; gap: 22px; }
/* fixed (sticky) filter panel on desktop */
@media (min-width: 992px) {
  .as2-sidebar { position: sticky !important; top: 16px; max-height: calc(100vh - 32px); align-self: start; }
}
.as2-sb-head { align-items: flex-start; padding: 16px 18px 14px; }
.as2-sb-headtext { flex: 1 1 auto; min-width: 0; }
.as2-sb-title { font-size: 17px; }
.as2-sb-sub { margin: 2px 0 0; font-size: 12.5px; color: var(--as2-muted); }
.as2-sb-head .as2-linkbtn { text-decoration: none; color: #7b8f96; font-weight: 500; font-size: 12.5px; }
.as2-sb-head .as2-linkbtn:hover { color: var(--as2-teal-d); text-decoration: underline; }
.as2-sb-body { padding: 4px 18px 8px; }
.as2-group { border-bottom: 0; padding: 10px 0; }
.as2-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.as2-pair__item { min-width: 0; }
.as2-more { border-block: 1px solid #edf1f2 !important; padding: 0 !important; margin: 6px 0; }
.as2-more > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; min-height: 46px; font-size: 14px; font-weight: 700; color: var(--as2-ink); }
.as2-more > summary::-webkit-details-marker { display: none; }
.as2-more > summary::after { content: ""; width: 9px; height: 9px; border-inline-end: 2px solid #8aa0a5; border-bottom: 2px solid #8aa0a5; transform: rotate(45deg); margin-inline-end: 4px; transition: transform .2s; }
.as2-more[open] > summary::after { transform: rotate(-135deg); }
.as2-more__body { padding: 0 0 10px; display: grid; gap: 12px; }
.as2-sub { min-width: 0; }
/* quick filters as a checkbox list */
.as2-checks { display: grid; gap: 4px; }
.as2-checks .as-pill { display: flex !important; align-items: center; gap: 10px; height: 40px; padding: 0 2px !important; border: 0 !important; background: transparent !important; color: var(--as2-ink) !important;
  font-size: 14px; font-weight: 500; border-radius: 0; box-shadow: none !important; }
.as2-checks .as-pill::before { display: none !important; }
.as2-checks .as-pill input { display: inline-block !important; width: 18px; height: 18px; margin: 0; accent-color: #378b95; order: 2; margin-inline-start: auto; }
.as2-checks .as-pill.active { color: var(--as2-teal-d) !important; font-weight: 700; }
.as2-sb-foot { border-top: 0; padding: 4px 18px 18px; }
.as2-apply { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; background: #2f7f88; }
.as2-apply--phone, .as2-apply--desk { display: none !important; }

/* results toolbar: status segments + count, always visible */
.as2-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.as2 .as2-toolbar .as2-seg { width: auto; height: 42px; background: #eef3f4; border: 1px solid #dfe8ea; border-radius: 11px; padding: 3px; }
.as2 .as2-toolbar .as2-seg .as-seg__item { min-width: 76px; color: #61767d; font-weight: 700; font-size: 13.5px; }
.as2 .as2-toolbar .as2-seg .as-seg__item.active { background: #fff; color: var(--as2-teal-d); box-shadow: 0 1px 3px rgba(23,60,67,.12); }
.as2-count { font-size: 14px; color: var(--as2-muted); white-space: nowrap; }
.as2-count b { font-size: 22px; font-weight: 800; color: var(--as2-ink); margin-inline-start: 6px; unicode-bidi: isolate; }
.as2-count b:empty { display: none; }

/* ---------- result card: the site's standard tg-card (tg-card-v2.css), the same on every tender list (owner 2026-11-22) ---------- */
.as2-results { gap: 16px; }

@media (max-width: 991px) {
  .as2-head { padding: 14px 14px 0 !important; }
  .as2-title { font-size: 24px; }
  .as2-lead { font-size: 13.5px; margin-bottom: 12px; }
  .as2-searchbar { padding: 6px; gap: 6px; }
  .as2 #asTenderName { height: 46px; padding-inline: 38px 4px; }
  .as2-filterbtn { width: 46px !important; height: 46px !important; }
  .as2 .as2-searchbtn { height: 46px; width: 46px !important; min-width: 46px !important; }
  .as2-layout { padding-top: 14px; }
  .as2 .as2-toolbar .as2-seg { height: 40px; }
  .as2 .as2-toolbar .as2-seg .as-seg__item { min-width: 0; padding: 0 10px; font-size: 13px; }
  .as2-count b { font-size: 18px; }
  .as2-sb-foot { padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid #edf1f2; }
  .as2-apply { background: #F5833D; height: 50px; }
}
@media (max-width: 360px) {
  .as2 .as2-toolbar .as2-seg .as-seg__item { padding: 0 7px; font-size: 12.5px; }
  .as2-pair { grid-template-columns: 1fr; }
}

/* the site sets body { overflow-x: hidden; overflow-y: scroll }, which makes <body> a scroll container and stops position: sticky.
   On this page only: clip (same horizontal clipping, no scroll container) so the filter panel stays in view while the results scroll. */
body:has(#as2Root) { overflow-x: clip !important; overflow-y: visible !important; }

/* ---------- state classes instead of inline styles (owner rule 2026-11-22: no style="" in the markup) ---------- */
.as2-hidden { display: none !important; }
.as2-start-hidden { display: none; }            /* hidden until the page script shows it (jQuery .show() sets the inline display) */
.as2 .as-btn-loading { display: none; }
.as2-modal { display: none; position: fixed; inset: 0; z-index: 99999; background: rgba(0,0,0,.45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  align-items: center; justify-content: center; }   /* opened by the page script with display:flex */
.as2-modal__icon { width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #e0f5f4, #c7ede9); }
.as2-modal__error { display: none; color: #c0392b; font-size: 12px; margin-bottom: 10px; }
/* ===== owner 2026-11-22: filter panel - compact, every section a clear block ===== */
.as2 .as2-sb-body { padding: 10px 12px 8px; display: flex; flex-direction: column; gap: 8px; }
.as2 .as2-group { padding: 10px 12px 12px; margin: 0; border: 1px solid #e3ecee !important; border-radius: 12px; background: #fff; }
.as2 .as2-group.as2-more { padding: 0; overflow: hidden; }
.as2 .as2-group .as2-label, .as2 .as2-group > legend { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--as2-ink); }
.as2 .as2-group .as2-label::before, .as2 .as2-group > legend::before { content: ""; width: 3px; height: 14px; border-radius: 3px; background: var(--as2-teal); flex: none; }
.as2 .as2-pair .as2-label::before, .as2 .as2-sub .as2-label::before { display: none; }
.as2 .as2-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.as2 .as2-pair > .as2-pair__item:only-child, .as2 .as2-pair > .as2-pair__item:has(+ .as2-hidden) { grid-column: 1 / -1; }
.as2 .as2-checks { display: grid; gap: 2px; }
.as2 .as2-checks .as-pill { height: 36px; padding: 0 2px !important; border-bottom: 1px dashed #edf2f3 !important; }
.as2 .as2-checks .as-pill:last-child { border-bottom: 0 !important; }
.as2-native-select { width: 100%; height: 42px; padding: 0 12px; border: 1px solid #dfe7e9; border-radius: 10px; background: #fff; color: var(--as2-ink); font: inherit; font-size: 14px; }

/* ===== owner 2026-11-22: no name search bar - phones keep only the Filters button (full width, with its label) ===== */
.as2 .as2-searchbar--filters-only .as2-search-field, .as2 .as2-searchbar--filters-only #asBtnSearch { display: none !important; }
.as2-filterbtn__txt { display: none; }
@media (min-width: 992px) { .as2 .as2-searchbar--filters-only { display: none !important; } }
@media (max-width: 991px) {
  .as2 .as2-searchbar--filters-only .as2-filterbtn { width: 100% !important; gap: 8px; justify-content: center; font: inherit; font-size: 15px; font-weight: 600; color: var(--as2-teal-d); }
  .as2 .as2-searchbar--filters-only .as2-filterbtn__txt { display: inline; }
}

/* ===== category picker (tg-cattree.js) - the Publisher app's registration pattern: summary card + sheet ===== */
.tg-cattree-on .select2-container, .tg-cattree-on > select { display: none !important; }
.tg-catsum { text-align: center; padding: 14px 12px 12px; border: 1px solid #dfe7e9; border-radius: 14px; background: #fff; }
.tg-catsum__icon { display: inline-flex; width: 30px; height: 30px; color: #2a737b; }
.tg-catsum__icon svg { width: 100%; height: 100%; }
.tg-catsum__title { margin: 8px 0 2px !important; font-size: 15px; font-weight: 700 !important; color: #173c43; }
.tg-catsum__hint { margin: 0 0 10px; font-size: 12.5px; color: #61767d; }
.tg-catsum__count { margin: 0 0 10px; padding-top: 10px; border-top: 1px solid #edf1f2; font-size: 13.5px; color: #4e666d; }
.tg-cattree.is-custom .tg-catsum__count { color: #1e6c75; font-weight: 600; }
.tg-catsum__btn { width: 100%; min-height: 42px; border: 1.5px solid #2a737b; border-radius: 12px; background: #fff; color: #1e6c75; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.tg-catsum__btn:hover { background: #f3f8f8; }

html.tg-catsheet-open, html.tg-catsheet-open body { overflow: hidden; }
.tg-catsheet { position: fixed; inset: 0; z-index: 10050; display: flex; align-items: flex-end; justify-content: center; }
.tg-catsheet[hidden] { display: none; }
.tg-catsheet__backdrop { position: absolute; inset: 0; background: rgba(15, 35, 40, .45); opacity: 0; transition: opacity .18s; }
.tg-catsheet.is-in .tg-catsheet__backdrop { opacity: 1; }
.tg-catsheet__panel { position: relative; width: 100%; max-width: 560px; max-height: 88vh; display: flex; flex-direction: column; background: #fff;
  border-radius: 20px 20px 0 0; padding: 8px 16px calc(12px + env(safe-area-inset-bottom)); transform: translateY(24px); opacity: 0; transition: transform .18s, opacity .18s;
  font-family: 'Outfit', 'IBM Plex Sans Arabic', 'Segoe UI', Arial, sans-serif; color: #173c43; }
.tg-catsheet.is-in .tg-catsheet__panel { transform: none; opacity: 1; }
@media (min-width: 768px) {
  .tg-catsheet { align-items: center; }
  .tg-catsheet__panel { border-radius: 20px; max-height: 84vh; padding-bottom: 16px; }
}
.tg-catsheet__handle { display: block; width: 44px; height: 5px; margin: 2px auto 10px; padding: 0; border: 0; border-radius: 99px; background: #c9d4d7; cursor: pointer; }
.tg-catsheet__title { margin: 0 !important; text-align: center; font-size: 19px; font-weight: 700 !important; }
.tg-catsheet__count { margin: 2px 0 12px; text-align: center; font-size: 13.5px; color: #61767d; padding-bottom: 12px; border-bottom: 1px solid #edf1f2; }
.tg-catsheet__search { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 14px; border: 1px solid #dfe7e9; border-radius: 12px; margin-bottom: 10px; }
.tg-catsheet__search svg { width: 20px; height: 20px; color: #4e666d; flex: none; }
.tg-catsheet__search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font: inherit; font-size: 14.5px; color: #173c43; }
.tg-catsheet__bulk { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.tg-catsheet__bulk button { min-height: 42px; border: 1.5px solid #2a737b; border-radius: 12px; background: #fff; color: #1e6c75; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.tg-catsheet__bulk .tg-catsheet__all { background: #eaf4f5; }
.tg-catsheet__list { flex: 1 1 auto; min-height: 120px; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 8px; padding: 2px 0 8px; }
.tg-catcard { border: 1px solid #e3ecee; border-radius: 12px; background: #fff; }
.tg-catcard__row { display: flex; align-items: center; gap: 6px; padding: 10px 10px 10px 12px; }
.tg-catcard__check { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; margin: 0; cursor: pointer; }
.tg-catcard__check input, .tg-catcard__sub input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: #2a737b; }
.tg-catcard__text { display: flex; flex-direction: column; min-width: 0; text-align: start; }
.tg-catcard__text b { font-size: 14.5px; font-weight: 600; color: #173c43; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-catcard__text small { font-size: 12.5px; color: #61767d; }
.tg-catcard__toggle { flex: none; width: 34px; height: 34px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; position: relative; }
.tg-catcard__toggle::after { content: ""; position: absolute; inset: 0; margin: auto; width: 8px; height: 8px; border: solid #4e666d; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); transition: transform .15s; }
.tg-catcard.is-open .tg-catcard__toggle::after { transform: translateY(2px) rotate(-135deg); }
.tg-catcard__toggle:hover { background: #f3f8f8; }
.tg-catcard__subs { border-top: 1px solid #edf1f2; padding: 6px 0; }
.tg-catcard__sub { display: flex; align-items: center; gap: 12px; padding: 7px 14px; margin: 0; font-size: 13.5px; font-weight: 400; color: #33505a; cursor: pointer; }
.tg-catcard__sub:hover { background: #f6fbfb; }
.tg-catsheet__empty { margin: 0; padding: 20px; text-align: center; font-size: 13.5px; color: #7d9197; }
.tg-catsheet__foot { padding-top: 10px; border-top: 1px solid #edf1f2; }
.tg-catsheet__warn { margin: 0 0 8px; text-align: center; font-size: 12.5px; color: #a24545; }
.tg-catsheet__save { width: 100%; min-height: 50px; border: 0; border-radius: 14px; background: #F5833D; color: #fff; font: inherit; font-size: 15.5px; font-weight: 600; cursor: pointer; }
.tg-catsheet__save:disabled { opacity: .5; cursor: not-allowed; }
