/* TL_PROPERTY_ADS_SHARED_V9 (2026-01-17)
   Real-estate listing page UI (shared across mobile + desktop)
   - Polished page header + consistent surface rhythm
   - Cleaner chips/actions bar
   - Keeps all existing classes/IDs to avoid breaking JS behaviors
*/

:root{
  --tl-ink:#0b1220;
  --tl-muted:#64748b;
  --tl-border:#e5e7eb;
  --tl-soft:#F8F7F2;
  --tl-surface:#ffffff;
  --tl-primary:#222F75;
  --tl-secondary:#25BCCF;
  --tl-accent:#E1BA41;
  --tl-shadow:0 18px 44px rgba(2,6,23,.10);
  --tl-shadow-sm:0 12px 26px rgba(2,6,23,.08);
}

/* Scroll-lock for mobile sheets */
.tl-no-scroll{ overflow:hidden !important; }

/* Layout wrapper
   NOTE: Slightly wider container to comfortably fit a 4-column cards grid on desktop
*/
.tl-wrap{ max-width:1400px; margin:0 auto; }

/* Page header */
.tl-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;

  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.98));
  border: 1px solid rgba(148,163,184,.28);
  border-radius: 22px;
  padding: 14px;
  box-shadow: 0 12px 28px rgba(2,6,23,.06);
}

.tl-title{ font-size:22px; color:var(--tl-ink); margin:0; }
.tl-sub{ margin-top:6px; color:var(--tl-muted); font-size:13px; line-height:1.85; }

/* Buttons used by listing page */
.btn,
.btn-lite,
.btnx{
  display:inline-flex; align-items:center; justify-content:center;
  gap:10px;
  padding:12px 14px;
  border-radius:16px;
  border:1px solid var(--tl-border);
  background:var(--tl-surface);
  color:var(--tl-ink);
  text-decoration:none;
  cursor:pointer;
  transition:transform .12s ease, box-shadow .12s ease, background-color .12s ease, opacity .12s ease;
}
.btn:hover, .btn-lite:hover, .btnx:hover{ background:rgba(248,250,252,.98); box-shadow:var(--tl-shadow-sm); }
.btn:active, .btn-lite:active, .btnx:active{ transform:translateY(1px); }

.btn{ background: linear-gradient(135deg, rgba(34,47,117,.98), rgba(37,188,207,.92)); border-color: rgba(255,255,255,.14); color:#fff; }
.btn:hover{ background: linear-gradient(135deg, rgba(27,36,90,.98), rgba(37,188,207,.92)); }

.btn-lite{ background:#fff; }

.btnx{ padding:10px 12px; border-radius:14px; box-shadow:none; }
.btnx.blue{ background:rgba(37,188,207,.10); border-color:rgba(37,188,207,.22); color:var(--tl-secondary); }
.btnx.purple{ background:rgba(124,58,237,.08); border-color:rgba(124,58,237,.16); color:#7c3aed; }

/* Filters UI */
.tl-filter-panel{
  background:#fff;
  border:1px solid rgba(148,163,184,.28);
  border-radius:22px;
  box-shadow: 0 16px 44px rgba(2,6,23,.08);
}
.tl-filter-inner{ padding:12px; }
.tl-filter-head{ padding:8px 8px 10px; border-bottom:1px solid #eef2f7; }
.tl-filter-head-row{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.tl-filter-title{ font-size:14px; color:var(--tl-ink); }
.tl-filter-sub{ color:var(--tl-muted); font-size:12px; margin-top:4px; line-height:1.8; }
.tl-handle{ width:56px; height:6px; border-radius:999px; background:#e2e8f0; margin:0 auto 8px; display:none; }

.tl-close{
  width:auto;
  height:auto;
  padding:10px 12px;
  border-radius:16px;
  border:1px solid rgba(148,163,184,.28);
  background:#fff;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:var(--tl-muted);
}
.tl-close svg{ width:18px; height:18px; fill:currentColor; opacity:.85; }

.tl-grid{ display:grid; gap:12px; margin-top:12px; }
.tl-grid-2{ display:grid; gap:10px; grid-template-columns:repeat(2,minmax(0,1fr)); }
.tl-grid-3{ display:grid; gap:10px; grid-template-columns:repeat(3,minmax(0,1fr)); }
@media (max-width: 640px){ .tl-grid-2, .tl-grid-3{ grid-template-columns:1fr; } }

.tl-label{ font-size:12px; color:var(--tl-ink); margin-bottom:6px; }
.tl-input, .tl-select{
  width:100%;
  padding:12px 12px;
  border-radius:16px;
  border:1px solid rgba(148,163,184,.32);
  background:#fff;
  outline:none;
  color:var(--tl-ink);
}
.tl-input:focus, .tl-select:focus{ border-color:rgba(37,188,207,.45); box-shadow:0 0 0 3px rgba(37,188,207,.14); }

.tl-actions{ display:flex; gap:10px; flex-wrap:wrap; }

/* ------------------------------------------------------------
   Favorites (lists)
   - Minimal styles, aligned with existing TweetLife DS tokens.
   - Used on ad show page.
------------------------------------------------------------- */
.tl-fav-float{
  position:absolute;
  top:12px;
  right:12px;
  z-index:30;
  width:44px;
  height:44px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.45);
  background:rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 12px 26px rgba(2,6,23,.18);
  cursor:pointer;
}
.tl-fav-float:active{ transform:scale(.98); }

.tl-fav-mini{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:36px;
  height:36px;
  border-radius:14px;
  border:1px solid var(--tl-border);
  background:#fff;
  box-shadow:0 10px 22px rgba(2,6,23,.06);
  cursor:pointer;
}
.tl-fav-mini:active{ transform:scale(.98); }

.tl-fav-star{ width:22px; height:22px; }
.tl-fav-mini .tl-fav-star{ width:18px; height:18px; }

.tl-fav-float[data-favorited="0"] .tl-fav-star,
.tl-fav-mini[data-favorited="0"] .tl-fav-star{
  fill:none;
  stroke:var(--tl-primary);
  stroke-width:2;
  stroke-linejoin:round;
}
.tl-fav-float[data-favorited="1"] .tl-fav-star,
.tl-fav-mini[data-favorited="1"] .tl-fav-star{
  fill:var(--tl-accent);
  stroke:var(--tl-accent);
  stroke-width:2;
  stroke-linejoin:round;
}

/* Accordion groups for filters */
.tl-acc{
  border:1px solid rgba(148,163,184,.28);
  border-radius:20px;
  background:#fff;
  overflow:hidden;
  box-shadow:0 10px 22px rgba(2,6,23,.04);
}

.tl-acc-sum{
  list-style:none;
  cursor:pointer;
  padding:12px 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  user-select:none;
}
.tl-acc-sum::-webkit-details-marker{ display:none; }

.tl-acc-sum:hover{ background:rgba(248,250,252,.98); }

.tl-acc-title{ font-size:13px; color:var(--tl-ink); }

.tl-acc-chev{ opacity:.65; transition:transform .18s ease; }
.tl-acc[open] .tl-acc-chev{ transform:rotate(180deg); }

.tl-acc-body{ padding:12px; border-top:1px solid #eef2f7; }

/* Backdrops */
.tl-backdrop{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.55);
  opacity:0;
  pointer-events:none;
  visibility:hidden;
  transition:opacity .15s ease;
  z-index:60;
}
.tl-backdrop.is-open{ opacity:1; pointer-events:auto; visibility:visible; }
/* Hard safety: if aria-hidden is true, never block clicks */
.tl-backdrop[aria-hidden="true"]{ opacity:0; pointer-events:none; visibility:hidden; }

/* Sort sheet placeholder (mobile styles in property_ads_mobile.css) */
#sortSheetReal{ position:fixed; inset:0; z-index:70; pointer-events:none; opacity:0; visibility:hidden; }
#sortSheetReal.is-open{ pointer-events:auto; opacity:1; visibility:visible; }
#sortSheetReal[aria-hidden="true"]{ pointer-events:none; opacity:0; visibility:hidden; }

/* Map overlay */
.tl-map-overlay{
  position:fixed;
  inset:0;
  background:#fff;
  z-index:90;
  transform:translateX(110%);
  transition:transform .18s ease;
  display:flex;
  flex-direction:column;
}
.tl-map-overlay.is-open{ transform:translateX(0); }
.tl-map-top{
  height:64px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border-bottom:1px solid var(--tl-border);
  background:rgba(255,255,255,.92);
  backdrop-filter:blur(10px);
}
.tl-map-top .left{ display:flex; align-items:center; gap:10px; }
.tl-map-top .title{ color:var(--tl-ink); font-size:13px; }
.tl-map-actions{ display:flex; gap:8px; }
#adsMapOverlay{ flex:1; }

/* Leaflet pin: rectangular price tag */
.tl-pin-icon{ background:transparent !important; border:0 !important; }
.tl-pin-wrap{ transform:translate(-50%,-100%); }
.tl-pin-tag{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.18);
  background: var(--tl-primary);
  box-shadow:0 14px 30px rgba(2,6,23,.22);
  white-space:nowrap;
}
.tl-pin-tag:after{
  content:"";
  position:absolute;
  left:50%;
  bottom:-6px;
  width:12px;
  height:12px;
  background: var(--tl-primary);
  transform:translateX(-50%) rotate(45deg);
  border-right:1px solid rgba(255,255,255,.18);
  border-bottom:1px solid rgba(255,255,255,.18);
}
.tl-pin-tag svg{ display:none; }
.tl-pin-tag .t{ font-size:14px; color:#fff; }

/* Smart filters helpers */
.tl-f.is-hidden{ display:none !important; }
.tl-smart-note{
  font-size:12px;
  line-height:1.8;
  color:var(--tl-muted);
  background:rgba(37,188,207,.08);
  border:1px solid rgba(37,188,207,.20);
  padding:10px 12px;
  border-radius:18px;
}

/* =============================
   Applied Filters (Chips) + Saved Search
   ============================= */

.tl-alert{
  margin: 10px 0 10px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid #a7f3d0;
  background: #ecfdf5;
  color: #064e3b;
}

.tl-chipsbar{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(148,163,184,.28);
  border-radius: 22px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 12px 28px rgba(2,6,23,.06);
}

.tl-chips{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.tl-chip{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,.30);
  background: #fff;
  color: rgba(15,23,42,.82);
  font-size: 12px;
  box-shadow: 0 8px 20px rgba(2,6,23,.05);
}

.tl-chip .t{
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tl-chip .x{
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
}

.tl-chip .x:hover{ background: #e2e8f0; }

.tl-chip-ghost{
  background: #f8fafc;
  color: #64748b;
  box-shadow: none;
}

.tl-chip-actions{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.tl-action{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 16px;
  border: 1px solid rgba(148,163,184,.28);
  background: #fff;
  color: rgba(15,23,42,.82);
  text-decoration: none;
  font-size: 12px;
  box-shadow: 0 10px 22px rgba(2,6,23,.06);
  white-space: nowrap;
}

.tl-action-save{
  background: var(--tl-navy, #222F75);
  color: #fff;
  border-color: transparent;
}

.tl-action-clear{
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

.tl-action-manage{
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #0f172a;
}

button.tl-action{ cursor: pointer; }
button.tl-action:disabled{ opacity: .55; cursor: not-allowed; }

.tl-saved-select{ min-width: 200px; }

@media (max-width: 1023px), ((hover: none) and (pointer: coarse) and (max-width: 1366px)){
  .tl-chipsbar{ flex-direction: column; align-items: stretch; }
  .tl-chips{ flex-wrap: nowrap; overflow:auto; -webkit-overflow-scrolling:touch; padding-bottom:4px; }
  .tl-chip .t{ max-width: 220px; }
  .tl-chip-actions{ justify-content: flex-start; }
  .tl-saved-select{ width: 100%; min-width: 0; }
  .tl-action{ flex: 1; }
}

/* =============================
   Save search modal
   ============================= */

.tl-modal-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(2,6,23,.45);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease;
  z-index: 190;
}

.tl-modal-backdrop.is-open{ opacity: 1; pointer-events: auto; }

.tl-modal{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 200;
}

.tl-modal.is-open{ display: flex; }

.tl-modal-card{
  width: min(520px, 100%);
  background: #fff;
  border-radius: 22px;
  border: 1px solid rgba(148,163,184,.28);
  box-shadow: 0 30px 70px rgba(2,6,23,.22);
  overflow: hidden;
}

.tl-modal-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: linear-gradient(180deg, #fff, #f8fafc);
  border-bottom: 1px solid rgba(148,163,184,.22);
}

.tl-modal-close{
  width: 36px;
  height: 36px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #fff;
  cursor: pointer;
  line-height: 1;
}

.tl-modal-body{ padding: 14px; }
.tl-modal-sub{ color: var(--tl-muted); font-size: 12px; line-height: 1.7; margin-bottom: 12px; }
.tl-modal-actions{ display:flex; gap:8px; flex-wrap:wrap; margin-top:12px; }

.tl-err{ margin-top: 6px; color: #b91c1c; font-size: 12px; }

/* -----------------------------
   Legacy listing cards (.ad-card)
   Kept to avoid breaking any older templates.
   ----------------------------- */
.ad-list{ display:grid; gap:12px; }
.ad-card{
  display:grid;
  grid-template-columns:260px 1fr;
  gap:12px;
  background:#fff;
  border:1px solid var(--tl-border);
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 12px 26px rgba(2,6,23,.06);
  text-decoration:none;
  color:inherit;
  transition:transform .12s ease, box-shadow .12s ease;
}
.ad-card:hover{ transform:translateY(-1px); box-shadow:var(--tl-shadow); }
.ad-thumb{ background:#0b1220; }
.ad-thumb img{ width:100%; height:170px; object-fit:cover; display:block; }
.ad-body{ padding:12px; }
.ad-title{ margin:0; font-size:15px; color:var(--tl-ink); line-height:1.6; }
.ad-loc{ display:flex; gap:8px; align-items:center; margin-top:10px; color:var(--tl-muted); font-size:12px; }
.ad-loc .pin{ width:18px; height:18px; display:inline-flex; }
.ad-loc svg{ width:18px; height:18px; fill:currentColor; opacity:.75; }
.ad-price{ margin-top:10px; }
.ad-price .badge{
  display:inline-flex;
  align-items:center;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid rgba(225,186,65,.35);
  background:rgba(225,186,65,.16);
  color:var(--tl-ink);
  font-size:12px;
}
.ad-meta{ margin-top:10px; color:var(--tl-muted); font-size:12px; }

@media (max-width: 980px){
  .ad-card{ grid-template-columns:1fr; }
  .ad-thumb img{ height:210px; }
}

/* -----------------------------
   Smart filter UX (AI-like progressive filters)
   Used on /real-estate
   ----------------------------- */
.tl-smart-steps{ display:grid; gap:10px; margin-top:10px; }
.tl-step{
  background:#fff;
  border:1px solid var(--tl-border);
  border-radius:16px;
  padding:12px;
  box-shadow:0 10px 24px rgba(2,6,23,.05);
}
.tl-step.is-pending{ opacity:.92; }
.tl-step-head{ display:flex; gap:10px; align-items:flex-start; }
.tl-step-num{
  width:28px;
  height:28px;
  border-radius:10px;
  border:1px solid #e2e8f0;
  background:#f8fafc;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  color:var(--tl-muted);
  flex:0 0 auto;
}
.tl-step-title{ font-weight:800; color:var(--tl-ink); font-size:13px; }
.tl-step-sub{ color:var(--tl-muted); font-size:12px; margin-top:2px; line-height:1.6; }

.tl-badge-ai{
  display:inline-flex;
  align-items:center;
  padding:2px 8px;
  margin-right:8px;
  border-radius:999px;
  font-size:11px;
  font-weight:800;
  color:var(--tl-ink);
  background: rgba(12, 164, 211, 0.12);
  border:1px solid rgba(12, 164, 211, 0.25);
  vertical-align:middle;
}

.tl-pill-row{ display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.tl-pill{
  appearance:none;
  border:1px solid #e2e8f0;
  background:#fff;
  color:var(--tl-ink);
  border-radius:999px;
  padding:10px 12px;
  cursor:pointer;
  font-size:13px;
  line-height:1;
  display:inline-flex;
  align-items:center;
  gap:8px;
  transition:transform .1s ease, box-shadow .12s ease, border-color .12s ease;
  user-select:none;
}
.tl-pill:hover{ transform:translateY(-1px); box-shadow:0 10px 18px rgba(2,6,23,.08); }
.tl-pill:focus{ outline:2px solid rgba(20,184,166,.35); outline-offset:2px; }
.tl-pill.is-active{
  border-color:rgba(20,184,166,.35);
  background:linear-gradient(90deg, rgba(30,64,175,.12), rgba(20,184,166,.12));
}
.tl-pill.is-disabled{
  opacity:.5;
  cursor:not-allowed;
  box-shadow:none !important;
  transform:none !important;
}
.tl-pill-ic{ width:18px; height:18px; display:inline-flex; }
.tl-pill-ic svg{ width:18px; height:18px; fill:currentColor; opacity:.9; }

.tl-quick-row{ display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }
.tl-qchip{
  appearance:none;
  border:1px solid #e2e8f0;
  background:#f8fafc;
  border-radius:999px;
  padding:8px 10px;
  font-size:12px;
  color:var(--tl-ink);
  cursor:pointer;
  transition:transform .1s ease, box-shadow .12s ease, border-color .12s ease;
}
.tl-qchip:hover{ transform:translateY(-1px); box-shadow:0 10px 18px rgba(2,6,23,.08); }
.tl-qchip.is-active{
  border-color:rgba(20,184,166,.35);
  background:linear-gradient(90deg, rgba(30,64,175,.10), rgba(20,184,166,.10));
}

.tl-check{ display:flex; gap:10px; align-items:flex-start; user-select:none; cursor:pointer; }
.tl-check input{ position:absolute; opacity:0; width:1px; height:1px; }
.tl-check-box{
  width:18px;
  height:18px;
  border-radius:6px;
  border:1px solid #cbd5e1;
  background:#fff;
  margin-top:2px;
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.tl-check-text{ font-weight:700; color:var(--tl-ink); font-size:13px; }
.tl-hint-inline{ margin-top:6px; }
.tl-check input:checked + .tl-check-box{
  border-color:rgba(20,184,166,.45);
  background:linear-gradient(90deg, rgba(30,64,175,.16), rgba(20,184,166,.16));
}
.tl-check input:checked + .tl-check-box::after{
  content:'✓';
  font-size:12px;
  line-height:1;
  color:var(--tl-ink);
}

/* Favorites sheet hardening */
#tlFavSheet{z-index:9999;}
#tlFavSheet *{box-sizing:border-box;}

/* =====================
   Listing details (ad show) - sticky bars
   NOTE: Used by resources/views/property_ads/show.blade.php
===================== */
.tl-ad-appbar{
  position: sticky;
  top: calc(var(--tl-header-h, 0px) + 8px);
  z-index: calc(var(--tl-z-header) + 1);
  margin-bottom: 12px;
}

.tl-ad-appbar__inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
}

.tl-ad-appbar__left,
.tl-ad-appbar__right{
  display:flex;
  align-items:center;
  gap: 8px;
}

/* Hide desktop side actions on mobile (Bottom CTA replaces it) */
@media (max-width:980px){
  .tl-ad-side{display:none !important;}
}

.tl-ad-appbar__title{
  flex: 1;
  min-width: 0;
  text-align: center;
  font-weight: 950;
  font-size: 13px;
  color: var(--tl-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tl-ad-cta{
  position: fixed;
  left: 0;
  right: 0;
  bottom: var(--tl-bottom-nav-h, 0px);
  z-index: calc(var(--tl-z-bottomnav) + 1);
  padding: 10px 12px calc(10px + var(--tl-safe-bottom, 0px));
  background: rgba(255,255,255,.94);
  border-top: 1px solid rgba(148,163,184,.22);
  backdrop-filter: blur(8px);
}

body.tl-inapp .tl-ad-cta{
  bottom: 0;
}

.tl-ad-cta__inner{
  width: min(1120px, calc(100vw - 24px));
  margin: 0 auto;
  display: flex;
  gap: 10px;
}

.tl-ad-cta__inner .tl-btn{ flex: 1 1 0; }

/* Ensure content does not get covered by CTA on small screens */
@media (max-width: 980px){
  .ad-wrap{ padding-bottom: calc(12px + var(--tl-bottom-nav-h, 0px) + 92px); }
}

@media (min-width: 981px){
  .tl-ad-cta{ display: none; }
}

/* =====================
   Favorites sheet list items (rendered by JS)
===================== */
.tl-fav-list-item{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 12px;
  cursor: pointer;
  text-align: start;
}

.tl-fav-list-item:active{ transform: translateY(1px); }

.tl-fav-list-item__main{ min-width: 0; }

.tl-fav-list-item__title{
  font-weight: 950;
  color: var(--tl-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tl-fav-list-item__desc{
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.8;
  color: var(--tl-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tl-fav-list-item__meta{ flex: 0 0 auto; }
.tl-fav-list-item__chev{ font-size: 18px; opacity: .65; }

.tl-fav-list-item__chip{
  padding: 8px 10px;
  min-height: 34px;
  background: rgba(37,188,207,.12);
  border-color: rgba(37,188,207,.22);
  color: var(--tl-brand-navy);
  font-weight: 950;
}




/* ============================================================
   TL_PROPERTY_ADS_SHARED_UX_BUNDLE_V10 (2026-01-26)
   Senior UX polish for filters/search discovery (mobile-first)

   Goals
   - Reduce cognitive load while scanning active filters
   - Improve touch ergonomics for chips remove action
   - Improve scroll affordance for horizontal chips row on mobile
   ============================================================ */

/* Better scroll target when JS scrolls to a step/section */
.tl-step,
.tl-acc{
  scroll-margin-top: 96px;
}

@media (max-width: 1023px), ((hover: none) and (pointer: coarse) and (max-width: 1366px)){
  /* iOS zoom prevention (if a shared input slips outside mobile overrides) */
  .tl-input,
  .tl-select{
    font-size: 16px;
  }

  /* Chips: larger close target (thumb friendly) */
  .tl-chip .x{
    width: 26px;
    height: 26px;
  }

  /* Chips: hint that the row is horizontally scrollable */
  .tl-chips{
    position: relative;
    padding-inline: 6px;
    margin-inline: -6px;
  }
  .tl-chips::before,
  .tl-chips::after{
    content:"";
    position:absolute;
    top:0;
    bottom:0;
    width:26px;
    pointer-events:none;
    z-index: 2;
  }
  /* RTL: keep fades on both sides to be safe across browsers */
  .tl-chips::before{
    right: -1px;
    background: linear-gradient(to left, rgba(255,255,255,.96), rgba(255,255,255,0));
  }
  .tl-chips::after{
    left: -1px;
    background: linear-gradient(to right, rgba(255,255,255,.96), rgba(255,255,255,0));
  }

  /* Chips bar: reduce layout jump when it appears/disappears */
  .tl-chipsbar{
    contain: layout paint;
  }
}

/* */

.tl-filter-panel .tl-filter-summary{
  position: sticky;
  top: calc(var(--tl-filter-head-h, 0px));
  z-index: 2;

  margin: 10px 0 0;
  padding: 10px 12px;

  background: rgba(255,255,255,.96);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);

  border-top: 1px solid #eef2f7;
  border-bottom: 1px solid #eef2f7;

  /* Prevent horizontal bleed on iOS */
  overflow-x: hidden;
}

.tl-filter-summary__row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:8px;
}

.tl-filter-summary__title{
  font-size:12px;
  font-weight:950;
  color: rgba(15,23,42,.88);
  letter-spacing: .1px;
}

.tl-filter-summary__actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex: 0 0 auto;
}

.tl-filter-summary__clear{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,.28);
  background: #fff7ed;
  color: #9a3412;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(2,6,23,.05);
}
.tl-filter-summary__clear:hover{ background:#ffedd5; }

.tl-filter-summary__chips{
  display:flex;
  align-items:center;
  gap:8px;
  overflow:auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

.tl-filter-summary__empty{
  margin-top: 2px;
  font-size: 12px;
  color: var(--tl-muted);
  line-height: 1.7;
}

.tl-filter-panel .tl-filter-summary .tl-chip{
  padding: 6px 10px;
  min-height: 34px;
  font-size: 12px;
  box-shadow: 0 8px 18px rgba(2,6,23,.05);
}

.tl-filter-panel .tl-filter-summary .tl-chip .t{
  max-width: 220px;
}

.tl-filter-panel .tl-filter-summary .tl-chip .x{
  width: 26px;
  height: 26px;
}

/* Apply button count pill (injected by JS when a count exists) */
.tl-apply-count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  margin-inline-start: 8px;

  background: rgba(255,255,255,.22);
  border: 1px solid rgba(255,255,255,.34);
  color: inherit;
}

.btn-lite .tl-apply-count,
.tl-btn--minimal .tl-apply-count{
  background: rgba(15,23,42,.06);
  border-color: rgba(15,23,42,.10);
  color: rgba(15,23,42,.86);
}

@media (max-width: 1023px), ((hover: none) and (pointer: coarse) and (max-width: 1366px)){
  /* Give the summary a slightly larger top offset for touch scrolling on mobile */
  .tl-filter-panel .tl-filter-summary{
    margin-top: 8px;
  }
}


/* --- Fix: hidden backdrops must NOT block clicks (desktop & mobile) --- */
.tl-backdrop[aria-hidden="true"],
.tl-map-overlay[aria-hidden="true"],
.tl-modal-backdrop[aria-hidden="true"]{
  pointer-events: none !important;
  opacity: 0 !important;
}
/* Safety: if aria-hidden=true, never treat as open */
.tl-backdrop[aria-hidden="true"].is-open{ pointer-events:none !important; opacity:0 !important; }

/* ===== FORCE FIX: prevent hidden overlays from blocking clicks (mobile & desktop) ===== */

/* Default: backdrops and overlays must NOT block interaction */
.tl-backdrop,
.tl-modal-backdrop{
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

/* Only open when explicitly .is-open AND aria-hidden="false" */
.tl-backdrop.is-open[aria-hidden="false"],
.tl-modal-backdrop.is-open[aria-hidden="false"]{
  opacity: 1 !important;
  pointer-events: auto !important;
  visibility: visible !important;
}

/* Map overlay: hidden shouldn't block */
.tl-map-overlay[aria-hidden="true"]{
  pointer-events: none !important;
  visibility: hidden !important;
}
.tl-map-overlay.is-open[aria-hidden="false"]{
  visibility: visible !important;
  pointer-events: auto !important;
}

/* Safety: if aria-hidden=true, never block even if is-open got stuck */
.tl-backdrop.is-open[aria-hidden="true"],
.tl-modal-backdrop.is-open[aria-hidden="true"]{
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

/* Results legend should not appear over mobile sheets or map overlay */
#filterPanel.is-open ~ .tl-main .tl-ad-legend--results{ display:none; }
html.tl-map-open .tl-ad-legend--results{ display:none; }

/* Hide results legend while Filters sheet/panel is open */
#filterPanel[aria-hidden="false"] ~ main .tl-ad-legend--results{ display:none !important; }
#filterPanel.is-open ~ main .tl-ad-legend--results{ display:none !important; }

/* Also hide while backdrops are open (safety) */
#filterBackdrop.is-open ~ main .tl-ad-legend--results{ display:none !important; }
#sortBackdrop.is-open ~ main .tl-ad-legend--results{ display:none !important; }

/* ===== FINAL CLICK FIX: aria-hidden is the source of truth ===== */
.tl-backdrop[aria-hidden="true"],
.tl-modal-backdrop[aria-hidden="true"],
.tl-map-overlay[aria-hidden="true"]{
  pointer-events: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

.tl-backdrop[aria-hidden="false"],
.tl-modal-backdrop[aria-hidden="false"]{
  pointer-events: auto !important;
  visibility: visible !important;
}

.tl-backdrop.is-open[aria-hidden="true"],
.tl-modal-backdrop.is-open[aria-hidden="true"]{
  pointer-events: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

/* Hide legend while filters are open (mobile sheet) */
#filterPanel[aria-hidden="false"] ~ .tl-layout .tl-ad-legend--results,
#filterBackdrop[aria-hidden="false"] ~ .tl-layout .tl-ad-legend--results{
  display: none !important;
}

/* If filter panel is hidden, it must not catch taps */
#filterPanel[aria-hidden="true"]{
  pointer-events: none !important;
}
#filterPanel[aria-hidden="false"]{
  pointer-events: auto !important;
}



/* ===== Video badge on ad cards (ready/processing) ===== */
.tl-ad-card__thumb{ position: relative; }

.tl-ad-card__videoBadge{
  position:absolute;
  left:10px; top:10px; /* */
  width:34px; height:34px; border-radius:999px;
  display:inline-flex; align-items:center; justify-content:center;
  background: rgba(2,6,23,.55); color:#fff; z-index:4;
  box-shadow: 0 10px 20px rgba(2,6,23,.18);
  backdrop-filter: blur(6px);
}
.tl-ad-card__videoBadge svg{ width:18px; height:18px; fill: currentColor; }
.tl-ad-card__videoBadge.is-processing::after{
  content:""; position:absolute; inset:-3px; border-radius:999px;
  border:2px solid rgba(255,255,255,.35); border-top-color: rgba(255,255,255,1);
  animation: tlVideoBadgeSpin 1s linear infinite;
}
@keyframes tlVideoBadgeSpin{ to { transform: rotate(360deg); } }
