/* Shrink the layers toggle button */
.leaflet-control-layers-toggle {
    width: 30px !important;
    height: 30px !important;
    background-size: 20px 20px !important; /* shrink icon inside */
}

/* Optional: match zoom button style (rounded) */
.leaflet-control-layers {
    border-radius: 4px !important;
}

/* Turn the bottom-right container into a horizontal row */
.leaflet-bottom.leaflet-right {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px; /* spacing between attribution & scale */
}
.leaflet-control-scale {
    order: 1;
}
.leaflet-control-attribution {
    order: 2;
}

.googlemaps-control {
  margin-top: 6px;
}

.googlemaps-control.leaflet-bar {
  border: 2px solid rgba(0,0,0,0.2);
  box-shadow: 0 1px 5px rgba(0,0,0,0.4);
  border-radius: 4px;
  overflow: hidden;
}

.googlemaps-btn.leaflet-bar-part {
  border: 0;
}

.googlemaps-btn {
  width: 30px;
  height: 30px;
  background: #fff;
  color: #111;
  font-family: Arial, sans-serif;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  line-height: 30px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 2px;
  border-radius: 0;
}

.png-control {
  margin-top: 6px;
}

.png-control.leaflet-bar {
  border: 2px solid rgba(0,0,0,0.2);
  box-shadow: 0 1px 5px rgba(0,0,0,0.4);
  border-radius: 4px;
  overflow: hidden;
}

.png-btn.leaflet-bar-part {
  border: 0;
}

.png-btn {
  width: 30px;
  height: 30px;
  background: #fff;
  color: #111;
  font-family: Arial, sans-serif;
  font-size: 19px;
  font-weight: 700;
  cursor: pointer;
  line-height: 23px;
  text-align: center;
  border-radius: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

/* default: allow normal scrolling everywhere */
.leaflet-container.transform-locked {
  touch-action: none;      /* stops browser page-pan/zoom gestures */
}

/* ---------------------------------------- */
/* Map legend                               */
/* ---------------------------------------- */

.ovl-legend{
  width:220px;
  background:#fff;
  border: 2px solid rgba(0,0,0,0.25);
  border-radius:4px;
  /* box-shadow:0 1px 4px rgba(0,0,0,.25); */
  color: black;
  margin-top:52px; /* if base-layer control also top-right */
}

.ovl-legend.collapsed .ovl-body {
  display: none;
}

.ovl-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ovl-toggle {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  color: black;
  padding: 2px 6px;
}

.ovl-title{ padding:3px 10px; font-weight:700; background:#e5e5e5; border-bottom:1px solid #bbb; }
.ovl-body{ padding:3px 8px; }

.ovl-item{ padding:3px 0; border-bottom:1px solid rgba(0,0,0,.08); }
.ovl-item:last-child{ border-bottom:0; }

.ovl-head{ display:flex; align-items:center; gap:8px; user-select:none; }
.ovl-name{ font-weight:600; }

.ovl-swatch, .ovl-ruleicon{
  width:16px; height:16px;
  object-fit:contain;
  flex:0 0 16px;
  border: 1px solid #000;
  border-radius: 2px;
  display: inline-block;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

.ovl-swatch--wide{
  width: 20px;
  height: 12px;
  flex: 0 0 20px;
}

.ovl-gradient{
  width: 20px;
  height: 48px;
  border-radius: 2px;
  border: 1px solid #000;
  background: linear-gradient(180deg, #35b33b 0%, #ffff4c 50%, #ff4040 100%);
  display: inline-block;
  flex: 0 0 20px;
}

.ovl-rule--gradient{
  align-items: stretch;
}

.ovl-gradient-labels{
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 48px;
}

.ovl-gradient-labels .ovl-ruletext{
  line-height: 1;
}

.ovl-rules--performance{
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 48px;
  padding-top: 0;
  padding-bottom: 0;
}

.ovl-color{
  width: 20px;
  height: 12px;
  border-radius: 2px;
  border: 1px solid #000;
  display: inline-block;
  flex: 0 0 20px;
}

.ovl-hatch{
  width: 22px;
  height: 12px;
  border-radius: 2px;
  border: 1px solid #000;
  display: inline-block;
  flex: 0 0 22px;
  background-position: 0 0;
  background-repeat: repeat;
  background-size: auto;
}

.ovl-hatch--slash{
  background-image: repeating-linear-gradient(
    -45deg,
    #000 0,
    #000 1px,
    transparent 1px,
    transparent 6px
  );
}

.ovl-hatch--cross{
  background-image:
    repeating-linear-gradient(
      -45deg,
      #000 0,
      #000 1px,
      transparent 1px,
      transparent 6px
    ),
    repeating-linear-gradient(
      45deg,
      #000 0,
      #000 1px,
      transparent 1px,
      transparent 6px
    );
}

.ovl-hatch--solid{
  background-image: none;
}

.ovl-rules{
  margin-left:21px;     /* indent under checkbox */
  /* margin-top:6px; */
  background:#fff;
  /* border:1px solid rgba(0,0,0,.12); */
  /* border-radius:3px; */
  padding:0px 8px;
}
.ovl-rule{ display:flex; align-items:center; gap:8px}
.ovl-ruletext{ font-weight:500; }

.ovl-rules--performance .ovl-ruletext{
  line-height: 1;
}


/* ---------------------------------------- */
/* Nudge WMS Background layer               */
/* ---------------------------------------- */

/* Outer frame */
.nudge-bar {
  display: inline-flex;
  flex-direction: column;
  border: 2px solid rgba(0,0,0,0.25);
  border-radius: 6px;
  overflow: hidden;
  background: transparent;
}

/* Generic 3-column row */
.nudge-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  width: 72px;      /* 3 × 24px */
  height: 24px;
  background: #fff;
  position: relative;
}

/* Generic button style */
.nudge-btn, .nudge-reset {
  background: #fff;
  border: none;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.nudge-btn:hover, .nudge-reset:hover {
  background: #f4f4f4;
}

/* Divider lines */
.nudge-divider {
  height: 1px;
  width: 72px;
  background: #ccc;
}

.nudge-col-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #ccc;
}
.nudge-col-divider.left  { left: 24px; }
.nudge-col-divider.right { left: 48px; }

/* ---------------------------------------- */
/* SMALL THIN ARROW ICONS (CSS-based)       */
/* ---------------------------------------- */

.arrow {
  width: 0;
  height: 0;
  border-style: solid;
}

.arrow-up {
  border-width: 0 5px 6px 5px;
  border-color: transparent transparent #333 transparent;
}

.arrow-down {
  border-width: 6px 5px 0 5px;
  border-color: #333 transparent transparent transparent;
}

.arrow-left {
  border-width: 5px 6px 5px 0;
  border-color: transparent #333 transparent transparent;
}

.arrow-right {
  border-width: 5px 0 5px 6px;
  border-color: transparent transparent transparent #333;
}

/* Center dot smaller and nicer */
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #333;
}

/* Diagonals: no icon, just blank white square */
.nudge-diagonal {
  font-size: 0;
}
