.px-leaflet-wrap {
  width: 100%;
}

.px-leaflet-layout {
  display: grid;
  gap: 16px;
  align-items: stretch;
}

.px-leaflet-layout.has-sidebar {
  grid-template-columns: minmax(220px, var(--px-panel-width, 320px)) minmax(0, 1fr);
}

.px-leaflet-layout.no-sidebar {
  grid-template-columns: minmax(0, 1fr);
}

.px-map-sidebar {
  --px-th-bg: #f8fafc;
  --px-th-fg: #0f172a;
  --px-panel-bg: #fff;
  --px-panel-fg: #1f2933;
  --px-panel-title-fg: #0f172a;
  --px-border: rgba(15, 23, 42, 0.08);
  --px-border-soft: rgba(15, 23, 42, 0.06);
  --px-row-hover: #f1f5f9;
  --px-row-active-bg: #e0e7ff;
  --px-row-active-fg: #1e3a8a;
  --px-row-stripe: transparent;
  --px-item-bg: #fafbfc;
  --px-cell-pad-y: 12px;
  --px-cell-pad-x: 14px;
  --px-font-size: 14px;
  --px-th-font-size: 12px;
  --px-th-weight: 600;
  --px-th-transform: uppercase;
  border: 1px solid var(--px-border);
  border-radius: 16px;
  background: var(--px-panel-bg);
  color: var(--px-panel-fg);
  overflow: hidden;
  min-height: 200px;
  align-self: stretch;
  max-width: 100%;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 16px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  font-size: var(--px-font-size);
}

.px-map-sidebar__title {
  padding: 18px 20px 14px;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--px-panel-title-fg);
  border-bottom: 1px solid var(--px-border-soft);
  flex-shrink: 0;
}

.px-map-sidebar__list {
  display: flex;
  flex-direction: column;
  padding: 12px;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.px-map-sidebar__item {
  width: 100%;
  text-align: left;
  border: 1px solid var(--px-border-soft);
  border-radius: 10px;
  background: var(--px-item-bg);
  color: var(--px-panel-fg);
  padding: var(--px-cell-pad-y) var(--px-cell-pad-x);
  font: inherit;
  font-size: var(--px-font-size);
  line-height: 1.35;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.px-map-sidebar__item:hover,
.px-map-sidebar__item:focus-visible {
  background: var(--px-row-hover);
  border-color: rgba(29, 78, 216, 0.2);
  outline: none;
}

.px-map-sidebar__item.is-active {
  background: var(--px-th-bg);
  color: var(--px-th-fg);
  border-color: var(--px-th-bg);
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.25);
}

.px-map-table__scroll {
  overflow: auto;
  flex: 1 1 auto;
  min-height: 0;
  padding: 4px 12px 12px;
}

.px-map-table__table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 10px;
  overflow: hidden;
}

.px-map-table__table th,
.px-map-table__table td {
  padding: var(--px-cell-pad-y) var(--px-cell-pad-x);
  border-bottom: 1px solid var(--px-border-soft);
  border-right: 1px solid var(--px-border-soft);
  vertical-align: top;
  text-align: left;
  line-height: 1.4;
  font-size: var(--px-font-size);
  overflow-wrap: anywhere;
  word-break: break-word;
  position: relative;
}

.px-map-table__table tbody tr:last-child td {
  border-bottom: 0;
}

.px-map-table__table th:first-child,
.px-map-table__table td:first-child {
  min-width: 120px;
}

.px-map-table__table th.px-map-table__cat-col,
.px-map-table__table td.px-map-table__cat-col {
  min-width: 40px;
  max-width: 180px;
  width: 160px;
  overflow: hidden;
}

.px-map-table__table td.px-map-table__cat-col {
  padding: 10px 10px;
}

.px-map-table__table th:last-child,
.px-map-table__table td:last-child {
  border-right: 0;
}

.px-col-resizer {
  position: absolute;
  top: 0;
  right: -3px;
  width: 6px;
  height: 100%;
  cursor: col-resize;
  user-select: none;
  z-index: 2;
}

.px-col-resizer:hover,
.px-col-resizer.is-active {
  background: rgba(29, 78, 216, 0.25);
}

.px-map-sidebar .px-map-table__table thead th,
.px-map-sidebar .px-map-table__table thead tr th {
  background: var(--px-th-bg) !important;
  color: var(--px-th-fg) !important;
  font-weight: var(--px-th-weight);
  font-size: var(--px-th-font-size);
  letter-spacing: 0.02em;
  text-transform: var(--px-th-transform);
  padding-top: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--px-border);
  position: sticky;
  top: 0;
  z-index: 2;
}

.px-map-table__row {
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.px-map-table__row:hover,
.px-map-table__row:focus-visible {
  background: var(--px-row-hover);
  outline: none;
}

.px-map-table__row.is-active {
  background: var(--px-row-active-bg);
}

.px-map-table__row.is-active td {
  color: var(--px-row-active-fg);
}

.px-leaflet-map {
  width: 100%;
  min-height: 200px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.px-popup__title {
  font-weight: 700;
  margin-bottom: 8px;
}

.px-caption {
  font-size: 12px;
  color: #333;
  margin-top: 6px;
  line-height: 1.35;
}

.px-popup img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  object-fit: contain;
}

.px-swiper .swiper-slide img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.fancybox-container {
  z-index: 999999 !important;
}

.leaflet-popup-content-wrapper {
  box-sizing: border-box;
  transition: width 0.2s ease, max-height 0.2s ease;
}

.leaflet-popup-content {
  box-sizing: border-box;
  overflow-y: auto;
  transition: max-height 0.2s ease;
}

.leaflet-popup .swiper-button-next,
.leaflet-popup .swiper-button-prev {
  color: #fff;
  z-index: 10;
}

.leaflet-popup .swiper-button-next:after,
.leaflet-popup .swiper-button-prev:after {
  font-size: 18px;
}

.px-leaflet-mapwrap {
  position: relative;
  min-width: 0;
}

.px-map-search {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  background: #fcfcfd;
  flex-shrink: 0;
}

.px-map-search__input {
  flex: 1 1 160px;
  min-width: 140px;
  padding: 9px 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  font-size: 13px;
  background: #fff;
  color: #0f172a;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.px-map-search__input::placeholder {
  color: #94a3b8;
}

.px-map-filter-category {
  padding: 9px 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  font-size: 13px;
  background: #fff;
  color: #0f172a;
  max-width: 160px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.px-map-search__input:focus,
.px-map-filter-category:focus {
  outline: none;
  border-color: #1d4ed8;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

.px-map-sidebar__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.px-map-sidebar__item-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1 auto;
  min-width: 0;
}

.px-cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0,0,0,0.25);
  line-height: 1.4;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  vertical-align: middle;
}

.px-cat-chip__dot {
  width: 6px;
  height: 6px;
  background: rgba(255,255,255,0.85);
  border-radius: 50%;
  flex-shrink: 0;
}

.px-cat-chip__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1 1 auto;
}

.px-cat-chip--dot {
  width: 14px;
  height: 14px;
  min-width: 14px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.12);
  text-shadow: none;
  vertical-align: middle;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.px-cat-chip--dot.px-cat-chip--empty {
  background: repeating-linear-gradient(45deg, #d1d5db, #d1d5db 3px, #e5e7eb 3px, #e5e7eb 6px);
}

.px-map-sidebar__item.is-active .px-cat-chip__dot {
  background: #fff;
}

.px-map-legend {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  min-width: 140px;
  width: 200px;
  max-width: 100%;
  max-height: 70vh;
  overflow: auto;
  resize: horizontal;
  box-sizing: border-box;
}

/* Floating (on-map) variants */
.px-map-legend--top-right,
.px-map-legend--top-left,
.px-map-legend--bottom-right,
.px-map-legend--bottom-left {
  position: absolute;
  z-index: 500;
  max-height: calc(100% - 40px);
  max-width: calc(100% - 24px);
}

.px-map-legend--top-right {
  top: 12px;
  right: 12px;
}

.px-map-legend--top-left {
  top: 12px;
  left: 12px;
}

.px-map-legend--bottom-right {
  bottom: 24px;
  right: 12px;
}

.px-map-legend--bottom-left {
  bottom: 24px;
  left: 12px;
}

/* Inline-in-sidebar variant */
.px-map-legend--sidebar {
  position: static;
  margin: 8px 12px 0;
  width: auto;
  max-width: 100%;
  max-height: 200px;
  resize: vertical;
  box-shadow: none;
  background: #f9fafb;
  border-color: rgba(0, 0, 0, 0.08);
}

.px-map-legend__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.px-map-legend__row {
  display: grid;
  grid-template-columns: 16px 14px 1fr auto;
  gap: 8px;
  align-items: start;
  font-size: 12px;
  color: #1f2933;
  cursor: pointer;
  line-height: 1.3;
}

.px-map-legend__row input[type=checkbox] {
  margin: 2px 0 0;
  cursor: pointer;
}

.px-map-legend__swatch {
  width: 14px;
  height: 14px;
  margin-top: 1px;
  border-radius: 4px;
  border: 1px solid rgba(0,0,0,0.12);
  flex-shrink: 0;
}

.px-map-legend__swatch--empty {
  background: repeating-linear-gradient(45deg, #d1d5db, #d1d5db 4px, #e5e7eb 4px, #e5e7eb 8px);
}

.px-map-legend__label {
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
  min-width: 0;
}

.px-map-legend__count {
  font-size: 11px;
  color: #6b7280;
  background: #f3f4f6;
  border-radius: 999px;
  padding: 1px 7px;
  min-width: 20px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  align-self: start;
  margin-top: 1px;
}

.px-cat-divicon {
  background: transparent;
  border: 0;
}

/* ========== Table Theme Variants (per-map) ========== */

/* Minimal: no borders, airy, quiet header */
.px-map-sidebar.px-theme-minimal {
  --px-th-bg: #ffffff;
  --px-th-fg: #475569;
  --px-th-weight: 500;
  --px-th-transform: none;
  --px-border: rgba(15, 23, 42, 0.04);
  --px-border-soft: transparent;
  --px-row-hover: #f8fafc;
  --px-item-bg: #ffffff;
  box-shadow: none;
}
.px-map-sidebar.px-theme-minimal .px-map-table__table {
  border: 0;
  border-radius: 0;
}
.px-map-sidebar.px-theme-minimal .px-map-table__table thead th {
  border-bottom: 1px solid var(--px-border);
}

/* Striped rows: alternating row bands */
.px-map-sidebar.px-theme-striped {
  --px-row-stripe: #f8fafc;
}
.px-map-sidebar.px-theme-striped .px-map-table__row:nth-child(even) {
  background: var(--px-row-stripe);
}
.px-map-sidebar.px-theme-striped .px-map-table__row:hover,
.px-map-sidebar.px-theme-striped .px-map-table__row:focus-visible {
  background: var(--px-row-hover);
}
.px-map-sidebar.px-theme-striped .px-map-table__row.is-active {
  background: var(--px-row-active-bg);
}

/* Bold header: strong blue header bar */
.px-map-sidebar.px-theme-bold {
  --px-th-bg: #1d4ed8;
  --px-th-fg: #ffffff;
  --px-th-weight: 700;
}

/* Dark: dark panel across the board */
.px-map-sidebar.px-theme-dark {
  --px-th-bg: #0f172a;
  --px-th-fg: #f1f5f9;
  --px-panel-bg: #1e293b;
  --px-panel-fg: #e2e8f0;
  --px-panel-title-fg: #f8fafc;
  --px-border: rgba(255, 255, 255, 0.1);
  --px-border-soft: rgba(255, 255, 255, 0.06);
  --px-row-hover: #334155;
  --px-row-active-bg: #2563eb;
  --px-row-active-fg: #ffffff;
  --px-item-bg: #273449;
}
.px-map-sidebar.px-theme-dark .px-map-search {
  background: #1a2433;
  border-bottom-color: var(--px-border-soft);
}
.px-map-sidebar.px-theme-dark .px-map-search__input,
.px-map-sidebar.px-theme-dark .px-map-filter-category {
  background: #273449;
  color: #e2e8f0;
  border-color: rgba(255, 255, 255, 0.12);
}
.px-map-sidebar.px-theme-dark .px-map-search__input::placeholder {
  color: #64748b;
}

/* ========== Density Modifier ========== */
.px-map-sidebar.px-density-compact {
  --px-cell-pad-y: 6px;
  --px-cell-pad-x: 10px;
  --px-font-size: 12px;
  --px-th-font-size: 11px;
}
.px-map-sidebar.px-density-compact .px-map-sidebar__title {
  padding: 12px 14px 10px;
  font-size: 14px;
}

@media (max-width: 768px) {
  .px-leaflet-layout.has-sidebar {
    grid-template-columns: minmax(0, 1fr);
  }

  .px-map-sidebar {
    min-height: 0;
  }

  .px-map-sidebar__list {
    max-height: 220px;
  }

  .px-map-legend {
    max-width: 160px;
    padding: 8px 10px;
  }
}

/* ========== Numbered Pin Badge ========== */

.px-pin-num-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1e293b;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 4px;
  padding: 1px 6px;
  margin-right: 6px;
  min-width: 18px;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  vertical-align: middle;
  white-space: nowrap;
}

.px-num-divicon {
  background: transparent;
  border: 0;
}

/* Basemap toggle (Map / Satellite) ----------------------------------------- */
.px-map-basemap-toggle {
  display: inline-flex;
  background: #ffffff;
  border-radius: 8px;
  padding: 3px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.18);
  border: 1px solid rgba(15, 23, 42, 0.08);
  overflow: hidden;
  font-family: inherit;
}

.px-map-basemap-toggle__btn {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  margin: 0;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #475569;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s ease, color 0.15s ease;
}

.px-map-basemap-toggle__btn + .px-map-basemap-toggle__btn {
  margin-left: 2px;
}

.px-map-basemap-toggle__btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.px-map-basemap-toggle__btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.px-map-basemap-toggle__btn.is-active {
  background: #0f172a;
  color: #ffffff;
}

.px-map-basemap-toggle__btn.is-active:hover {
  background: #1e293b;
  color: #ffffff;
}

@media (max-width: 480px) {
  .px-map-basemap-toggle__btn {
    padding: 5px 10px;
    font-size: 11px;
  }
}

/* Fullscreen toggle ------------------------------------------------------- */
.px-map-fs-toggle {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.18);
  border: 1px solid rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.px-map-fs-toggle__btn {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  padding: 7px 9px;
  margin: 0;
  cursor: pointer;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: background 0.15s ease, color 0.15s ease;
}

.px-map-fs-toggle__btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.px-map-fs-toggle__btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* Fallback fullscreen for browsers without the Fullscreen API or denials. */
.px-leaflet-wrap.px-fullscreen-fallback {
  position: fixed !important;
  inset: 0 !important;
  z-index: 100000 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: #fff;
  margin: 0 !important;
  padding: 0 !important;
}

.px-leaflet-wrap.px-fullscreen-fallback .px-leaflet-layout {
  width: 100% !important;
  height: 100% !important;
}

.px-leaflet-wrap.px-fullscreen-fallback .px-leaflet-mapwrap,
.px-leaflet-wrap.px-fullscreen-fallback .px-leaflet-map {
  height: 100% !important;
}

/* Native fullscreen styling (when the wrap itself enters fullscreen) */
.px-leaflet-wrap:fullscreen,
.px-leaflet-wrap:-webkit-full-screen {
  width: 100vw !important;
  height: 100vh !important;
  background: #fff;
}

.px-leaflet-wrap:fullscreen .px-leaflet-layout,
.px-leaflet-wrap:-webkit-full-screen .px-leaflet-layout {
  width: 100% !important;
  height: 100% !important;
}

.px-leaflet-wrap:fullscreen .px-leaflet-mapwrap,
.px-leaflet-wrap:fullscreen .px-leaflet-map,
.px-leaflet-wrap:-webkit-full-screen .px-leaflet-mapwrap,
.px-leaflet-wrap:-webkit-full-screen .px-leaflet-map {
  height: 100% !important;
}

/* Sort select ------------------------------------------------------------- */
.px-map-sort {
  padding: 9px 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  font-size: 13px;
  background: #fff;
  color: #0f172a;
  max-width: 180px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.px-map-sort:focus {
  outline: none;
  border-color: #1d4ed8;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

/* Shape type icon in sidebar entries -------------------------------------- */
.px-shape-type-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-right: 6px;
  vertical-align: middle;
  color: #64748b;
}

.px-map-sidebar__item--shape .px-shape-type-icon,
.px-map-table__row--shape .px-shape-type-icon {
  color: #475569;
}

.px-map-table__row--shape td:first-child {
  font-style: italic;
}

/* Date filter (flatpickr) — matches the look of the search/category filters */
.px-map-date-filter {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  background: #fff;
  height: 38px;
  box-sizing: border-box;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.px-map-date-filter:focus-within {
  border-color: #1d4ed8;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}
.px-map-date-clear {
  border: 0;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  width: 30px;
  padding: 0;
  flex: 0 0 auto;
}
.px-map-date-clear:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.06);
}

/* "Clear filters" pill — sits in the filter row, only visible when any of
   search / category / date is active. Style mirrors the other filter pills. */
.px-map-clear-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  background: #fff;
  color: #475569;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  box-sizing: border-box;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}
.px-map-clear-all[hidden] { display: none !important; }
.px-map-clear-all:hover {
  border-color: #ef4444;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.06);
}
.px-map-clear-all:active { transform: translateY(1px); }
.px-map-clear-all:focus {
  outline: none;
  border-color: #1d4ed8;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}
.px-map-clear-all__x {
  font-size: 15px;
  line-height: 1;
}
.px-map-clear-all__label { font-weight: 500; }
.px-map-sidebar.px-theme-dark .px-map-clear-all {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.78);
  border-color: rgba(255, 255, 255, 0.16);
}
.px-map-sidebar.px-theme-dark .px-map-clear-all:hover {
  border-color: #f87171;
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.12);
}

/* Clear filters button inside the empty state, for discoverability when the
   user has over-filtered into zero results. */
.px-map-sidebar__empty-text {
  margin-bottom: 10px;
}
.px-map-sidebar__empty-clear {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 6px;
  background: #fff;
  color: #1d4ed8;
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
.px-map-sidebar__empty-clear:hover {
  border-color: #1d4ed8;
  background: rgba(29, 78, 216, 0.06);
}
.px-map-sidebar.px-theme-dark .px-map-sidebar__empty-clear {
  background: rgba(255, 255, 255, 0.06);
  color: #93c5fd;
  border-color: rgba(255, 255, 255, 0.16);
}
.px-map-sidebar.px-theme-dark .px-map-sidebar__empty-clear:hover {
  border-color: #60a5fa;
  background: rgba(96, 165, 250, 0.12);
}

/* Date column in the frontend table */
.px-map-table__table th.px-col-date,
.px-map-table__table td.px-col-date {
  font-size: 12px;
  color: #475569;
  /* Allow wrapping when the column is narrow. */
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* # (pin number) column — narrow, centered. Header is bold. Cells lean
   on tabular-nums so digits align nicely vertically. */
.px-map-table__table th.px-col-num,
.px-map-table__table td.px-col-num {
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  white-space: nowrap;
  padding-left: 6px;
  padding-right: 6px;
}
.px-map-table__table td.px-col-num {
  color: #475569;
  font-weight: 500;
}
.px-map-table__table th.px-col-num {
  /* Header inherits the table's header bg/fg from --px-th-* variables. */
  font-weight: 700;
}
.px-map-sidebar.px-theme-dark .px-map-table__table td.px-col-num {
  color: rgba(255, 255, 255, 0.82);
}

/* Date label inside list items (non-table mode) */
.px-list-date {
  display: block;
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

/* Style the input flatpickr renders inside the wrapper. Using attribute and
   class selectors covers both the original input and the visible alt input. */
.px-map-date-filter input,
.px-map-date-filter input.px-map-date-input,
.px-map-date-filter input.flatpickr-input,
.px-map-date-filter input.flatpickr-alt-input {
  border: 0 !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 12px;
  font-size: 13px;
  color: #0f172a;
  width: 220px;
  height: 100%;
  box-sizing: border-box;
  line-height: 1;
}
.px-map-date-filter input::placeholder { color: #94a3b8; }

/* Belt-and-braces: collapse marker / area animations under "Reduce motion".
   The JS already gates on prefers-reduced-motion, but Leaflet may still pan
   smoothly via its own animations — we leave that alone since its panning is
   small and informative. */
@media (prefers-reduced-motion: reduce) {
  .leaflet-marker-icon,
  .leaflet-interactive {
    animation: none !important;
    transition: none !important;
  }
}

/* ===== Filter row animations =============================================*/
/* List items: opacity + slide + height/padding collapse so siblings reflow. */
.px-map-sidebar__item {
  max-height: 320px;
  overflow: hidden;
  transition:
    opacity 200ms ease,
    transform 200ms ease,
    max-height 250ms ease,
    padding-top 200ms ease,
    padding-bottom 200ms ease,
    border-top-width 200ms ease,
    border-bottom-width 200ms ease,
    margin-top 200ms ease,
    margin-bottom 200ms ease;
}
.px-map-sidebar__item.is-leaving,
.px-map-sidebar__item.is-entering {
  opacity: 0;
  transform: translateX(-8px);
}
.px-map-sidebar__item.is-leaving {
  max-height: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  border-top-width: 0 !important;
  border-bottom-width: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  pointer-events: none;
}

/* Table rows: fade + slide only (height collapse via display:none after). */
.px-map-table__row {
  transition: opacity 200ms ease, transform 200ms ease;
}
.px-map-table__row.is-leaving,
.px-map-table__row.is-entering {
  opacity: 0;
  transform: translateX(-8px);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .px-map-sidebar__item,
  .px-map-table__row {
    transition: none !important;
  }
}

/* ===== Polish animations ================================================*/

/* Marker hover: filter-only effect to avoid fighting Leaflet's transform. */
.leaflet-marker-icon {
  transition: filter 180ms ease;
  cursor: pointer;
}
.leaflet-marker-icon.px-marker-hover {
  filter: drop-shadow(0 3px 6px rgba(15, 23, 42, 0.35)) brightness(1.06);
}

/* Sidebar list item hover lift (skip table rows — transform on tr is fiddly). */
.px-map-sidebar__list .px-map-sidebar__item {
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.18s ease,
    opacity 220ms ease,
    transform 220ms ease;
}
.px-map-sidebar__list .px-map-sidebar__item:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.08);
}
.px-map-sidebar__list .px-map-sidebar__item.is-active {
  /* keep the existing active style; suppress hover lift while active */
  transform: none;
}

/* Empty filter state */
.px-map-sidebar__empty {
  padding: 18px 20px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
  font-style: italic;
}
.px-map-sidebar__empty[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .leaflet-marker-icon,
  .px-map-sidebar__list .px-map-sidebar__item {
    transition: none !important;
  }
}

/* ===== Accordion chevron + area row indent ==============================*/
.px-pin-chev {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-right: 6px;
  color: #64748b;
  cursor: pointer;
  border-radius: 4px;
  flex: 0 0 auto;
  user-select: none;
  vertical-align: -2px;
  transition: transform 220ms cubic-bezier(0.4, 0, 0.2, 1), color 0.15s ease, background 0.15s ease;
}
.px-pin-chev:hover {
  color: #0f172a;
  background: rgba(15, 23, 42, 0.06);
}
.px-pin-chev:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}
.px-pin-chev.is-expanded {
  transform: rotate(90deg);
  color: #1d4ed8;
}

/* Area rows visually grouped under their parent pin */
.px-map-sidebar__item--area {
  margin-left: 16px;
  border-left: 2px solid rgba(29, 78, 216, 0.18) !important;
}
.px-map-table__row--area td:first-child {
  padding-left: 28px;
  border-left: 2px solid rgba(29, 78, 216, 0.18);
}

@media (prefers-reduced-motion: reduce) {
  .px-pin-chev { transition: none !important; }
}
