@import "../../core/styles/themes/default";
@import "../../core/styles/mixins/index";
@tooltip-prefix-cls: ~"@{ant-prefix}-tooltip";

.@{tooltip-prefix-cls} {
  .reset-component;

  position: absolute;
  z-index: @zindex-tooltip;
  display: block;
  max-width: @tooltip-max-width;
  visibility: visible;

  &-hidden {
    display: none;
  }

  &-placement-top,
  &-placement-topLeft,
  &-placement-topRight {
    padding-bottom: @tooltip-distance;
  }
  &-placement-right,
  &-placement-rightTop,
  &-placement-rightBottom {
    padding-left: @tooltip-distance;
  }
  &-placement-bottom,
  &-placement-bottomLeft,
  &-placement-bottomRight {
    padding-top: @tooltip-distance;
  }
  &-placement-left,
  &-placement-leftTop,
  &-placement-leftBottom {
    padding-right: @tooltip-distance;
  }

  // Wrapper for the tooltip content
  &-inner {
    min-width: 30px;
    min-height: 32px;
    padding: 6px 8px;
    color: @tooltip-color;
    text-align: left;
    text-decoration: none;
    word-wrap: break-word;
    background-color: @tooltip-bg;
    border-radius: @border-radius-base;
    box-shadow: @box-shadow-base;
  }

  // Arrows
  &-arrow {
    position: absolute;
    width: 0;
    height: 0;
    border-color: transparent;
    border-style: solid;
  }

  &-placement-top &-arrow,
  &-placement-topLeft &-arrow,
  &-placement-topRight &-arrow {
    bottom: @tooltip-distance - @tooltip-arrow-width;
    border-width: @tooltip-arrow-width @tooltip-arrow-width 0;
    border-top-color: @tooltip-arrow-color;
  }

  &-placement-top &-arrow {
    left: 50%;
    margin-left: -@tooltip-arrow-width;
  }

  &-placement-topLeft &-arrow {
    left: 16px;
  }

  &-placement-topRight &-arrow {
    right: 16px;
  }

  &-placement-right &-arrow,
  &-placement-rightTop &-arrow,
  &-placement-rightBottom &-arrow {
    left: @tooltip-distance - @tooltip-arrow-width;
    border-width: @tooltip-arrow-width @tooltip-arrow-width @tooltip-arrow-width 0;
    border-right-color: @tooltip-arrow-color;
  }

  &-placement-right &-arrow {
    top: 50%;
    margin-top: -@tooltip-arrow-width;
  }

  &-placement-rightTop &-arrow {
    top: 8px;
  }

  &-placement-rightBottom &-arrow {
    bottom: 8px;
  }

  &-placement-left &-arrow,
  &-placement-leftTop &-arrow,
  &-placement-leftBottom &-arrow {
    right: @tooltip-distance - @tooltip-arrow-width;
    border-width: @tooltip-arrow-width 0 @tooltip-arrow-width @tooltip-arrow-width;
    border-left-color: @tooltip-arrow-color;
  }

  &-placement-left &-arrow {
    top: 50%;
    margin-top: -@tooltip-arrow-width;
  }

  &-placement-leftTop &-arrow {
    top: 8px;
  }

  &-placement-leftBottom &-arrow {
    bottom: 8px;
  }

  &-placement-bottom &-arrow,
  &-placement-bottomLeft &-arrow,
  &-placement-bottomRight &-arrow {
    top: @tooltip-distance - @tooltip-arrow-width;
    border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;
    border-bottom-color: @tooltip-arrow-color;
  }

  &-placement-bottom &-arrow {
    left: 50%;
    margin-left: -@tooltip-arrow-width;
  }

  &-placement-bottomLeft &-arrow {
    left: 16px;
  }

  &-placement-bottomRight &-arrow {
    right: 16px;
  }
}

// Base class
/*.@{tooltip-prefix-cls} {
    .reset-component;
    position: absolute;
    z-index: @zindex-tooltip;
    display: block;
    visibility: visible;
    max-width: @tooltip-max-width;
    // transition: all .3s;
    transform: scale(0, 0);
    transition-timing-function: cubic-bezier(0.23, 1, 0.32, 1);
    transition-duration: 400ms;
    transition-delay: 0ms;
    transition-property: transform;
    transform-origin: 0 0;
    // opacity: 0;
    &-wrap {
        display: inline-block;
        position: relative;
    }
    &-hidden {
        display: none;
    }

    &-placement-top,
    &-placement-topLeft,
    &-placement-topRight {
        padding-bottom: @tooltip-distance;
    }
    &-placement-right,
    &-placement-rightTop,
    &-placement-rightBottom {
        padding-left: @tooltip-distance;
    }
    &-placement-bottom,
    &-placement-bottomLeft,
    &-placement-bottomRight {
        padding-top: @tooltip-distance;
    }
    &-placement-left,
    &-placement-leftTop,
    &-placement-leftBottom {
        padding-right: @tooltip-distance;
    }

    &-enter&-enter-active&-placement-bottom,
    &-leave&-leave-active&-placement-bottom {
        transform-origin: 50% 0;
    }
    
    &-leave&-leave-active&-placement-bottomLeft,
    &-enter&-enter-active&-placement-bottomLeft,
    &-enter&-enter-active&-placement-rightTop,
    &-leave&-leave-active&-placement-rightTop {
        transform-origin: 0 0;
    }
    &-leave&-leave-active&-placement-bottomRight,
    &-enter&-enter-active&-placement-bottomRight,
    &-enter&-enter-active&-placement-leftBottom,
    &-leave&-leave-active&-placement-leftBottom {
        transform-origin: 100% 0;
    }

    &-enter&-enter-active&-placement-topLeft,
    &-leave&-leave-active&-placement-topLeft,
    &-enter&-enter-active&-placement-rightBottom,
    &-leave&-leave-active&-placement-rightBottom {
        transform-origin: 0 100%;
    }
    &-enter&-enter-active&-placement-top,
    &-leave&-leave-active&-placement-top {
        transform-origin: 50% 100%;
    }
    &-enter&-enter-active&-placement-topRight,
    &-leave&-leave-active&-placement-topRight,
    &-enter&-enter-active&-placement-leftTop,
    &-leave&-leave-active&-placement-leftTop, {
        transform-origin: 100% 100%;
    }
    &-enter&-enter-active&-placement-right,
    &-leave&-leave-active&-placement-right {
        transform-origin: 0 50%;
    }
    &-enter&-enter-active&-placement-left,
    &-leave&-leave-active&-placement-left {
        transform-origin: 100% 50%;
    } 

    &-enter&-enter-active {
        transform: scale(1, 1);
        // opacity: 1;
    }

    &-leave&-leave-active {
        transform: scale(0, 0);
        // opacity: 0;
    }     

    // Wrapper for the tooltip content
    &-inner {
        padding: 6px 8px;
        color: @tooltip-color;
        text-align: left;
        text-decoration: none;
        background-color: @tooltip-bg;
        border-radius: @border-radius-base;
        box-shadow: @box-shadow-base;
        min-height: 32px;
        word-wrap: break-word;
    }  

    // Arrows
    &-arrow {
        position: absolute;
        width: 0;
        height: 0;
        border-color: transparent;
        border-style: solid;
    }  

    &-placement-top &-arrow,
    &-placement-topLeft &-arrow,
    &-placement-topRight &-arrow {
        bottom: @tooltip-distance - @tooltip-arrow-width;
        border-width: @tooltip-arrow-width @tooltip-arrow-width 0;
        border-top-color: @tooltip-arrow-color;
    }  

    &-placement-top &-arrow {
        left: 50%;
        margin-left: -@tooltip-arrow-width;
    }  

    &-placement-topLeft &-arrow {
        left: 16px;
    }  

    &-placement-topRight &-arrow {
        right: 16px;
    }  

    &-placement-right &-arrow,
    &-placement-rightTop &-arrow,
    &-placement-rightBottom &-arrow {
        left: @tooltip-distance - @tooltip-arrow-width;
        border-width: @tooltip-arrow-width @tooltip-arrow-width @tooltip-arrow-width 0;
        border-right-color: @tooltip-arrow-color;
    }

    &-placement-right &-arrow {
        top: 50%;
        margin-top: -@tooltip-arrow-width;
    }

    &-placement-rightTop &-arrow {
        top: 8px;
    }

    &-placement-rightBottom &-arrow {
        bottom: 8px;
    }

    &-placement-left &-arrow,
    &-placement-leftTop &-arrow,
    &-placement-leftBottom &-arrow {
        right: @tooltip-distance - @tooltip-arrow-width;
        border-width: @tooltip-arrow-width 0 @tooltip-arrow-width @tooltip-arrow-width;
        border-left-color: @tooltip-arrow-color;
    }

    &-placement-left &-arrow {
        top: 50%;
        margin-top: -@tooltip-arrow-width;
    }

    &-placement-leftTop &-arrow {
        top: 8px;
    }

    &-placement-leftBottom &-arrow {
        bottom: 8px;
    }

    &-placement-bottom &-arrow,
    &-placement-bottomLeft &-arrow,
    &-placement-bottomRight &-arrow {
        top: @tooltip-distance - @tooltip-arrow-width;
        border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;
        border-bottom-color: @tooltip-arrow-color;
    }

    &-placement-bottom &-arrow {
        left: 50%;
        margin-left: -@tooltip-arrow-width;
    }

    &-placement-bottomLeft &-arrow {
        left: 16px;
    }

    &-placement-bottomRight &-arrow {
        right: 16px;
    }
}  */
