@require '../../../style/var.styl';
@require '../../../style/media.styl';

:host {
  position: relative;
  display: block;
}

:host, .igo-map-browser-target {
  width: 100%;
  height: 100%;
}

:host >>> igo-zoom-button {
  position: absolute;
  bottom: $igo-margin;
  right: $igo-margin;
  +media(mobile) {
    display: none;
  }
}

:host >>> igo-user-button {
  position: absolute;
  bottom: $igo-margin;
  right: "calc(%s + 50px)" % $igo-margin;
  +media(mobile) {
    right: "calc(%s + 90px)" % $igo-margin;
  }
}

:host >>> igo-geolocate-button {
  position: absolute;
  bottom: 95px;
  right: $igo-margin;
  +media(mobile) {
    bottom: $igo-margin;
  }
}

:host >>> igo-baselayers-switcher {
  position: absolute;
  bottom: $igo-margin;
  left: $igo-margin;
}

:host.igo-attribution-offset >>> .ol-attribution {
  left: 90px;
  width: calc(100% - 200px);
  +media(mobile) {
    left: 50px;
  }
}

:host >>> .ol-attribution {
  left: $igo-margin;
  bottom: $igo-margin;
  text-align: left;
  padding: 0;
  margin-right: 90px;
  background-color: rgba(255,255,255,0);
  width: calc(100% - 100px);

  &.ol-logo-only {
    height: inherit;
  }
  &.ol-collapsed {
    background: none;
    button {
      transform: none;
    }
  }
  button {
    transform: rotate(180deg);
    background-color: white;
    cursor: pointer;
  }
}

:host >>> .ol-scale-line-inner {
 font-size:11px;
 text-align:center;
 margin:1px;
}

:host >>> .ol-scale-line {
 background:rgba(255,255,255,0);
 border-radius: 4px;
 bottom: 2em;
 left:$igo-margin;
 padding: 4px;
 position:absolute
}

:host >>> canvas {
  display: block;
}

:host >>> .ol-overviewmap {
  left: 0.5em;
  bottom: 4em;
}
