/* ============================================================
   <pb-location-picker> — the "Ort" popover
   ------------------------------------------------------------
   Verbatim port of the approved original `.locpop` / `.lp-*`
   rules (ds.css) so it matches pixel-for-pixel. The component
   appends itself to <body> and positions via JS, so the only
   deviations from the original are position:fixed + a higher
   z-index (architecture, not look). The soft skin (`.alt`) is
   the default. All values already flow through design tokens.
   ============================================================ */

pb-location-picker { display: contents; }

.locpop {
  position: fixed;                 /* JS sets top/left; body-appended */
  z-index: var(--z-popover);       /* above the rail + page chrome */
  width: 18.75rem;
  max-width: calc(100vw - 1rem);
  background: var(--surface);
  /* Borderless — matches the "Merken" popover: no hairline, just a soft lift. */
  border: none;
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  text-align: left;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: locpop-in 0.16s var(--ease); /* same entrance as the sibling popovers */
}
@keyframes locpop-in {
  from { opacity: 0; transform: translateY(-0.25rem) scale(0.985); }
  to   { opacity: 1; transform: none; }
}

/* ---- Search ---- */
.lp-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.75rem 0.75rem 0.125rem;
  padding: 0.375rem 0.75rem;
  background: var(--surface-2);
  border-radius: var(--r-pill);
  position: relative;
}
.lp-search > svg { width: 16px; height: 16px; color: var(--text-faint); flex: none; }
.lp-search input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
}
.lp-search input::placeholder { color: var(--text-faint); }

.lp-x {
  flex: none;
  border: none;
  background: var(--surface-3);
  color: var(--text-soft);
  width: 1.375rem; height: 1.375rem;
  border-radius: var(--r-pill);
  cursor: pointer;
  font-size: 0.625rem;
  display: grid; place-items: center;
  padding: 0;
}
.lp-x:hover { background: var(--border-strong); color: var(--text); }

/* ---- Selected panel (decoupled from the option list) ---- */
.lp-sel { position: relative; padding: 0.6875rem 0.875rem 1rem; }
.lp-sel::before {
  content: "";
  position: absolute;
  top: 0; left: 0.875rem; right: 0.875rem;
  height: 0.0625rem; background: var(--border);
}
.lp-sel-h {
  display: flex; align-items: center; justify-content: space-between; gap: 0.625rem;
  font-family: var(--font-mono); font-size: var(--fs-label); font-weight: 500; letter-spacing: var(--track-label);
  text-transform: uppercase; color: var(--text-faint); margin-bottom: 0.4375rem;
}

.lp-chips { display: flex; flex-wrap: wrap; gap: 0.3125rem; }
.lp-chip {
  display: inline-flex; align-items: center; gap: 0.25rem;
  background: var(--surface-2); border: none; border-radius: var(--r-pill);
  padding: 0.3125rem 0.4375rem 0.3125rem 0.75rem; font-size: var(--fs-sm); color: var(--text); font-weight: 500;
}
.lp-chip button {
  border: none; background: transparent; color: var(--text-faint);
  cursor: pointer; font-size: 0.625rem; width: 1rem; height: 1rem;
  border-radius: 50%; display: grid; place-items: center; padding: 0;
}
.lp-chip button:hover { background: var(--surface-3); color: var(--text); }

.lp-empty {
  display: inline-flex; align-items: center; gap: 0.4375rem;
  font-size: var(--fs-sm); color: var(--text-faint); padding: 0.125rem 0 0.0625rem;
}
.lp-empty svg { width: 14px; height: 14px; }

/* ---- Scrollable list ---- */
.lp-list { max-height: 17rem; overflow: auto; padding: 0.5rem; overscroll-behavior: contain; }
.lp-sect {
  font-family: var(--font-mono); font-size: var(--fs-label); font-weight: 500; letter-spacing: var(--track-label);
  text-transform: uppercase; color: var(--text-faint); padding: 0.75rem 0.625rem 0.3125rem;
}

/* Option rows: name left · count / check / chevron right */
.lp-row {
  display: flex; align-items: center; gap: 0.625rem; width: 100%;
  border: none; background: transparent; color: var(--text);
  font-family: var(--font-body); font-size: var(--fs-body);
  padding: 0.5625rem 0.625rem; border-radius: var(--r-sm); cursor: pointer; text-align: left;
}
.lp-row:hover { background: var(--fill-hover); }
.lp-nm { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 0.4375rem; overflow: hidden; }
.lp-inl { color: var(--text-faint); font-size: var(--fs-sm); white-space: nowrap; }
.lp-row.on .lp-nm { font-weight: 600; }
.lp-meta { flex: none; margin-left: auto; display: flex; align-items: center; gap: 0.5rem; }
.lp-ct { font-size: var(--fs-sm); color: var(--text-faint); font-variant-numeric: tabular-nums; }
/* „(0/m)" unter dem aktiven Berufsfilter: sichtbar, aber gedämpft —
   Ausblenden war irreführend (29.08.); wählbar bleibt die Zeile. */
.lp-row.is-none .lp-nm { color: var(--text-faint); }
.lp-on { display: grid; place-items: center; }
.lp-on svg { width: 14px; height: 14px; color: var(--text); }
.lp-row.imp .lp-on svg { opacity: .4; }              /* implied: city covered by a selected country */
.lp-next { display: grid; place-items: center; color: var(--text-faint); }
.lp-next svg { width: 14px; height: 14px; }
.lp-row:hover .lp-next { color: var(--text); }

.lp-none { padding: 1.125rem 0.875rem; font-size: var(--fs-body); color: var(--text-faint); }

/* ---- Soft skin (.alt) — the default ---- */
.alt .lp-search { background: var(--surface-2); border: none; }
/* fill stays put on focus (app-wide input rule) */
/* Rows concentric with the panel (radius − list padding), sort-dropdown hover. */
.alt .lp-row { border-radius: calc(var(--r-xl) - 0.5rem); padding: 0.5625rem 0.8125rem; }
.alt .lp-row:hover { background: var(--fill-hover); }
.alt .lp-chip { background: var(--text); color: var(--surface); }
.alt .lp-chip button { color: color-mix(in srgb, var(--surface) 65%, transparent); }
.alt .lp-chip button:hover { background: color-mix(in srgb, var(--surface) 18%, transparent); color: var(--surface); }

/* ---- Accordion nesting (cities under a country) ---- */
.lp-row.nest { padding-left: 2.125rem; position: relative; }
.alt .lp-row.nest { padding-left: 2.25rem; }
.lp-row.nest::before { content: ""; position: absolute; left: 1.25rem; top: 0; bottom: 0; width: 0.0625rem; background: var(--border); }
.lp-row.nest::after { content: ""; position: absolute; left: 1.25rem; top: 50%; width: 0.5rem; height: 0.0625rem; background: var(--border); }
.lp-row.nest.lp-last::before { bottom: 50%; }
.lp-row .lp-next svg { transition: transform var(--dur) var(--ease); }
.lp-row.acc-open .lp-next svg { transform: rotate(90deg); }

/* The search input keeps NO focus ring (matches the original outline:none). */
.lp-search input:focus,
.lp-search input:focus-visible { outline: none; }
