@charset "UTF-8";
@import "common/var";
@import "./icon";
@import "./mixins/mixins";

@include b(backtop) {
  $height: 68px !default;
  position: relative;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  -webkit-appearance: none;
  text-align: center;
  box-sizing: border-box;
  outline: none;
  margin: 0;
  height:$height+20px;
  background-color: $--color-white;
  color:$--color-text-content;
  padding-bottom: 20px;
  .xb-backtop-text{
    font-size: 12px;
  }
  &:last-child{
    padding-bottom: 5px;
    height:$height+3px;
  }
  [class*="xb_icon_"] {
    font-size: 34px;
    color:$--color-text-content;
    padding:5px 0 12px 0;
  }

  .xb-backtop-hidden{
    opacity: 0;
    right: -300px;
    transition: right .5s ease-out;
  }

  &:hover{
    .xb-backtop-hidden{
      display: flex;
      opacity: 1;
      background-color:$--color-white;
      height:$height;
      position: absolute;
      right: 0;
      top: 0;
      z-index: 100;
      box-shadow:0 2px 6px 0 rgba(51, 51, 51, 0.18);
      border-radius:4px  0px  0px  4px;
      align-items: center;
      padding:0 16px;
      .xb-backtop-text{
        width: 100%;
        margin-left: 12px;
        font-size: 16px;
        white-space: nowrap;
      }
      & [class*="icon_"] {
        padding: 13px 0;
      }
    }
    .xb-backtop-init,.xb-backtop-hidden{
      .xb-backtop-text,& [class*="xb_icon_"]{
        color:$--color-theme-ckb;
        [data-theme="ckb-symbol"] & {
          color:$--color-theme-ckb;
        }
        [data-theme="yjb-symbol"] & {
          color:$--color-theme-yjb;
        }
        [data-theme="sz-symbol"] & {
          color:$--color-theme-sz;
        }
      }
    }
  }
}

@include b(backtop-group) {
  width:84px;
  background-color: $--color-white;
  position: relative;
  right: 0;

  padding:22px 0;
  border-radius: 18px  0px  0px  18px;
  box-shadow: 0px 2px 12px 0px rgba(0,0,0,0.06);
}
