/* Experience 4.0.4 / 4.0.12 — Austria Map (full-page shell) */
.page-map .pm-page {
  padding: 0.55rem 0 0 !important;
  flex: 1;
}
.page-map .pm-page-inner {
  max-width: none !important;
  width: 100%;
  padding: 0 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: calc(100vh - var(--header-h, 64px) - 0.5rem);
}
.page-map .pm-page-head { max-width: none; width: 100%; margin: 0; }
.page-map .pm-page-title { align-items: end; gap: 0.5rem; }
.page-map .pm-page-title h1 {
  margin: 0.1rem 0 0.15rem;
  font-size: clamp(1.35rem, 2vw, 1.75rem) !important;
  min-height: 0 !important;
}
.page-map .pm-page-lead {
  margin: 0 !important;
  font-size: 0.86rem;
  max-width: 62ch;
}
.page-map .p-back { margin-bottom: 0.25rem; }
.page-map .ex-note { margin: 0.35rem auto 0.75rem; max-width: var(--ds-max, 1160px); width: 100%; }

.pm-app {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 0;
  flex: 1 1 auto;
  min-height: calc(100vh - var(--header-h, 64px) - 7.25rem);
  height: calc(100vh - var(--header-h, 64px) - 7.25rem);
  min-width: 0;
}
.pm-side {
  --pm-side-pad: 0.95rem;
  background:
    linear-gradient(180deg, rgba(0, 134, 201, 0.06) 0%, transparent 7.5rem),
    #fff;
  border: 1px solid var(--ds-line, var(--sig-line));
  border-right: 0;
  border-radius: var(--ds-radius, var(--radius)) 0 0 var(--ds-radius, var(--radius));
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 100%;
  min-width: 0;
  overflow: hidden;
  z-index: 2;
  box-shadow: inset -1px 0 0 rgba(8, 28, 44, 0.04);
}
.pm-map-wrap {
  position: relative; min-height: 0; height: 100%; min-width: 0; z-index: 1;
  border-radius: 0 var(--ds-radius, var(--radius)) var(--ds-radius, var(--radius)) 0; overflow: hidden;
  border: 1px solid var(--ds-line, var(--sig-line)); border-left: 0; background: #d7e0ea;
}
#pmMap { position: absolute !important; inset: 0 !important; min-height: 0 !important; height: auto !important; }
.leaflet-pmAtPane-pane { pointer-events: none; }
.pm-at-outline { filter: drop-shadow(0 0 0.5px rgba(0, 134, 201, 0.35)); }
.pm-map-toolbar {
  /* Top-right: keep clear of Leaflet zoom (+/−) which sits top-left */
  position: absolute; z-index: 500; top: .6rem; right: .6rem; left: auto;
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .4rem;
  max-width: calc(100% - 3.5rem); pointer-events: none;
}
.pm-map-toolbar > * { pointer-events: auto; }
.pm-map-wrap .leaflet-top.leaflet-left {
  z-index: 510; /* zoom remains clickable above map tiles */
}
.pm-layer-tabs, .pm-view-tools {
  display: inline-flex;
  background: rgba(255,255,255,.96);
  border-radius: 999px;
  border: 1px solid var(--ds-line, var(--sig-line));
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(8, 28, 44, 0.08);
}
.pm-layer-tabs button, .pm-view-tools button {
  border: 0; background: transparent; padding: .4rem .85rem; font: inherit; font-size: .82rem; font-weight: 650; cursor: pointer; color: var(--ds-slate, var(--sig-slate));
}
.pm-layer-tabs button.is-active, .pm-view-tools button.is-active {
  background: var(--ds-blue, #0086C9); color: #fff;
}

/* —— Sidebar filters —— */
.pm-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.45rem 0.5rem;
  padding: var(--pm-side-pad);
  padding-bottom: 0.7rem;
  border-bottom: 1px solid rgba(215, 224, 234, 0.9);
  background: transparent;
  flex: 0 0 auto;
}
.pm-filters > label:nth-child(1),
.pm-filters > .pm-check,
.pm-filters > .pm-layer-group,
.pm-filters > .pm-actions-bar,
.pm-filters > label:has(#pmOriginMuni),
.pm-filters > label:has(#pmSearch) {
  grid-column: 1 / -1;
}
.pm-filters > label:not(.pm-check) {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ds-slate, #64748B);
}
.pm-filters > label,
.pm-filters > .pm-actions-bar,
.pm-filters > .pm-layer-group {
  min-width: 0;
  max-width: 100%;
}
.pm-filters input[type="search"],
.pm-filters input:not([type="checkbox"]),
.pm-filters select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 2.2rem;
  border: 1px solid var(--ds-line, #D7E0EA) !important;
  border-radius: 10px !important;
  padding: 0.3rem 0.65rem !important;
  font: inherit;
  font-size: 0.86rem !important;
  font-weight: 550;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ds-ink, #0F172A) !important;
  background:
    linear-gradient(180deg, #fff, #F8FBFE) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  appearance: none;
  -webkit-appearance: none;
}
.pm-filters select {
  background-image:
    linear-gradient(45deg, transparent 50%, #64748B 50%),
    linear-gradient(135deg, #64748B 50%, transparent 50%),
    linear-gradient(180deg, #fff, #F8FBFE) !important;
  background-position:
    calc(100% - 16px) calc(50% - 2px),
    calc(100% - 11px) calc(50% - 2px),
    0 0 !important;
  background-size: 5px 5px, 5px 5px, 100% 100% !important;
  background-repeat: no-repeat !important;
  padding-right: 2rem !important;
}
.pm-filters input:focus,
.pm-filters select:focus {
  outline: none;
  border-color: rgba(0, 134, 201, 0.55) !important;
  box-shadow: 0 0 0 3px rgba(0, 134, 201, 0.22) !important;
}
.pm-check {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 0.55rem !important;
  margin: 0.05rem 0;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  font-size: 0.86rem !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  color: var(--ds-navy, #081C2C) !important;
  cursor: pointer;
  transition: background 0.12s ease;
}
.pm-check:hover { background: rgba(0, 134, 201, 0.06); }
.pm-check input {
  width: 1.05rem !important;
  height: 1.05rem !important;
  min-height: 0 !important;
  margin: 0 !important;
  accent-color: #0086C9;
  flex: 0 0 auto;
  padding: 0 !important;
  box-shadow: none !important;
  background: #fff !important;
}
.pm-layer-group {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.3rem;
  margin: 0.05rem 0;
  padding: 0.5rem;
  border: 1px solid rgba(0, 134, 201, 0.18);
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(0, 134, 201, 0.09), rgba(245, 248, 252, 0.95));
}
.pm-layer-label {
  grid-column: 1 / -1;
  margin: 0 0 0.1rem;
  padding: 0 0.1rem;
  font-size: 0.64rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ds-blue, #0086C9);
}
.pm-layer-group .pm-check {
  margin: 0;
  padding: 0.4rem 0.35rem;
  justify-content: flex-start;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(215, 224, 234, 0.9);
  font-size: 0.74rem !important;
}
.pm-layer-group .pm-check:has(input:checked) {
  background: rgba(0, 134, 201, 0.12);
  border-color: rgba(0, 134, 201, 0.35);
  color: var(--ds-blue-deep, #006BA3) !important;
}
.pm-actions-bar {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.15rem;
}
.pm-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}
.pm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: normal;
  text-align: center;
  min-height: 2.2rem;
  padding: 0.4rem 0.7rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
}
.pm-btn-primary {
  background: linear-gradient(180deg, #0094d9, #0086C9) !important;
  color: #fff !important;
  border-color: #0077b3 !important;
  box-shadow: 0 1px 0 rgba(255,255,255,0.25) inset, 0 6px 16px rgba(0, 134, 201, 0.28);
}
.pm-btn-primary:hover {
  background: linear-gradient(180deg, #00a0e8, #007ebc);
  color: #fff;
}
.pm-btn-ghost {
  background: #fff;
  color: var(--ds-navy, #081C2C);
  border-color: var(--ds-line, #D7E0EA);
}
.pm-btn-ghost:hover {
  border-color: rgba(0, 134, 201, 0.45);
  color: var(--ds-blue-deep, #006BA3);
  background: #F5FBFF;
}
.pm-count {
  margin: 0;
  font-weight: 700;
  color: var(--ds-blue, #0086C9);
  letter-spacing: -0.01em;
}
.pm-list-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0.35rem 0.45rem 0.55rem;
  scrollbar-width: thin;
}
.pm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.2rem; }
.pm-list-btn {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  padding: 0.55rem 0.65rem;
  cursor: pointer;
  font: inherit;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.12s ease;
}
.pm-list-btn:hover,
.pm-list-btn:focus-visible {
  background: rgba(0, 134, 201, 0.07);
  border-color: rgba(0, 134, 201, 0.18);
  outline: none;
}
.pm-list-btn.is-active,
.pm-list-btn[aria-current="true"] {
  background: rgba(0, 134, 201, 0.1);
  border-color: rgba(0, 134, 201, 0.28);
  box-shadow: inset 3px 0 0 #0086C9;
}
.pm-list-btn strong {
  display: block;
  color: var(--ds-navy, #081C2C);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.pm-list-btn span { font-size: .78rem; color: var(--ds-slate, #64748B); }
.pm-list-more {
  padding: 0.45rem 0.65rem;
  font-size: 0.78rem;
  color: var(--ds-slate, #64748B);
}
.pm-detail {
  border-top: 1px solid var(--ds-line, var(--sig-line));
  padding: 0.75rem var(--pm-side-pad) var(--pm-side-pad);
  background: linear-gradient(180deg, #F8FBFE, #fff);
  flex: 0 0 auto;
}
.pm-card { background: #fff; border: 1px solid var(--sig-line); border-radius: var(--radius); overflow: hidden; }
.pm-card-banner { width: 100%; height: 96px; object-fit: cover; display: block; }
.pm-card-banner--empty { height: 56px; background: linear-gradient(135deg,#0C2740,#1a4a6e); }
.pm-card-body { display: flex; gap: .65rem; padding: .75rem; }
.pm-card-logo { width: 48px; height: 48px; object-fit: contain; flex: 0 0 auto; background: #fff; border-radius: 8px; border: 1px solid var(--sig-line); }
.pm-card-fallback { display: inline-block; background: var(--sig-mist); }
.pm-card h3 { margin: 0; font-size: 1rem; }
.pm-meta, .pm-dist, .pm-note { margin: .15rem 0; font-size: .82rem; color: var(--sig-slate); }
.pm-kpis { list-style: none; margin: .35rem 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .15rem; font-size: .78rem; color: var(--sig-slate); }
.pm-fresh[data-f="stale"] { color: #B45309; font-weight: 650; font-size: .78rem; }
.pm-fresh[data-f="updated"] { color: var(--sig-ok); font-weight: 650; font-size: .78rem; }
.pm-actions { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .45rem; align-items: center; }
.pm-cluster, .pm-event-dot {
  background: var(--sig-navy); color: #fff; border-radius: 999px; border: 2px solid #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem;
  box-shadow: 0 2px 8px rgba(8,28,44,.25);
}
.pm-event-dot { background: #0F766E; font-size: .72rem; }
.pm-tooltip { font-size: .8rem; }
.pm-tip { color: #64748b; }
.pm-list-toggle { display: none; }
.pm-attr {
  position: absolute; z-index: 500; left: .5rem; bottom: .5rem;
  background: rgba(255,255,255,.92); padding: .2rem .45rem; border-radius: 6px; font-size: .7rem;
}
@media (max-width: 1024px) {
  /* Single-pane shell: map fills the stage; list/filters open as full overlay (no side-by-side clip). */
  .pm-app {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    position: relative;
    overflow: hidden;
    min-height: calc(100vh - var(--header-h, 64px) - 6.5rem);
    height: calc(100vh - var(--header-h, 64px) - 6.5rem);
  }
  .pm-map-wrap {
    grid-area: 1 / 1;
    min-height: 0;
    height: 100%;
    border-left: 1px solid var(--sig-line);
    border-radius: var(--radius);
  }
  .pm-side {
    grid-area: 1 / 1;
    display: none;
    position: relative;
    z-index: 700;
    width: 100%;
    height: 100%;
    max-height: none;
    order: unset;
    border-radius: var(--radius);
    border-right: 1px solid var(--ds-line, var(--sig-line));
    box-shadow: 0 18px 40px rgba(8, 28, 44, 0.18);
  }
  /* Class is toggled on #pmApp (.pm-page-inner), not on .pm-app itself */
  #pmApp.is-list-open .pm-side,
  .is-list-open .pm-side { display: flex; }
  #pmApp.is-list-open .pm-map-wrap,
  .is-list-open .pm-map-wrap { visibility: hidden; }
  .pm-list-toggle { display: inline-flex; }
  .pm-filters { grid-template-columns: 1fr 1fr; }
  .pm-actions-row { display: flex; flex-wrap: wrap; gap: 0.4rem; }
  .pm-actions-row > * { flex: 1 1 calc(50% - 0.2rem); min-width: 0; text-align: center; }
}
