@import 'bourbon';

@mixin no-select {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

$container-background: rgba(#efefef, 0.8);
$marker-background: #FC5B3F;

.planit-container {
  position: relative;
  display: block;
  width: 100%;
  height: 400px;
  margin: 25px auto;
  background: $container-background;
  @include no-select;
  .planit-image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    img {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
    }
  }

  .planit-controls {
    display: inline-block;
    position: absolute;
    left: 5px;
    top: 5px;
    z-index: 999;
    border: 1px solid #ccc;
    a.zoom {
      display: block;
      width: 15px;
      height: 15px;
      padding: 5px 5px;
      text-decoration: none;
      font-size: 18px;
      line-height: 14px;
      font-weight: 600;
      color: #444;
      text-align: center;
      background: white;
      &:hover {
        background: #ccc
      }
    }
  }

  .planit-markers-container {
    position: relative;
    width: 100%;
    height: 100%;
    // background-size: 100%;
    // background-repeat: no-repeat;
    // background-position: top left;
    overflow: hidden;

    .planit-marker {
      position: absolute;
      width: 30px;
      height: 30px;
      z-index: 99;
      border-radius: 50%;
      background: $marker-background;
      -webkit-touch-callout: none;
      -webkit-user-select: none;
      -khtml-user-select: none;
      -moz-user-select: none;
      -ms-user-select: none;
      user-select: none;
      transition: none;
      &.draggable {
        &:hover {
          opacity: 0.8;
          cursor: move;
          cursor: -webkit-grab;
        }
      }
      &.is-dragging {
        &:hover {
          opacity: 0.8;
          cursor: move;
          cursor: -webkit-grabbing;
        }
      }
    }
  }

  .planit-infobox-container {
    position: absolute;
    width: 100%;
    height: 100%;

    .planit-infobox {
      position: absolute;
      display: none;
      min-width: 200px;
      max-width: 80%;
      z-index: 998;
      padding: 5px 15px;
      cursor: initial;
      background: #efefef;
      border-radius: 3px;
      &.active {
        display: inline-block;
      }
      &.hidden {
        display: none;
      }
      &:after {
        content:'';
        position: absolute;
        width: 0;
        height: 0;
      }
      &.arrow {
        &.top {
          &:after {
            top: 100%;
            left: 50%;
            margin-left: -10px;
            border-top: solid 10px white;
            border-left: solid 10px transparent;
            border-right: solid 10px transparent;
          }
        }
        &.right {
          &:after {
            top: 50%;
            right: 100%;
            margin-top: -10px;
            border-right: solid 10px white;
            border-top: solid 10px transparent;
            border-bottom: solid 10px transparent;
          }
        }
        &.bottom {
          &:after {
            bottom: 100%;
            left: 50%;
            margin-left: -10px;
            border-bottom: solid 10px white;
            border-left: solid 10px transparent;
            border-right: solid 10px transparent;
          }
        }
        &.left {
          &:after {
            top: 50%;
            left: 100%;
            margin-top: -10px;
            border-left: solid 10px white;
            border-top: solid 10px transparent;
            border-bottom: solid 10px transparent;
          }
        }
      }
    }
  }
}
