/* ════════════════════════════════════════════════════════════════════════════════════════════
   /propertiesstatic (EN, /fa/, /ar/) — shared listing fixes, 2026-09-22 UI/UX audit.

   WHY THIS FILE: the listing page carries three separate ~65 KB inline <style> blocks (one per
   language) stacked with !important layers. Fixing the same thing three times would triple the
   drift, so the three pages now load this ONE file at the end of the listing snippet.
   (Until today this file only held styles for a ".dn-new-only-toggle" switch that no page renders
   any more and no page loaded it; those dead rules are gone.)

   Every selector starts with "#dnHybridListings.dn-hybrid-listings" — one class more than the
   inline rules and css/dn-portal-navigation-v2.css ("#dnHybridListings .x" / "#dnHybridListings
   .dn-pf-shell .x") — so it wins on specificity, not on load order.
   ════════════════════════════════════════════════════════════════════════════════════════════ */

/* ── #7  All | Off-plan | Ready | New listings ───────────────────────────────────────────────
   Desktop keeps the 4-up track (js/dn-portal-fixes-r121.js sets the grid inline). On phones the
   same script forces 2 columns; inside a single rounded track that became a 2x2 blob where only
   the active item had a shape. Below 620px every item is now its own pill with a border and a
   44px hit area, so the four options read as four options in every language. */
#dnHybridListings.dn-hybrid-listings .dn-filter-v5 .dn-mode-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  white-space: nowrap !important;
}
#dnHybridListings.dn-hybrid-listings .dn-filter-v5 .dn-mode-btn:focus-visible {
  outline: 2px solid #0062cc !important;
  outline-offset: 2px !important;
}
@media (max-width: 620px) {
  #dnHybridListings.dn-hybrid-listings .dn-filter-v5 .dn-mode-row {
    gap: 8px !important;
    margin: 0 0 12px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  #dnHybridListings.dn-hybrid-listings .dn-filter-v5 .dn-mode-btn {
    min-height: 44px !important;
    padding: 0 12px !important;
    border: 1px solid #bdcfe2 !important;
    border-radius: 999px !important;
    background: #fff !important;
    color: #3a3f47 !important;
    font-size: 14px !important;
    font-weight: 750 !important;
    box-shadow: 0 1px 2px rgba(21, 24, 29, .04) !important;
  }
  #dnHybridListings.dn-hybrid-listings .dn-filter-v5 .dn-mode-btn.active {
    border-color: #0062cc !important;
    background: linear-gradient(135deg, #1787ff, #0062cc) !important;
    color: #fff !important;
    box-shadow: 0 6px 14px rgba(0, 97, 201, .22) !important;
  }
}

/* ── #17  Cards that line up across a row ────────────────────────────────────────────────────
   Every block above the agent footer now has a FIXED height, so a 1-line title, a missing area
   or a different fact set can no longer push the spec row or the footer up or down. */
/* The card is only as tall as its content. EN and AR carried this in a late inline block
   ("REMOVE USELESS EMPTY SPACE"); FA did not, so a Persian card kept min-height:590px and an empty
   band of ~70px above its spec row. */
#dnHybridListings.dn-hybrid-listings .dn-card { min-height: 0 !important; height: auto !important; }
#dnHybridListings.dn-hybrid-listings .dn-card-content { flex: 0 0 auto !important; }
#dnHybridListings.dn-hybrid-listings .dn-card-main { flex: 0 0 auto !important; display: block !important; }
#dnHybridListings.dn-hybrid-listings .dn-card-body { height: auto !important; display: block !important; }
#dnHybridListings.dn-hybrid-listings .dn-card-topline {
  height: 22px !important;
  min-height: 22px !important;
  margin: 0 0 8px !important;
  justify-content: flex-start !important;
  align-items: center !important;
  gap: 6px !important;
  overflow: hidden !important;
}
/* One badge system: every badge has the same shape and type; colour carries meaning.
   Purpose (Buy / Rent / Off-plan) = ivory + gold, "New" = ink + gold, "Sold out" = ink outline.
   Before: grey, beige, green and red pills of three sizes. */
#dnHybridListings.dn-hybrid-listings .dn-card-badge {
  display: inline-flex !important;
  align-items: center !important;
  height: 22px !important;
  margin: 0 !important;
  padding: 0 9px !important;
  border: 1px solid #a6c8ed !important;
  border-radius: 999px !important;
  background: #dfedfb !important;
  color: #00458f !important;
  font-size: 12px !important;
  line-height: 1 !important;
  font-weight: 800 !important;
  letter-spacing: .04em !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
  box-shadow: none !important;
}
#dnHybridListings.dn-hybrid-listings .dn-card-badge.new {
  border-color: #111722 !important;
  background: #111722 !important;
  color: #69affb !important;
}
#dnHybridListings.dn-hybrid-listings .dn-card-badge.soldout {
  border-color: #111722 !important;
  background: #fff !important;
  color: #111722 !important;
}
[dir="rtl"] #dnHybridListings.dn-hybrid-listings .dn-card-badge,
#dnHybridListings.dn-hybrid-listings[dir="rtl"] .dn-card-badge {
  letter-spacing: 0 !important;
}
/* The publication date left the spec row (it was the 4th fact that wrapped on Ready cards) and
   now closes the badge line, where recency belongs next to "New". */
#dnHybridListings.dn-hybrid-listings .dn-card-listed {
  margin-inline-start: auto !important;
  color: #7b818b !important;
  font-size: 12px !important;
  line-height: 22px !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
}
#dnHybridListings.dn-hybrid-listings .dn-card-reference {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
#dnHybridListings.dn-hybrid-listings .dn-card-property-type,
#dnHybridListings.dn-hybrid-listings .dn-card-price {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
/* Title: exactly two lines of space, clamped, whether the name is one line or four. */
#dnHybridListings.dn-hybrid-listings .dn-card-title {
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
  overflow: hidden !important;
  height: 2.7em !important;
  min-height: 2.7em !important;
  line-height: 1.35 !important;
}
/* Area: one line (it reserved two lines for a one-line place name). */
#dnHybridListings.dn-hybrid-listings .dn-card-area {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  height: 18px !important;
  min-height: 18px !important;
  margin: 0 0 12px !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  -webkit-line-clamp: unset !important;
}
#dnHybridListings.dn-hybrid-listings .dn-card-area > span {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
/* Spec row: always ONE row of three equal cells (Ready: bedrooms / bathrooms / size,
   Off-plan: bedrooms / type / handover). Labels at 10px instead of 6.5-8px (#23), never broken
   mid-word ("BATHROOM S"), values ellipsised with the full text in the title attribute. */
#dnHybridListings.dn-hybrid-listings .dn-card-facts {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  height: 50px !important;
  margin: 0 !important;
  padding: 12px 0 0 !important;
  overflow: hidden !important;
  border-top: 1px solid #dfe6ee !important;
}
#dnHybridListings.dn-hybrid-listings .dn-card-fact {
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 6px !important;
  margin: 0 !important;
  padding: 0 8px !important;
  border: 0 !important;
  border-inline-end: 1px solid #d8e1eb !important;
  border-radius: 0 !important;
  background: transparent !important;
}
#dnHybridListings.dn-hybrid-listings .dn-card-fact:first-child { padding-inline-start: 0 !important; }
#dnHybridListings.dn-hybrid-listings .dn-card-fact:last-child { padding-inline-end: 0 !important; border-inline-end: 0 !important; }
#dnHybridListings.dn-hybrid-listings .dn-card-fact svg { width: 16px !important; height: 16px !important; flex: 0 0 16px !important; }
#dnHybridListings.dn-hybrid-listings .dn-card-fact-copy { min-width: 0 !important; display: block !important; }
#dnHybridListings.dn-hybrid-listings .dn-card-fact small {
  display: block !important;
  margin: 0 0 3px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  word-break: keep-all !important;
  color: #858b94 !important;
  font-size: 12px !important;
  line-height: 1.1 !important;
  font-weight: 800 !important;
  letter-spacing: .03em !important;
  text-transform: uppercase !important;
}
#dnHybridListings.dn-hybrid-listings .dn-card-fact b {
  display: block !important;
  max-width: none !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: #262c35 !important;
  font-size: 12px !important;
  line-height: 1.3 !important;
  font-weight: 800 !important;
}
/* The shared Contact button inherited a top-aligned label inside a 44px box. */
#dnHybridListings.dn-hybrid-listings .dn-agent-enquire {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
/* Pagination buttons: 44px targets, the same ink as the active mode, chevrons drawn by
   the script in reading order (so RTL points the right way). */
#dnHybridListings.dn-hybrid-listings .dn-pagination button {
  min-width: 44px !important;
  min-height: 44px !important;
  border-radius: 12px !important;
  font-weight: 800 !important;
}

/* #19: the "AED" prefix of the price fields broke into "AE / D" in the narrow Arabic drawer. */
#dnHybridListings.dn-hybrid-listings .dn-price-input b { flex: 0 0 auto !important; white-space: nowrap !important; align-items: center !important; }

/* ── #27  A phone shows the first cards, then "Show more" (15 cards were ~9,000px) ──────────── */
#dnHybridListings.dn-hybrid-listings .dn-grid.dn-grid-collapsed > .dn-card:nth-child(n+7) { display: none !important; }
#dnHybridListings.dn-hybrid-listings .dn-show-more {
  display: flex;
  width: 100%;
  min-height: 48px;
  margin: 18px 0 0;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #95bbe4;
  border-radius: 999px;
  background: #fff;
  color: #151a22;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
#dnHybridListings.dn-hybrid-listings .dn-show-more:hover { border-color: #0062cc; background: #fffaf0; }
#dnHybridListings.dn-hybrid-listings .dn-show-more[hidden] { display: none !important; }

@media (max-width: 680px) {
  #dnHybridListings.dn-hybrid-listings .dn-card-fact { padding: 0 6px !important; gap: 5px !important; }
  #dnHybridListings.dn-hybrid-listings .dn-card-fact svg { width: 14px !important; height: 14px !important; flex-basis: 14px !important; }
}
