.waterpupmap-wrap {
  width: 100%;
  position: relative;
  background: #c2dcdb;
  border-radius: 14px;
  overflow: hidden;
}

.waterpupmap-map {
  width: 100%;
  height: 100%;
}

/* Shell layout (header + panel + map) */
.wpm-shell {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.wpm-topbar {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  padding: 14px 40px;
  background: #045955;
  color: #c2dcdb;
}

.wpm-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 240px;
}

.wpm-brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: #f5c400;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.wpm-brand-title {
  font-weight: 800;
  letter-spacing: 0.02em;
  font-size: 24px;
  line-height: 1.05;
  color: #ffffff;
}

.wpm-brand-sub {
  margin-top: 6px;
  font-size: 12px;
  color: rgba(194, 220, 219, 0.85);
}

.wpm-stats {
  display: flex;
  flex-wrap: nowrap;
  gap: 18px;
  align-items: center;
  overflow-x: auto;
}

.wpm-stat {
  text-align: center;
  padding: 2px 10px;
  border-left: 1px solid rgba(194, 220, 219, 0.25);
}
.wpm-stat:first-child {
  border-left: 0;
}

.wpm-stat-value {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.wpm-stat-label {
  margin-top: 4px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(194, 220, 219, 0.8);
}

.wpm-content {
  position: relative;
  display: flex;
  flex: 1;
  min-height: 0;
  background: #c2dcdb;
}

.wpm-pane {
  min-height: 0;
}

.wpm-pane-map {
  position: relative;
  display: flex;
  flex: 1;
  min-width: 0;
  min-height: 0;
}

.wpm-pane-impact {
  flex: 1;
  min-height: 0;
}

/* Impact mobile view (like screenshot) */
.wpm-impact {
  height: 100%;
  padding: 18px 16px 22px;
  background: #1b1f1e;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  text-align: center;
}

.wpm-impact-title {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #72b7b3;
}

.wpm-impact-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.wpm-impact-value {
  font-size: 44px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.wpm-impact-label {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
}

.wpm-q {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  margin-left: 6px;
  background: #f5c400;
  color: #111;
  font-weight: 900;
  font-size: 11px;
  line-height: 1;
}

.wpm-impact-updated {
  margin-top: 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
}

.wpm-panel {
  width: 420px;
  max-width: 0;
  opacity: 0;
  pointer-events: none;
  background: #ffffff;
  border-right: 1px solid rgba(15, 20, 19, 0.12);
  overflow: hidden;
  transition: max-width 220ms ease, opacity 140ms ease;
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  z-index: 10;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
}

.wpm-shell.wpm-panel-open .wpm-panel {
  max-width: 420px;
  opacity: 1;
  pointer-events: auto;
}

.wpm-panel-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.wpm-panel-close {
   align-self: flex-end;
  margin: 10px 10px 0;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(15, 20, 19, 0.12);
  background: #ffffff !important;
  color: rgba(0, 0, 0, 0.75) !important;
  font-size: 22px !important;
  cursor: pointer;
  padding: 1px !important;
}
.wpm-panel-close:hover {
  background: rgba(194, 220, 219, 0.22);
}

.wpm-panel-body {
  padding: 6px 18px 18px;
  overflow: auto;
}

.wpm-panel-title {
  font-size: 30px;
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: rgba(0, 0, 0, 0.88);
  margin: 6px 0 10px;
}

.wpm-panel-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: rgba(0, 0, 0, 0.55);
  font-size: 13px;
  margin-bottom: 12px;
}

.wpm-panel-chip {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(114, 183, 179, 0.25);
  border: 1px solid rgba(15, 20, 19, 0.10);
  color: rgba(0, 0, 0, 0.72);
  font-weight: 600;
}

.wpm-panel-coords {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.wpm-panel-img {
  width: 100%;
  height: 210px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(114, 183, 179, 0.25), rgba(94, 172, 172, 0.65));
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(15, 20, 19, 0.10);
  margin-bottom: 14px;
}

.wpm-panel-kpi {
  text-align: center;
  padding: 14px 12px 16px;
  background: rgba(114, 183, 179, 0.15);
  border: 1px solid rgba(15, 20, 19, 0.10);
  border-radius: 14px;
  margin-bottom: 14px;
}

.wpm-panel-kpi-label {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.55);
}

.wpm-panel-kpi-value {
  margin-top: 8px;
  font-size: 44px;
  font-weight: 900;
  color: rgba(0, 0, 0, 0.88);
}

.wpm-panel-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.wpm-panel-field {
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(15, 20, 19, 0.10);
  background: #ffffff;
}

.wpm-panel-field-label {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.55);
}

.wpm-panel-field-value {
  margin-top: 8px;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.82);
}

.wpm-panel-cta {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 14px 14px;
  border-radius: 12px;
  border: 1px solid rgba(114, 183, 179, 0.20);
  background: #ffffff;
  color: #72B7B3;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
  font-size: 12px;
  text-decoration: none;
}
.wpm-panel-cta:hover {
  background: rgba(114, 183, 179, 0.15);
}

.wpm-map-area {
  position: relative;
  flex: 1;
  min-width: 0;
  min-height: 0;
}

.waterpupmap-error {
  padding: 14px 16px;
  border: 1px solid #329895;
  background: rgba(194, 220, 219, 0.12);
  color: #c2dcdb;
  border-radius: 12px;
  font: 14px/1.4 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* Controls overlay */
.wpm-search {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.wpm-search-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(194, 220, 219, 0.25);
  background: rgba(27, 31, 30, 0.55);
  color: #c2dcdb;
  font: 13px/1 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif !important;
  cursor: pointer;
}
.wpm-search-btn:hover {
  background: rgba(27, 31, 30, 0.65);
  border-color: rgba(194, 220, 219, 0.35);
}

.wpm-search-ico {
  font-size: 21px;
  margin-bottom: 5px;
}

.wpm-search-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 8px;
  width: 320px;
  padding: 0;
  z-index: 4;
}
.wpm-search-popover::before {
  content: "";
  position: absolute;
  top: -10px;
  right: 32px;
  border-width: 0 8px 8px 8px;
  border-style: solid;
  border-color: transparent transparent #ffffff transparent;
}
.wpm-search:not(.is-open) .wpm-search-popover {
  display: none;
}

.wpm-search-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #ffffff;
  color: #111111;
  font: 14px/1.2 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  outline: none;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}
.wpm-search-input::placeholder {
  color: rgba(0, 0, 0, 0.45);
}

.wpm-search-suggestions {
  margin-top: 8px;
  max-height: 220px;
  overflow-y: auto;
}

.wpm-search-suggestion {
  display: block;
  width: 100%;
  padding: 8px 12px;
  border: 0;
  background: #ffffff;
  border-bottom: 1px solid rgba(114, 183, 179, 0.15);
  color: #111111;
  font: 13px/1.3 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  text-align: left;
  cursor: pointer;
  transition: background-color 140ms ease;
}

.wpm-search-suggestion:last-child {
  border-bottom: 0;
}

.wpm-search-suggestion:hover {
  background: rgba(114, 183, 179, 0.8);
  border-color: rgba(114, 183, 179, 0.9);
}

.wpm-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(194, 220, 219, 0.25);
  background: rgba(27, 31, 30, 0.55);
  color: #c2dcdb;
  font: 13px/1 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.wpm-control input,
.wpm-control select {
  appearance: none;
  border: 0;
  outline: none;
  background: transparent;
  color: inherit;
  font: inherit;
  min-width: 220px;
}

.wpm-control select {
  min-width: 200px;
  cursor: pointer;
}

.wpm-control input::placeholder {
  color: rgba(194, 220, 219, 0.65);
}

.wpm-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(50, 152, 149, 0.22);
  border: 1px solid rgba(114, 183, 179, 0.35);
  color: #c2dcdb;
  font-size: 12px;
}

/* InfoWindow card */
.wpm-infowindow {
  width: 280px;
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.35);
  color: #0f1413;
  font: 13px/1.35 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.wpm-iw-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 0.5px solid rgba(15, 20, 19, 0.12);
  background: #ffffff;
  color: rgba(0, 0, 0, 0.75);
 font-size: 18px !important;
  font-weight: 400 !important;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
	padding: unset !important;
}
.wpm-iw-close:hover {
  background: rgba(194, 220, 219, 0.22);
}

.wpm-iw-img {
  width: 100%;
  height: 150px;
  background: linear-gradient(135deg, rgba(114, 183, 179, 0.65), rgba(94, 172, 172, 0.2));
  background-size: cover;
  background-position: center;
}

.wpm-hover-img {
  width: 180px;
  height: 120px;
  background: linear-gradient(135deg, rgba(114, 183, 179, 0.65), rgba(94, 172, 172, 0.2));
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  border: 1px solid rgba(194, 220, 219, 0.9);
}

.wpm-iw-body {
  padding: 12px 14px 14px;
}

.wpm-iw-title {
  font-size: 16px;
  line-height: 1.2;
  font-weight: 700;
  color: #0f1413;
  margin: 0 0 8px;
}

.wpm-iw-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  color: rgba(15, 20, 19, 0.72);
  margin-bottom: 10px;
  font-size: 12px;
}

.wpm-iw-meta-item {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.wpm-iw-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(94, 172, 172, 0.9);
  box-shadow: 0 0 0 3px rgba(194, 220, 219, 0.6);
  flex: 0 0 auto;
}

.wpm-iw-dot--alt {
  background: rgba(50, 152, 149, 0.95);
  box-shadow: 0 0 0 3px rgba(50, 152, 149, 0.12);
}

.wpm-iw-meta span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.wpm-iw-divider {
  width: 1px;
  height: 12px;
  background: rgba(15, 20, 19, 0.18);
}

.wpm-iw-footer {
  border-top: 1px solid rgba(194, 220, 219, 0.9);
}

.wpm-iw-link {
 display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 0;
  background: #ffffff;
  border: 0;
  color: #72B7B3 !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700 !important;
  font-size: 11px !important;
  text-decoration: none;
  cursor: pointer;
  width: 100%;
}

.wpm-iw-link:hover {
  background: rgba(194, 220, 219, 0.25);
}

.wpm-iw-link--disabled {
  color: rgba(15, 20, 19, 0.35);
  cursor: default;
}
.wpm-iw-link--disabled:hover {
  background: #ffffff;
}

/* Hide the default white InfoWindow background "tail" glow */
.gm-style .gm-style-iw-c {
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.gm-style .gm-style-iw-d {
  overflow: hidden !important;
}
.gm-style .gm-style-iw-t::after {
  background: #ffffff !important;
  border: 1px solid rgba(194, 220, 219, 0.9) !important;
}

/* Mapbox popup reset to let our card style render */
.mapboxgl-popup-content {
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.mapboxgl-popup-tip {
  border-top-color: #ffffff !important;
}

/* Responsive: panel overlays and topbar on small screens */
@media (max-width: 980px) {
  .wpm-topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .wpm-brand {
    min-width: 0;
  }

  .wpm-mobile-tabs {
    display: flex;
  }

  .wpm-content {
    display: block;
  }

  .wpm-pane-map,
  .wpm-pane-impact {
    height: 100%;
  }

  .wpm-panel {
    width: 100%;
  }
  .wpm-shell.wpm-panel-open .wpm-panel {
    max-width: 100%;
  }
}

@media (max-width: 520px) {
  .wpm-search-popover {
    width: min(78vw, 320px);
  }
  .wpm-search-label {
    display: none;
  }
}

/* Theme Mapbox built-in controls */
.waterpupmap-wrap .mapboxgl-ctrl-group {
  background: rgba(4, 89, 85, 0.18);
  border: 1px solid rgba(114, 183, 179, 0.28);
  backdrop-filter: blur(8px);
  box-shadow: none;
}
.waterpupmap-wrap .mapboxgl-ctrl-group button {
  width: 36px;
  height: 36px;
  background: transparent;
  color: #c2dcdb;
}
.waterpupmap-wrap .mapboxgl-ctrl-group button + button {
  border-top: 1px solid rgba(114, 183, 179, 0.28);
}
.waterpupmap-wrap .mapboxgl-ctrl-group button:hover {
  background: rgba(194, 220, 219, 0.12);
}

/* Layer toggle button */
.waterpupmap-wrap .wpm-layer-control .wpm-layer-btn {
  font-weight: 900;
  font-size: 16px;
  line-height: 1;
}
.waterpupmap-wrap .wpm-layer-control .wpm-layer-btn .inline-block {
  display: inline-block;
  width: 18px;
  height: 18px;
  background-image: url("../img/layer.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

