/* Λίστα ακινήτων (el/en): φίλτρα, αποτελέσματα, χάρτης, συρτάρι φίλτρων */

/* Η sticky μπάρα δεν πρέπει να κρύβει στοιχεία που παίρνουν focus */
html { scroll-padding-top: calc(var(--nav-h) + var(--bar-h, 72px) + 16px); }

/* ---------------- Κεφαλίδα ---------------- */
.breadcrumb li { display: inline-flex; align-items: center; gap: 6px; }
.page-hero .lst-stats { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 22px; min-height: 1.9rem; margin-top: 18px; font-size: var(--fs-sm); }
.lst-stats strong { font-family: var(--font-display); font-size: 1.3rem; font-weight: 500; color: #fff; }

/* ---------------- Μπάρα φίλτρων (sticky) ---------------- */
.lst-bar { position: sticky; top: var(--nav-h); z-index: var(--z-sticky); background: var(--bg); border-bottom: 1px solid var(--line); padding-block: 10px; }
.lst-panel { display: flex; align-items: flex-end; gap: 8px; }
.lst-search { flex: 1; }
.lst-search > label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lst-search-box { position: relative; display: block; }
.lst-search-box .i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.lst-search .input { padding-left: 44px; }
.lst-search .input::-webkit-search-cancel-button { cursor: pointer; }
.lst-open { flex: none; min-height: 48px; padding: 0 16px; }
.lst-n { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--r-pill); background: var(--terra); color: #fff; font-size: 12px; font-weight: 800; }
.lst-n:empty { display: none; }
.lst-trans { border: 0; margin: 0; padding: 0; min-width: 0; }
.lst-trans legend { padding: 0; margin-bottom: 6px; font-size: var(--fs-xs); font-weight: 700; color: var(--navy-900); letter-spacing: .02em; }

/* Κινητό/tablet: οι έλεγχοι ζουν στο συρτάρι (το JS τους μετακινεί· εδώ απλώς δεν αναβοσβήνουν) */
@media (max-width: 1023px) {
  .lst-panel > .lst-trans, .lst-panel > .lst-controls { display: none; }
}

/* Συρτάρι φίλτρων */
body:has(.lst-drawer[open]) { overflow: hidden; }
.lst-drawer .drawer-body { gap: 20px; align-content: start; }
.lst-drawer .seg { display: flex; width: 100%; background: var(--card); }
.lst-drawer .seg label { flex: 1; padding: 0 10px; }
.lst-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.lst-drawer .drawer-foot { align-items: center; }
.lst-drawer .drawer-foot .btn:last-child { flex: 1; min-width: 0; padding-inline: 16px; white-space: normal; line-height: 1.25; text-align: center; }

/* Desktop: μία λευκή μπάρα με πεδία τύπου «αρχικής» */
@media (min-width: 1024px) {
  .lst-bar { padding-block: 14px; }
  .lst-open { display: none; }
  .lst-panel { align-items: center; gap: 0; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
  .lst-panel .lst-trans { flex: none; margin-right: 6px; }
  .lst-panel .lst-trans legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .lst-panel .seg label { padding: 0 10px; }
  .lst-panel .lst-controls { display: contents; }
  .lst-panel .field { position: relative; flex: 1 1 0; gap: 0; padding: 6px 10px; border-radius: var(--r-md); }
  .lst-panel .lst-controls .field::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 1px; background: var(--line); }
  .lst-panel .field:focus-within { background: var(--bg); outline: 2px solid var(--ring); outline-offset: -2px; }
  .lst-panel .field:focus-within::before { opacity: 0; }
  .lst-panel .field > label { position: static; width: auto; height: auto; overflow: hidden; clip: auto; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
  .lst-panel .select, .lst-panel .input { min-height: 30px; padding: 0 22px 0 0; border: 0; border-radius: 0; background-color: transparent; background-position: right 0 center; box-shadow: none; font-size: var(--fs-sm); font-weight: 700; color: var(--navy-900); }
  .lst-panel .lst-search { flex: 1.2 1 0; }
  .lst-panel .lst-search .input { padding-left: 26px; }
  .lst-panel .lst-search-box .i { left: 0; width: 18px; height: 18px; }
}
@media (min-width: 1280px) {
  .lst-panel .seg label { padding: 0 18px; }
  .lst-panel .field { padding-inline: 14px; }
  .lst-panel .lst-search { flex-grow: 1.7; }
}

/* ---------------- Αποτελέσματα ---------------- */
.lst-results { padding-block: clamp(20px, 3vw, 32px) clamp(56px, 6vw, 96px); }
.lst-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin-bottom: 14px; }
.lst-count { margin: 0; font-size: var(--fs-xl); }
.lst-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lst-tools .select { width: auto; min-height: 44px; padding-left: 18px; border-radius: var(--r-pill); font-size: var(--fs-sm); font-weight: 700; color: var(--navy-900); }
.lst-fav { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); background: var(--card); color: var(--navy-900); font-size: var(--fs-sm); font-weight: 700; cursor: pointer; transition: background var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast); }
.lst-fav:hover { border-color: var(--navy-900); }
.lst-fav input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.lst-fav:has(input:checked) { background: var(--terra-soft); border-color: var(--terra); color: var(--terra-ink); }
.lst-fav:has(input:checked) .i { fill: currentColor; }
.lst-fav:has(input:focus-visible) { outline: 2px solid var(--ring); outline-offset: 2px; }
.lst-view .i { width: 18px; height: 18px; }
/* Κινητό/tablet: [πλήθος | λίστα/χάρτης] και από κάτω [αγαπημένα | ταξινόμηση] */
@media (max-width: 1023px) {
  .lst-tools { display: contents; }
  .lst-count { flex: 1; }
  .lst-fav { order: 2; }
  .lst-tools .select { order: 3; }
}
@media (max-width: 639px) {
  .lst-count { font-size: var(--fs-lg); }
  .lst-view label { padding: 0 12px; }
  .lst-fav { width: 44px; padding: 0; justify-content: center; }
  .lst-fav-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .lst-tools .select { flex: 1; }
}

.lst-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 20px; }
.lst-chips[hidden] { display: none; }
.lst-chip-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.lst-chips .btn-ghost { min-height: 36px; font-size: var(--fs-xs); }

.lst-grid { grid-template-columns: 1fr; }
@media (min-width: 640px) { .lst-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .lst-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.lst-grid .state .btn { margin-top: 8px; }
.state-error .state-icon { background: var(--danger-bg); color: var(--danger); }
.pcard.is-hot { border-color: var(--terra); box-shadow: 0 0 0 2px var(--terra), var(--shadow-md); }

/* ---------------- Χάρτης ---------------- */
.lst-map { display: grid; gap: 10px; }
.lst-map[hidden] { display: none; }
.lst-map .map-frame { height: 70vh; height: 70svh; min-height: 340px; }
#lstMap { position: absolute; inset: 0; }
.lst-map-note { display: flex; align-items: center; gap: 6px; margin: 0; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }
.lst-map-note[hidden] { display: none; }
.lst-map .pin-price { transition: transform var(--dur-fast) var(--ease), background var(--dur-fast); }
.leaflet-marker-icon.is-hot .pin-price { background: var(--navy-950); transform: translate(-50%, -50%) scale(1.15); box-shadow: 0 0 0 3px var(--terra-tint), 0 8px 18px -4px rgba(11,27,43,.6); }
.leaflet-marker-icon.is-hot .pin-price.rent { background: var(--terra-ink); }

@media (max-width: 1023px) {
  .lst-body { display: flex; flex-direction: column; }
  .lst-map { order: -1; margin-bottom: 20px; }
  .lst-map .map-frame { margin-inline: calc(var(--gutter) * -1); border-radius: 0; border-inline: 0; }
}
/* Desktop: λίστα αριστερά (~40%), sticky χάρτης δεξιά σε όλο το ύψος κάτω από τη μπάρα */
@media (min-width: 1024px) {
  .lst-map-mode .lst-bar > .container, .lst-map-mode .lst-results { max-width: none; }
  .lst-map-mode .lst-body { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 24px; align-items: start; }
  .lst-map-mode .lst-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 18px; }
  .lst-map { position: sticky; top: calc(var(--nav-h) + var(--bar-h, 92px) + 16px); }
  .lst-map .map-frame { height: calc(100vh - var(--nav-h) - var(--bar-h, 92px) - 64px); min-height: 420px; }
}
