/* Set farmOS-map accent color to match Gin. */
.farm-map {
  --farmos-map-accent-color: var(--gin-color-primary);
  border-radius: var(--gin-border-s);
}

/* Move map buttons to the top when focused. Prevents surrounding control
buttons from covering up the :focus box-shadow. A position is required. */
.farm-map button:focus {
  position: relative;
  z-index: 1000;
}

/* Override the geocoder input to work with Gin :focus bos-shadow. */
.farm-map input#gcd-input-query {
  height: 1.75em;
  top: 0.5em;
  box-shadow: 0 0 0 2px var(--gin-bg-layer), 0 0 0 4px var(--gin-color-focus);
  -webkit-box-shadow: 0 0 0 2px var(--gin-bg-layer), 0 0 0 4px var(--gin-color-focus);
}

/* Adjust map ui elements background colors for the Gin theme dark mode. */
.gin--dark-mode .farm-map .ol-control,
.gin--dark-mode .farm-map .ol-scale-line {
  background-color: rgba(var(--gin-bg-app-rgb), .25);
}
.gin--dark-mode .farm-map .ol-control:hover {
  background-color: rgba(var(--gin-bg-app-rgb), .6);
}
.gin--dark-mode .farm-map .ol-control button {
  background-color: rgba(var(--gin-bg-app-rgb), .8);
}
