/* ======================================================================
   Facet sidebar - kattintasra nyilo, arculathelyes facet-fejlecek + a sav
   ragados (sticky) + onalloan gorgetheto viselkedese a keresooldalon.
   Markanevek (brand): #5b9dc6 kek, #497e9e hover, #33607f sotet kek,
   #eff4fa / #e2ecf7 vilagos hatter. ASCII-only, CRLF.
   ========================================================================= */

/* --- Kattinthato, arculathelyes fejlecek (accordion-sav) --- */
.facet-collapsible > .block-title {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  position: relative;
  display: block;
  margin: 0 0 0.5rem;
  padding: 0.65rem 2.2rem 0.65rem 0.85rem;
  background-color: #eff4fa;
  color: #33607f;
  border: 1px solid #d7e3ef;
  border-left: 4px solid #5b9dc6;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.facet-collapsible > .block-title:hover,
.facet-collapsible > .block-title:focus {
  background-color: #e2ecf7;
  border-color: #b9cfe6;
  border-left-color: #497e9e;
  outline: none;
}

/* Nyil-jelzo: nyitva lefele, csukva jobbra mutat. */
.facet-collapsible > .block-title::after {
  content: "";
  position: absolute;
  right: 0.9rem;
  top: 50%;
  width: 0.5em;
  height: 0.5em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s ease;
  opacity: 0.75;
}

.facet-collapsible.is-collapsed > .block-title::after {
  transform: translateY(-50%) rotate(-45deg);
}

.facet-collapsible.is-collapsed .facets-widget-checkbox {
  display: none;
}

/* A nyitott lista legyen kicsit behuzva, hogy a fejlechez tartozzon. */
.facet-collapsible .facets-widget-checkbox {
  padding: 0 0.25rem 0.5rem;
}

/* --- Ragados + gorgetheto sav a keresooldalon (csak nagy kepernyon) --- */
@media (min-width: 992px) {
  /* A sticky-t blokkolo esetleges ancestor-overflow feloldasa. */
  .page-view-listing-search-facets .main-container-fullwidth,
  .page-view-listing-search-facets .main-container-fullwidth > .container-fluid,
  .page-view-listing-search-facets .main-container-fullwidth > .container-fluid > .row {
    overflow: visible;
  }

  .page-view-listing-search-facets aside[role="complementary"] {
    position: -webkit-sticky;
    position: sticky;
    top: 1rem;
    align-self: flex-start;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
  }

  .page-view-listing-search-facets aside[role="complementary"]::-webkit-scrollbar {
    width: 8px;
  }

  .page-view-listing-search-facets aside[role="complementary"]::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
  }
}
/* --- PK-MOBIL-SAV (2026-09-24) - "Szurok" es "Terkep" gomb, 992px alatt ---
   A gombokat a facet-sidebar.js (pkKeresoMobilSav) epiti fel, es csak akkor
   teszi ki a body.pk-kereso-mobil osztalyt - JS nelkul minden a regi.
   Nyitott allapotok: body.pk-szurok-nyitva, body.pk-terkep-nyitva.
   A gomb megjelenese a bejelentkezett "Kereses es szures" gomb mintaja
   (listing_profile/css/kereso_osszecsukas.css, PK-GOMB-KONTRASZT). */
.pk-kereso-sav {
  display: none;
}

@media (max-width: 991.98px) {
  body.pk-kereso-mobil .pk-kereso-sav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    flex: 0 0 100%;
    max-width: 100%;
    padding-left: calc(var(--bs-gutter-x, 1.5rem) * 0.5);
    padding-right: calc(var(--bs-gutter-x, 1.5rem) * 0.5);
    margin: 12px 0;
  }

  .pk-kereso-sav__gomb {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    min-height: 46px;
    margin: 0;
    padding: 11px 14px;
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 8px;
    background-color: rgba(51, 96, 127, 0.92);
    color: #ffffff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    text-align: left;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
  }

  .pk-kereso-sav__gomb:hover,
  .pk-kereso-sav__gomb:focus,
  .pk-kereso-sav__gomb.is-open {
    background-color: rgba(51, 96, 127, 1);
    color: #ffffff;
  }

  .pk-kereso-sav__gomb:focus-visible {
    outline: 2px solid #33607f;
    outline-offset: 2px;
  }

  .pk-kereso-sav__felirat {
    flex: 1 1 auto;
    min-width: 0;
  }

  .pk-kereso-sav__ikon {
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    margin-right: 3px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-3px) rotate(45deg);
    transition: transform 0.2s ease;
  }

  .pk-kereso-sav__gomb.is-open .pk-kereso-sav__ikon {
    transform: translateY(1px) rotate(225deg);
  }

  /* Szurosav: a sablon "d-none d-lg-block"-ja marad az alap, a gomb nyitja.
     A sav desktopon ragados (sticky) - itt statikus, teljes szelessegu. */
  body.pk-kereso-mobil.pk-szurok-nyitva aside.col-lg-2.d-none {
    display: block !important;
    position: static !important;
    max-height: none !important;
    overflow: visible !important;
    flex: 0 0 100%;
    max-width: 100%;
    margin-bottom: 0.75rem;
    animation: pk-kereso-sav-nyit 0.2s ease both;
  }

  /* Terkep: alapbol rejtve, nyitva a talalati lista FOLOTT, statikusan. */
  body.pk-kereso-mobil #listing-search-facet-results-map {
    display: none !important;
  }

  body.pk-kereso-mobil.pk-terkep-nyitva #listing-search-facet-results-map {
    display: block !important;
    order: -1;
    position: static !important;
    flex: 0 0 100%;
    max-width: 100%;
    margin-bottom: 1rem;
    animation: pk-kereso-sav-nyit 0.2s ease both;
  }

  body.pk-kereso-mobil #listing-search-facet-results-map .leaflet-container {
    height: 60vh !important;
    min-height: 300px;
  }

  body.pk-kereso-mobil #listing-search-facet-results-map .pk-suti-zarolt {
    min-height: 0 !important;
  }

  .pk-kereso-sav__uzenet {
    margin: 0 0 8px;
    padding: 8px 12px;
    border-left: 4px solid #5b9dc6;
    border-radius: 6px;
    background-color: #eff4fa;
    color: #33607f;
    font-size: 14px;
    line-height: 1.35;
  }
}

@keyframes pk-kereso-sav-nyit {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.pk-kereso-mobil.pk-szurok-nyitva aside.col-lg-2.d-none,
  body.pk-kereso-mobil.pk-terkep-nyitva #listing-search-facet-results-map {
    animation: none;
  }

  .pk-kereso-sav__ikon {
    transition: none;
  }
}
