$deviceWidth: 750;

@function vmin($rpx) {
    @return #{$rpx * 100 / $deviceWidth}vmin;
}

@mixin password-open-card {
  .wx-avatar  {
    margin-top: vmin(80) !important;
  }
  .describe {
    margin-top: vmin(24) !important;
    .text {
      font-size: vmin(36);
    }
  }
  .password {
    width: vmin(420);
    min-height: vmin(80);
    padding: vmin(20) vmin(24);
    border-radius: vmin(40);
    border: vmin(2) solid #FF7D48;
    background: #FFF;
    margin: vmin(32) auto 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;

    color: #ff5052;
    text-align: center;
    font-family: "PingFang SC";
    font-size: vmin(28);
    font-style: normal;
    font-weight: 500;
    line-height: vmin(40);
  }
  .open-img {
    width: vmin(160) !important;
    height: vmin(160) !important;
  }
}

@mixin opening-card {
  padding: vmin(2) 0 0 0;

  .wx-avatar  {
    margin: auto;
    width: vmin(88);
    height: vmin(88);
    border-radius: 50%;
    display: block;
    margin-top: vmin(96);
  }

  .password-wx-avatar {
    margin-top: vmin(32) !important;
  }

  .wx-name {
    margin: auto;
    justify-content: center;
    width: vmin(415);
    line-height: vmin(40);
    display: flex;
    color: #fff;
    text-shadow: 0 vmin(6) vmin(12) #b93135;
    margin-top: vmin(16);
  
    .name {
      font-size: vmin(28);
      text-overflow: -o-ellipsis-lastline;
      overflow: hidden;
      text-overflow: ellipsis;
      display: -webkit-box;
      -webkit-line-clamp: 1;
      line-clamp: 1;
      -webkit-box-orient: vertical;
    }

    .text{
      flex-shrink: 0;
      padding-left: vmin(4);
      font-size: vmin(28);
    }

  }

  .describe {
    width: 100%;
    box-sizing: border-box;
    padding: 0 vmin(26);
    text-shadow: 0 vmin(4) vmin(8) #b93135;
    color: #fff;
    margin-top: vmin(32);
    text-align: center;

    font-family: "PingFang SC";
    font-size: vmin(40);
    font-style: normal;
    font-weight: 500;
    
    .text{
      word-break: break-all;
    }
  
  }
  
  .open-img {
    width: vmin(192);
    height: vmin(192);
    position: absolute;
    bottom: vmin(144);
    left: 0;
    right: 0;
    margin: auto;
  
    .img{
      width: 100%;
      height: 100%;
    }
    
  }

  .link-to {
    position: absolute;
    bottom: vmin(30);
    left: 0;
    right: 0;
    margin: auto;
    color: #fff;
    text-align: center;
  
    .text {
      font-size: vmin(26);
      display: inline-block;
      display: flex;
      align-items: center;
      justify-content: center;
    }
  }

  .show-top-style {
    bottom: vmin(106);
  }

  .receive-protocol {
    position: absolute;
    bottom: vmin(32);
    left: 0;
    right: 0;
    margin: auto;
    color: #fff;
    text-align: center;
    width: 100%;
    font-size: vmin(24);
    font-weight: 400;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0.9;
    .protocol-text {
      height: vmin(32);
      line-height: vmin(32);
    }
  }

}

@mixin horizontal {
  .wx-avatar  {
    margin: auto;
    width: vmin(64);
    height: vmin(64);
    border-radius: 50%;
    display: block;
    margin-top: vmin(80);
  }

  .wx-name {
    margin: auto;
    justify-content: center;
    width: vmin(415);
    line-height: vmin(28);
    display: flex;
    color: #fff;
    text-shadow: 0 vmin(6) vmin(12) #b93135;
    margin-top: vmin(16);
  
    .name {
      font-size: vmin(24);
      text-overflow: -o-ellipsis-lastline;
      overflow: hidden;
      text-overflow: ellipsis;
      display: -webkit-box;
      -webkit-line-clamp: 1;
      line-clamp: 1;
      -webkit-box-orient: vertical;
    }

    .text{
      flex-shrink: 0;
      padding-left: vmin(8);
      font-size: vmin(24);
    }

  }

  .describe {
    width: 100%;
    box-sizing: border-box;
    /* padding: 0 vmin(43); */
    text-shadow: 0 vmin(4) vmin(8) #b93135;
    color: #fff;
    margin-top: vmin(24);
    text-align: center;

    font-family: "PingFang SC";
    font-size: vmin(28);
    font-style: normal;
    font-weight: 500;
    line-height: vmin(40);
    min-height: vmin(40);
    
    .text{
      word-break: break-all;
    }
  
  }
  
  .password {
    width: vmin(364);
    min-height: vmin(64);
    padding: vmin(16) vmin(18);
    border-radius: vmin(32);
    border: vmin(2) solid #FF7D48;
    background: #FFF;
    margin: vmin(24) auto 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;

    color: #ff5052;
    text-align: center;
    font-family: "PingFang SC";
    font-size: vmin(22);
    font-style: normal;
    font-weight: 500;
    line-height: vmin(32);
  }
  
  .open-img {
    width: vmin(128);
    height: vmin(128);
    position: absolute;
    bottom: vmin(112);
    left: 0;
    right: 0;
    margin: auto;
  
    .img{
      width: 100%;
      height: 100%;
    }
    
  }

  .link-to {
    position: absolute;
    bottom: vmin(32);
    left: 0;
    right: 0;
    margin: auto;
    color: #fff;
    text-align: center;
  
    .text {
      font-size: vmin(20);
      line-height: vmin(24);
      display: inline-block;
      display: flex;
      align-items: center;
      justify-content: center;
      image {
        width: vmin(24);
        height: vmin(24);
      }
    }
  }

  .show-top-style {
    bottom: vmin(86);
  }

  .receive-protocol {
    position: absolute;
    bottom: vmin(18);
    left: 0;
    right: 0;
    margin: auto;
    color: #fff;
    text-align: center;
    width: 100%;
    font-size: vmin(18);
    font-weight: 400;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0.9;
    .protocol-text {
      height: vmin(32);
      line-height: vmin(32);
    }
  }
}

.password-open-card{
  @include password-open-card
}

.opening-card{
  @include opening-card
}

.horizontal{
  @include horizontal
}

// 竖屏pad
@media screen and (min-width: 768px) and (orientation: portrait) {
  $deviceWidth: 1536 !global;

  .password-open-card{
    @include password-open-card
  }

  .opening-card{
    @include opening-card
  }

  .horizontal{
    @include horizontal
  }

}


// PC 放大适配
@media screen and (min-height: 630px) and (orientation: landscape) {
  $deviceWidth: 1260 !global; 

  .password-open-card{
    @include password-open-card
  }

  .opening-card{
    @include opening-card
  }

  .horizontal{
    @include horizontal
  }

}

// 横屏pad
@media screen and (min-height: 768px) and (orientation: landscape) {
  $deviceWidth: 1536 !global;
  
  .password-open-card{
    @include password-open-card
  }

  .opening-card{
    @include opening-card
  }

  .horizontal{
    @include horizontal
  }

}