.wbwc-map-app {
  --wbwc-map-border: #d6dee6;
  --wbwc-map-text: #1e2937;
  --wbwc-map-muted: #536178;
  --wbwc-map-blue: #2077cf;
  background: #eef2f5;
  color: var(--wbwc-map-text);
  display: grid;
  grid-template-columns: minmax(19rem, 22.5rem) minmax(0, 1fr);
  height: calc(100vh - 92px);
  height: calc(100dvh - 92px);
  min-height: 36rem;
  position: relative;
}

.wbwc-map-panel {
  background: #fff;
  border-right: 1px solid var(--wbwc-map-border);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  position: relative;
  z-index: 30;
}

.wbwc-map-intro {
  border-bottom: 1px solid #e7ecf2;
  color: var(--wbwc-map-muted);
  font-size: 0.9rem;
  line-height: 1.4;
  margin: 0;
  padding: 0.85rem 1rem;
}

.wbwc-map-tabs {
  border-bottom: 1px solid #e7ecf2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wbwc-map-tab {
  background: #f8fafc;
  border: 0;
  border-bottom: 3px solid transparent;
  color: #3f4b5f;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 700;
  min-height: 2.75rem;
  padding: 0.65rem 0.8rem;
}

.wbwc-map-tab.is-active {
  background: #fff;
  border-bottom-color: var(--wbwc-map-blue);
  color: #132033;
}

.wbwc-map-panel__section {
  overflow: auto;
  padding: 1rem;
}

.wbwc-map-panel__section.is-active {
  display: block;
}

.wbwc-map-report-form .button {
  font-size: 0.95rem;
  min-height: 2.5rem;
}

.wbwc-map-layer-list {
  border: 0;
  margin: 0;
  padding: 0;
}

.wbwc-map-layer-list legend {
  color: var(--wbwc-map-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: 0.45rem;
  text-transform: uppercase;
}

.wbwc-map-layer {
  align-items: center;
  cursor: pointer;
  display: grid;
  gap: 0.45rem;
  grid-template-columns: auto auto minmax(0, 1fr);
  min-height: 2rem;
  padding: 0.15rem 0 0.05rem;
}

.wbwc-map-layer-group {
  padding: 0 0 0.35rem;
}

.wbwc-map-layer input {
  height: 1.1rem;
  width: 1.1rem;
}

.wbwc-map-layer__name {
  min-width: 0;
}

.wbwc-map-layer small {
  color: var(--wbwc-map-muted);
  display: inline;
  font-size: 0.76rem;
  line-height: 1.25;
  min-height: 0;
}

.wbwc-map-layer small.is-error {
  color: #b33b24;
}

.wbwc-map-symbol {
  align-items: center;
  display: inline-flex;
  height: 1rem;
  justify-content: center;
  width: 1.45rem;
}

.wbwc-map-symbol::before {
  content: '';
  display: block;
}

.wbwc-map-symbol--sidewalks::before,
.wbwc-map-symbol--typical-sidewalks::before,
.wbwc-map-symbol--low-shade::before,
.wbwc-map-symbol--narrow-sidewalks::before,
.wbwc-map-symbol--low-shade-narrow-sidewalks::before,
.wbwc-map-symbol--bikeways::before,
.wbwc-map-symbol--class-1-bikeways::before,
.wbwc-map-symbol--paint-only-bikeways::before,
.wbwc-map-symbol--class-3-bikeways::before,
.wbwc-map-symbol--class-4-bikeways::before,
.wbwc-map-symbol--crosswalks::before,
.wbwc-map-symbol--controlled-crosswalks::before,
.wbwc-map-symbol--controlled-wide-crosswalks::before,
.wbwc-map-symbol--uncontrolled-crosswalks::before,
.wbwc-map-symbol--uncontrolled-wide-crosswalks::before,
.wbwc-map-symbol--speed::before,
.wbwc-map-symbol--under-35-speed::before,
.wbwc-map-symbol--high-speed::before,
.wbwc-map-symbol--unlisted-speed::before {
  border-radius: 999px;
  height: 0;
  width: 1.4rem;
}

.wbwc-map-symbol--sidewalks::before {
  border-top: 3px solid rgba(102, 112, 133, 0.72);
}

.wbwc-map-symbol--typical-sidewalks::before {
  border-top: 3px solid rgba(102, 112, 133, 0.72);
}

.wbwc-map-symbol--low-shade::before {
  border-top: 4px dotted #667085;
}

.wbwc-map-symbol--narrow-sidewalks::before {
  border-top: 3px dashed #667085;
}

.wbwc-map-symbol--low-shade-narrow-sidewalks::before {
  border-top: 4px dashed #667085;
  border-bottom: 2px dotted #667085;
  height: 0.4rem;
}

.wbwc-map-symbol--bikeways::before {
  border-top: 4px solid #21824d;
}

.wbwc-map-symbol--class-1-bikeways::before {
  border-top: 5px solid #21824d;
}

.wbwc-map-symbol--paint-only-bikeways::before {
  border-top: 4px dashed #21824d;
}

.wbwc-map-symbol--class-3-bikeways::before {
  border-top: 4px dotted #21824d;
}

.wbwc-map-symbol--class-4-bikeways::before {
  border-top: 6px solid #21824d;
}

.wbwc-map-symbol--crosswalks::before {
  border-top: 4px solid #255f9e;
}

.wbwc-map-symbol--controlled-crosswalks::before {
  border-top: 4px solid #255f9e;
}

.wbwc-map-symbol--controlled-wide-crosswalks::before {
  border-top: 6px solid #255f9e;
}

.wbwc-map-symbol--uncontrolled-crosswalks::before {
  border-top: 4px dotted #255f9e;
}

.wbwc-map-symbol--uncontrolled-wide-crosswalks::before {
  border-top: 6px dotted #255f9e;
}

.wbwc-map-symbol--ramps::before,
.wbwc-map-symbol--tactile-ramps::before,
.wbwc-map-symbol--nontactile-ramps::before,
.wbwc-map-symbol--missing-ramps::before,
.wbwc-map-symbol--reports::before {
  border-radius: 999px;
  height: 0.72rem;
  width: 0.72rem;
}

.wbwc-map-symbol--ramps::before {
  background: #c4a7e7;
  border: 2px solid #8b5fbf;
}

.wbwc-map-symbol--tactile-ramps::before {
  background: #c4a7e7;
  border: 2px solid #8b5fbf;
}

.wbwc-map-symbol--nontactile-ramps::before {
  background: rgba(196, 167, 231, 0.42);
  border: 2px solid #8b5fbf;
}

.wbwc-map-symbol--missing-ramps::before {
  background: #fff;
  border: 2px dashed #8b5fbf;
}

.wbwc-map-symbol--speed::before {
  border-top: 4px solid #64748b;
}

.wbwc-map-symbol--under-35-speed::before {
  border-top: 4px solid #64748b;
}

.wbwc-map-symbol--high-speed::before {
  border-top: 5px dotted #475569;
}

.wbwc-map-symbol--unlisted-speed::before {
  border-top: 4px dashed #64748b;
}

.wbwc-map-symbol--generators::before,
.wbwc-map-symbol--destination-type::before {
  background: rgba(180, 83, 9, 0.72);
  border: 0;
  height: 0.75rem;
  width: 0.95rem;
}

.wbwc-map-symbol--reports::before {
  background: #dc2626;
  border: 2px solid #7f1d1d;
}

.wbwc-map-subfilter-list {
  display: grid;
  gap: 0.05rem;
  margin: 0 0 0.05rem 1.55rem;
}

.wbwc-map-subfilter {
  align-items: center;
  color: #3f4b5f;
  cursor: pointer;
  display: grid;
  font-size: 0.8rem;
  font-weight: 400;
  gap: 0.4rem;
  grid-template-columns: auto auto minmax(0, 1fr);
  line-height: 1.2;
  min-height: 1.35rem;
}

.wbwc-map-subfilter input {
  height: 0.95rem;
  width: 0.95rem;
}

.wbwc-map-subfilter:has(input:checked) {
  color: #132033;
}

.wbwc-map-subfilter small {
  color: var(--wbwc-map-muted);
  font-size: 0.76rem;
  font-weight: inherit;
}

.wbwc-map-canvas-wrap,
.wbwc-map-canvas {
  min-height: 0;
  min-width: 0;
}

.wbwc-map-canvas-wrap {
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.wbwc-map-canvas {
  height: 100%;
  width: 100%;
}

.wbwc-map-report-form {
  display: grid;
  gap: 0.85rem;
}

.wbwc-map-report-point {
  background: #eef5fb;
  border: 1px solid #c8dcea;
  border-radius: 0.4rem;
  padding: 0.75rem;
}

.wbwc-map-report-point.is-selected {
  background: #edf8f0;
  border-color: #b9dcc4;
}

.wbwc-map-report-point p {
  color: #3f4b5f;
  font-size: 0.88rem;
  line-height: 1.35;
  margin: 0.5rem 0 0;
}

.wbwc-map-field {
  display: grid;
  gap: 0.3rem;
}

.wbwc-map-field > span,
.wbwc-map-check {
  color: #27313f;
  font-size: 0.9rem;
  font-weight: 700;
}

.wbwc-map-field small {
  color: var(--wbwc-map-muted);
  font-weight: 400;
}

.wbwc-map-field .form-input,
.wbwc-map-field .form-select {
  font-size: 1rem;
  min-height: 2.5rem;
}

.wbwc-map-field textarea.form-input {
  min-height: 6rem;
  resize: vertical;
}

.wbwc-map-field input[type="file"].form-input {
  padding: 0.5rem;
}

.wbwc-map-photo-preview {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #edf1f5;
  border-radius: 0.4rem;
  display: grid;
  gap: 0.55rem;
  grid-template-columns: 3.25rem minmax(0, 1fr) auto;
  padding: 0.55rem;
}

.wbwc-map-photo-preview[hidden] {
  display: none;
}

.wbwc-map-photo-preview img {
  aspect-ratio: 1;
  background: #e7ecf2;
  border-radius: 0.35rem;
  height: 3.25rem;
  object-fit: cover;
  width: 3.25rem;
}

.wbwc-map-photo-preview span {
  color: #27313f;
  font-size: 0.86rem;
  line-height: 1.25;
  min-width: 0;
  overflow-wrap: anywhere;
}

.wbwc-map-form-status {
  color: #285a39;
  font-size: 0.9rem;
  line-height: 1.35;
  min-height: 1.3rem;
}

.wbwc-map-form-status:focus {
  outline: 2px solid var(--wbwc-map-blue);
  outline-offset: 2px;
}

.wbwc-map-form-status.is-success {
  background: #edf8f0;
  border: 1px solid #b9dcc4;
  border-radius: 0.4rem;
  padding: 0.6rem;
}

.wbwc-map-form-status.is-error {
  color: #b33b24;
}

.wbwc-map-form-status.is-error:not(:empty) {
  background: #fff1ed;
  border: 1px solid #efc2b7;
  border-radius: 0.4rem;
  padding: 0.6rem;
}

.wbwc-map-honeypot {
  height: 1px;
  left: -9999px;
  overflow: hidden;
  position: absolute;
  top: auto;
  width: 1px;
}

.wbwc-map-popup {
  color: #1e2937;
  min-width: 13rem;
}

.wbwc-map-popup h2 {
  font-size: 1rem;
  line-height: 1.25;
  margin: 0 0 0.45rem;
}

.wbwc-map-popup dl {
  display: grid;
  gap: 0.25rem 0.6rem;
  grid-template-columns: max-content minmax(0, 1fr);
  margin: 0;
}

.wbwc-map-popup dt {
  color: #536178;
  font-weight: 700;
}

.wbwc-map-popup dd {
  margin: 0;
}

.wbwc-map-popup__photo {
  display: block;
  margin-top: 0.7rem;
}

.wbwc-map-popup__photo img {
  background: #edf1f5;
  border: 1px solid #d6dee6;
  border-radius: 0.3rem;
  display: block;
  max-height: 12rem;
  object-fit: contain;
  width: 100%;
}

.wbwc-map-popup__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.7rem;
}

.wbwc-map-popup__links a {
  font-weight: 700;
}

.leaflet-tooltip.wbwc-map-tooltip {
  background: rgba(17, 24, 39, 0.92);
  border: 0;
  border-radius: 0.35rem;
  box-shadow: 0 0.25rem 0.8rem rgba(17, 24, 39, 0.2);
  color: #fff;
  font-size: 0.78rem;
  line-height: 1.25;
  padding: 0.35rem 0.45rem;
}

.leaflet-tooltip.wbwc-map-tooltip::before {
  display: none;
}

.leaflet-tooltip.wbwc-map-tooltip strong,
.leaflet-tooltip.wbwc-map-tooltip span {
  display: block;
}

.leaflet-tooltip.wbwc-map-tooltip span {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 600;
  margin-top: 0.1rem;
}

.wbwc-map-report-marker {
  background: #111827;
  border: 3px solid #fff;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(17, 24, 39, 0.35);
  height: 1.35rem;
  width: 1.35rem;
}

.wbwc-map-app.is-picking-point .wbwc-map-canvas {
  cursor: crosshair;
}

@media (max-width: 820px) {
  .wbwc-map-app {
    --wbwc-map-sheet-height: min(40vh, 22rem);
    --wbwc-map-sheet-height: min(40dvh, 22rem);
    display: block;
    height: calc(100vh - 82px);
    height: calc(100dvh - 82px);
    min-height: 34rem;
  }

  .wbwc-map-canvas-wrap {
    height: 100%;
  }

  .wbwc-map-panel {
    border: 1px solid rgba(31, 41, 55, 0.18);
    border-bottom: 0;
    border-radius: 0.8rem 0.8rem 0 0;
    bottom: 0;
    box-shadow: 0 -0.5rem 1.4rem rgba(31, 41, 55, 0.18);
    left: 0.55rem;
    max-height: var(--wbwc-map-sheet-height);
    position: absolute;
    right: 0.55rem;
  }

  .wbwc-map-intro {
    display: none;
  }

  .wbwc-map-tabs {
    width: 100%;
  }

  .wbwc-map-panel__section {
    padding: 0.7rem;
  }

  .wbwc-map-layer {
    min-height: 2.35rem;
  }

  .wbwc-map-tab {
    font-size: 0.82rem;
    min-height: 2rem;
    padding: 0.32rem 0.6rem;
  }

  .leaflet-bottom.leaflet-right {
    bottom: var(--wbwc-map-sheet-height);
  }
}

@media (max-width: 440px) {
  .wbwc-map-app {
    --wbwc-map-sheet-height: 40vh;
    --wbwc-map-sheet-height: 40dvh;
    height: calc(100vh - 76px);
    height: calc(100dvh - 76px);
  }

  .wbwc-map-panel {
    left: 0.35rem;
    right: 0.35rem;
  }

  .wbwc-map-photo-preview {
    grid-template-columns: 2.8rem minmax(0, 1fr);
  }

  .wbwc-map-photo-preview .button {
    grid-column: 1 / -1;
  }
}
