/* TL_PROPERTY_ADS_DESKTOP_V11 (2026-01-15)
   - Filters sidebar on the LEFT even for RTL pages
   - Sticky filter panel (fast scanning) + internal scroll
   - Desktop UX: no close button (filters are always visible)
*/

/* Hide the mobile bar on desktop */
.tl-mbar{ display:none !important; }

/* Main layout: force LTR for grid placement, keep content RTL */
.tl-layout{
  display:grid;
  /* Slightly narrower sidebar to give the cards grid more space */
  grid-template-columns:320px 1fr;
  gap:16px;
  align-items:flex-start;
  margin-top:12px;
  direction:ltr;
}
.tl-layout > aside,
.tl-layout > main{ direction:rtl; }

/* Sticky filters panel */
.tl-filter-panel{
  position:sticky;
  top: calc(var(--tl-site-header-h, 72px) + 12px);
  max-height: calc(100vh - var(--tl-site-header-h, 72px) - 24px);
  overflow:auto;
  scrollbar-gutter: stable;
}

.tl-filter-panel::-webkit-scrollbar{ width:10px; }
.tl-filter-panel::-webkit-scrollbar-thumb{
  background: rgba(148,163,184,.45);
  border-radius:999px;
  border:3px solid rgba(255,255,255,.9);
}
.tl-filter-panel::-webkit-scrollbar-track{ background: transparent; }

/* Hide mobile-only elements */
#closeFiltersBtn{ display:none !important; }
.tl-handle{ display:none !important; }

/* Desktop bar */
.tl-dbar{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:18px;
  padding:12px;
  box-shadow:0 12px 26px rgba(2,6,23,.06);
  margin-bottom:12px;
}
.tl-dactions{ display:flex; align-items:flex-end; gap:12px; }
.tl-dsort-label{ font-size:12px; color:#64748b; margin-bottom:6px; }
.tl-dselect{ min-width:280px; }

.tl-dbtn{
  padding:12px 14px;
  border-radius:14px;
  border:1px solid rgba(15,23,42,.18);
  background:#fff;
  box-shadow:0 8px 18px rgba(2,6,23,.06);
  cursor:pointer;
}
.tl-dbtn:hover{ background:#f8fafc; box-shadow:0 10px 22px rgba(2,6,23,.10); }

/* Ads list on desktop */
.ad-thumb img{ height:170px; }

/* Desktop-only polish for the smart filter steps */
@media ((min-width: 1024px) and (hover: hover) and (pointer: fine)), (min-width: 1367px){
  .tl-filter .tl-step[data-fkey="type"] .tl-pill-row{
    display:grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap:10px;
  }
  .tl-filter .tl-step[data-fkey="offer"] .tl-pill-row{
    display:grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap:10px;
  }
}

/* ============================================================
   TL_PROPERTY_ADS_DESKTOP_UX_BUNDLE_V12 (2026-01-26)
   Desktop-side filter usability polish
   - Keep the sidebar calm, stable, and scan-friendly
   ============================================================ */

@media ((min-width: 1024px) and (hover: hover) and (pointer: fine)), (min-width: 1367px){
  /* Prevent the filter sidebar from overscrolling the page on trackpads */
  .tl-filter-panel{
    overscroll-behavior: contain;
  }

  /* Slightly stronger focus for keyboard navigation */
  .tl-input:focus,
  .tl-select:focus{
    box-shadow: 0 0 0 3px rgba(37,188,207,.14);
  }
}
