@popupPrefix: lsbcc-popover;

.@{popupPrefix} {
  position: relative;
  display: inline-block;

  .popover-container {
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    position: absolute;
    z-index: 999;
    opacity: 1;
    transition: all .3s linear;

    &.top {
      bottom: 100%;
      right: 50%;
      transform: translateX(50%);
      margin-bottom: 8px;
    }

    &.right {
      top: 50%;
      left: 100%;
      transform: translateY(-50%);
      margin-left: 8px;
    }

    &.bottom {
      top: 100%;
      left: 50%;
      transform: translateX(-50%);
      margin-top: 8px;
    }

    &.left {
      top: 50%;
      right: 100%;
      transform: translateY(-50%);
      margin-right: 8px;
    }

    &.hide {
      opacity: 0;
      z-index: 0;
      transition: all .3s linear;
    }

    .popover-main {
      min-width: 180px;
      min-height: 40px;

      .popover-title {
        padding: 8px 16px;
        font-weight: 600;
        font-size: 16px;
        line-height: 17px;
        color: #333;
        border-bottom: 1px solid #f0f0f0;
      }

      .popover-content {
        padding: 0 16px;
        white-space: nowrap;
        font-size: 14px;
        line-height: 14px;
        color: #333;
      }
    }

    .arrow {
      position: absolute;
      width: 0;
      height: 0;

      &.top {
        border-top: 4px solid #fff;
        border-left: 4px solid transparent;
        border-right: 4px solid transparent;
        bottom: -4px;
        left: 50%;
        transform: translate(-50%, 0);
      }

      &.right {
        border-top: 4px solid transparent;
        border-bottom: 4px solid transparent;
        border-right: 4px solid #fff;
        left: -4px;
        top: 50%;
        transform: translate(0, -50%);
      }

      &.bottom {
        border-bottom: 4px solid #fff;
        border-left: 4px solid transparent;
        border-right: 4px solid transparent;
        top: -4px;
        left: 50%;
        transform: translate(-50%, 0);
      }

      &.left {
        border-top: 4px solid transparent;
        border-bottom: 4px solid transparent;
        border-left: 4px solid #fff;
        right: -4px;
        top: 50%;
        transform: translate(0, -50%);
      }
    }
  }

  .popover-children {
    cursor: pointer;
    width: 100%;
    display: block;
  }
}