/* Director profesioniști — 3 coloane (filtre | listings | hartă), full-bleed.
   Adaptat din psymep .sg-* (Bootstrap) la lh-* tokens (vanilla CSS). */

/* Lock the directory shell to viewport height so only the listings + map
   scroll. The legalhub navbar pushes us down via flex on body. */
html:has(.pf), body:has(.pf) {
  height: 100dvh; margin: 0; padding: 0; overflow: hidden;
}
body:has(.pf) {
  display: flex; flex-direction: column; background: var(--lh-bg);
}
body:has(.pf) > main {
  flex: 1 1 0; min-height: 0; display: flex; padding: 0;
}
/* Director e o pagină de tip "app shell" — footer-ul global e clutter aici. */
body:has(.pf) > .lh-footer { display: none; }

.pf {
  flex: 1; min-height: 0;
  display: grid;
  grid-template-columns: 240px 420px 1fr;
  background: var(--lh-bg);
}

/* ── Filters column ────────────────────────────────────────────────────── */
.pf-filters-col {
  background: #fff;
  border-right: 1px solid var(--lh-border);
  overflow-y: auto;
}
.pf-filters-panel {
  padding: 1rem 1rem 1.5rem;
  font-size: .85rem;
}

.pf-crumbs {
  font-size: .7rem;
  color: var(--lh-muted);
  margin-bottom: 1rem;
  display: flex;
  gap: .35rem;
  align-items: center;
}
.pf-crumbs a { color: var(--lh-muted); text-decoration: none; }
.pf-crumbs a:hover { color: var(--lh-primary); }
.pf-crumb-sep { color: #cbd5e1; }
.pf-crumb-current { color: var(--lh-text); font-weight: 500; }

.pf-filters-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 1rem;
}
.pf-filters-title { font-size: .95rem; font-weight: 700; margin: 0; }
.pf-reset {
  background: none; border: 0; font: inherit;
  color: var(--lh-muted); font-size: .75rem; cursor: pointer; padding: 0;
}
.pf-reset:hover { color: var(--lh-primary); }

.pf-field {
  display: block;
  margin-bottom: 1.25rem;
}
.pf-label {
  display: block;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 600;
  color: var(--lh-muted);
  margin-bottom: .35rem;
}
.pf-field input[type="search"],
.pf-field select {
  width: 100%;
  font: inherit;
  font-size: .82rem;
  padding: .35rem .5rem;
  border: 1px solid var(--lh-border);
  border-radius: 4px;
  background: #fff;
}
.pf-field input[type="search"]:focus,
.pf-field select:focus {
  outline: none;
  border-color: var(--lh-primary);
  box-shadow: 0 0 0 3px rgba(26,84,144,.1);
}

.pf-field-group {
  border-bottom: 1px solid var(--lh-border);
  padding-bottom: 1rem;
}
.pf-field-group:last-of-type { border-bottom: 0; }

.pf-pills { display: flex; gap: .4rem; }
.pf-pill { cursor: pointer; }
.pf-pill input { display: none; }
.pf-pill span {
  display: inline-block;
  padding: .25rem .7rem;
  font-size: .75rem;
  border: 1px solid var(--lh-border);
  border-radius: 999px;
  color: var(--lh-text);
  transition: background .12s, color .12s, border-color .12s;
}
.pf-pill input:checked + span {
  background: var(--lh-primary);
  color: #fff;
  border-color: var(--lh-primary);
}

.pf-check-list { display: flex; flex-direction: column; gap: .15rem; }
.pf-check, .pf-radio {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .78rem;
  cursor: pointer;
  padding: .15rem 0;
}
.pf-check input { margin: 0; accent-color: var(--lh-primary); }

.pf-apply-mobile {
  display: none;
  width: 100%;
  margin-top: 1rem;
}

/* ── Listings column ───────────────────────────────────────────────────── */
.pf-listings-col {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-right: 1px solid var(--lh-border);
  min-height: 0;
}
.pf-listings-head {
  padding: 1rem 1.25rem .85rem;
  border-bottom: 1px solid var(--lh-border);
  display: flex;
  flex-direction: column;
  gap: .2rem;
  background: #fff;
  position: relative;
}
.pf-h1 { font-size: 1.05rem; margin: 0; font-weight: 600; }
.pf-count { margin: 0; font-size: .75rem; color: var(--lh-muted); }
.pf-mobile-filters-toggle {
  display: none;
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: #fff;
  border: 1px solid var(--lh-border);
  border-radius: var(--lh-radius);
  font: inherit;
  font-size: .8rem;
  color: var(--lh-text);
  padding: .35rem .7rem;
  cursor: pointer;
  display: none;
  align-items: center;
  gap: .35rem;
}
.pf-mobile-filters-toggle:hover { background: var(--lh-accent); border-color: var(--lh-primary); }

.pf-list {
  flex: 1 1 0;
  overflow-y: auto;
  padding: .5rem .5rem 1.5rem;
}

.pf-card {
  display: flex;
  gap: .85rem;
  padding: .85rem;
  background: #fff;
  border: 1px solid transparent;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  margin: .25rem 0;
  transition: border-color .12s, box-shadow .12s, background .12s;
}
.pf-card:hover {
  border-color: var(--lh-border);
  background: var(--lh-accent);
}
.pf-card.is-active {
  border-color: var(--lh-primary);
  box-shadow: 0 0 0 1px var(--lh-primary), 0 6px 16px rgba(26,84,144,.12);
}

.pf-card-img {
  width: 72px; height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--lh-accent);
}
.pf-card-body {
  flex: 1; min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.pf-card-name {
  font-size: .95rem;
  font-weight: 600;
  color: var(--lh-text);
  margin: 0;
  display: flex; align-items: center; gap: .35rem;
}
.pf-verified-badge {
  display: inline-flex;
  width: 14px; height: 14px;
  background: var(--lh-primary);
  color: #fff;
  border-radius: 50%;
  align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700;
}
.pf-card-tagline {
  font-size: .78rem;
  color: var(--lh-muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pf-card-meta {
  font-size: .7rem;
  color: var(--lh-muted);
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .65rem;
  margin-top: .15rem;
}
.pf-card-meta .pf-meta-icon { color: var(--lh-primary); margin-right: .15rem; }
.pf-card-badges {
  display: flex; flex-wrap: wrap; gap: .25rem;
  margin-top: .25rem;
}
.pf-card-badges .pf-badge {
  background: var(--lh-accent);
  color: var(--lh-text);
  font-size: .65rem;
  font-weight: 500;
  padding: .12rem .45rem;
  border-radius: 3px;
}
.pf-card-badges .pf-badge-primary {
  background: rgba(26,84,144,.1);
  color: var(--lh-primary);
  font-weight: 600;
}

.pf-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--lh-muted);
  font-size: .85rem;
}
.pf-empty p { margin: 0 0 .8rem; }

/* ── Map column ────────────────────────────────────────────────────────── */
.pf-map-col { position: relative; min-height: 0; }
.pf-map { width: 100%; height: 100%; min-height: 300px; }

/* Custom marker icon */
.pf-pin { background: none; border: none; }
.pf-pin-svg {
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.25));
}

/* Cluster icon */
.pf-cluster-icon { background: none; }
.pf-cluster {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--lh-primary);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  border: 2px solid #fff;
}

/* Map popup */
.pf-popup { text-align: center; min-width: 140px; }
.pf-popup img {
  width: 56px; height: 56px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: .35rem;
}
.pf-popup-name {
  display: block;
  font-weight: 600;
  font-size: .82rem;
  color: var(--lh-text);
  margin-bottom: .15rem;
}
.pf-popup-city { font-size: .72rem; color: var(--lh-muted); }
.pf-popup-link {
  display: inline-block;
  margin-top: .5rem;
  font-size: .72rem;
  color: var(--lh-primary);
  font-weight: 600;
  text-decoration: none;
}
.pf-popup-link:hover { text-decoration: underline; }

/* Leaflet attribution override — smaller, less obtrusive */
.leaflet-control-attribution { font-size: 10px; background: rgba(255,255,255,.7); }

/* ── Mobile offcanvas ──────────────────────────────────────────────────── */
.pf-offcanvas {
  position: fixed; inset: 0;
  z-index: 2000;
  display: flex;
}
.pf-offcanvas[hidden] { display: none; }
.pf-offcanvas-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.4);
  animation: pf-fade .18s ease;
}
.pf-offcanvas-panel {
  position: relative;
  width: 86vw; max-width: 360px;
  background: #fff;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  box-shadow: 0 0 28px rgba(0,0,0,.3);
  animation: pf-slide-in .22s ease;
}
.pf-offcanvas-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--lh-border);
}
.pf-offcanvas-head h3 { margin: 0; font-size: 1rem; }
.pf-close {
  background: none; border: 0; font-size: 1.4rem;
  cursor: pointer; color: var(--lh-muted);
  line-height: 1; padding: 0 .25rem;
}
.pf-close:hover { color: var(--lh-text); }
.pf-offcanvas-body { flex: 1 1 0; overflow-y: auto; }

@keyframes pf-fade   { from { opacity: 0; } to { opacity: 1; } }
@keyframes pf-slide-in {
  from { transform: translateX(-100%); }
  to   { transform: translateX(0); }
}

/* ── Mobile responsive ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .pf {
    grid-template-columns: 1fr;
    grid-template-rows: 50vh 1fr;
  }
  .pf-filters-col {
    display: none; /* moved into offcanvas by JS */
  }
  .pf-listings-col {
    grid-row: 2;
    border-right: none;
    border-top: 1px solid var(--lh-border);
  }
  .pf-map-col { grid-row: 1; }
  .pf-mobile-filters-toggle { display: flex; }
  .pf-apply-mobile { display: block; }
}
