@import '../../style/themes/index';
@import '../../style/mixins/index';

@backtop-prefix-cls: ~'@{ant-prefix}-back-top';

.@{backtop-prefix-cls} {
  .reset-component();

  position: fixed;
  right: 100px;
  bottom: 50px;
  z-index: @zindex-back-top;
  width: 40px;
  height: 40px;
  cursor: pointer;

  &:empty {
    display: none;
  }

  &-rtl {
    right: auto;
    left: 100px;
    direction: rtl;
  }

  &-content {
    width: 40px;
    height: 40px;
    overflow: hidden;
    color: @back-top-color;
    text-align: center;
    transition: all 0.3s;
  }

  &-icon {
    font-size: 40px;
    line-height: 40px;
    color: @back-top-bg;
    position: relative;

    &-default-hover {
      position: absolute;
      opacity: 0;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
    }

    &:hover {
      .@{backtop-prefix-cls}-icon-default-hover {
        opacity: 1;
      }
    }

    .@{iconfont-css-prefix} {
      background-color: #fff;
      border-radius: 3px;
    }
  }
}

@import './responsive';
