/* Shrink the layers toggle button */
.leaflet-control-layers-toggle {
    width: 35px !important;
    height: 35px !important;
    background-size: 22px 22px !important;
}

.leaflet-control-zoom a {
    width: 35px !important;
    height: 35px !important;
    line-height: 35px !important;
}

/* Leaflet rotate control (plugin) */
.leaflet-control-rotate a,
.leaflet-control-rotate-toggle,
.leaflet-control-rotate.leaflet-bar a {
    width: 35px !important;
    height: 35px !important;
    line-height: 35px !important;
}

/* 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-top .leaflet-control {
    margin-top: 3px !important;
}
.leaflet-control-attribution {
    order: 2;
}

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

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

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

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

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

.googlemaps-control.leaflet-bar,
.png-control.leaflet-bar,
.ovl-legend.leaflet-bar,
.ovl-legend-launcher.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 {
  width: 35px;
  height: 35px;
  padding: 0;
  background: #fff;
  color: #111;
  font-family: Arial, sans-serif;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  line-height: 28px;
  text-align: center;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.png-icon {
  width: 25px;
  height: 25px;
}

.png-icon rect,
.png-icon circle {
  fill: #fff;
  stroke: #222;
  stroke-width: 1.4;
  vector-effect: non-scaling-stroke;
  shape-rendering: geometricPrecision;
}

/* 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: rgba(255, 255, 255, 0.96);
  color: black;
  margin-left: 6px;
  margin-bottom: calc(6px + var(--legend-panel-offset, 0px));
}

.leaflet-bottom .ovl-legend {
  margin-bottom: calc(6px + var(--legend-panel-offset, 0px)) !important;
}

.ovl-legend-launcher{
  margin-top: 6px;
}

.ovl-legend-launcher__btn.leaflet-bar-part{
  border: 0;
}

.ovl-legend-launcher__btn{
  width: 35px;
  height: 35px;
  background: #fff;
  color: #111;
  font-family: Arial, sans-serif;
  font-size: 19px;
  font-weight: 700;
  line-height: 35px;
  text-align: center;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ovl-legend-launcher__btn.is-active{
  background: #f2f2f2;
}

.ovl-legend-icon{
  width: 20px;
  height: 20px;
}

.ovl-legend-icon rect,
.ovl-legend-icon line{
  stroke: #222;
  stroke-width: 1.4;
  vector-effect: non-scaling-stroke;
  shape-rendering: geometricPrecision;
}

.ovl-legend-icon rect{
  fill: #fff;
}

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

.ovl-title{
  padding:6px 10px 4px;
  font-weight:700;
  font-size: 13px;
  background:#fff;
  border-bottom:none;
}
.ovl-body{ padding:0 8px 3px; }

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

.ovl-head{ display:flex; align-items:center; gap:8px; user-select:none; }
.ovl-head .ovl-cb{
  margin: 0;
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  vertical-align: middle;
}
.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.2;
}

.ovl-rules--performance{
  display: block;
  height: auto;
  padding: 0;
}

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

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

.ovl-ruleicon{
  width: 20px;
  height: 12px;
  flex: 0 0 20px;
  display: block;
}

.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 */
  background:#fff;
  padding:0 8px;
}
.ovl-rule{ display:flex; align-items:center; gap:6px; margin:0; }
.ovl-ruletext{
  font-weight:500;
  line-height: 1.2;
}

.ovl-rules .ovl-rule{
  min-height: 16px;
}


/* ---------------------------------------- */
/* 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;
}
