$deviceWidth: 750;

@function vmin($rpx) {
    @return #{$rpx * 100 / $deviceWidth}vmin;
}

@mixin list-swiper-box {
    overflow: visible !important;
    height: vmin(448);
    // padding-top: vmin(38);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    position: relative;

    .swiper-box {
        overflow: visible !important;
        width: 100%;
        height: vmin(448);
        
        display: flex !important;
        justify-content: center !important;
        align-items: flex-start !important;

        .swiper-item {
            display: flex;
            justify-content: center;
            align-items: center;
            overflow: visible !important;

            .swiper-item-not-active {
                transition: all 0.2s linear;
                transform: scale(0.9) !important;
            }

            .swiper-slide {
                width: vmin(384) !important;
                height: vmin(344) !important;
                transition: all 0.2s linear;
                padding: vmin(8);
                background: rgba(255, 255, 255, 1);
                border-radius: vmin(16);
                box-shadow: 0 vmin(12) vmin(16) 0 rgba(255, 194, 147, 1);
                display: flex;
                flex-direction: column;
                justify-content: center;
                align-items: center;
                box-sizing: border-box;
                .reward-pic-box {
                    width: vmin(368);
                    height: vmin(276);
                    display: flex;
                    justify-content: center;
                    align-items: center;
                    border-radius: vmin(8);
                    .reward-pic {
                        object-fit: contain;
                        opacity: 1;
                        width: 100%;
                        height: 100%;
                    }
                }

                .title-box {
                    max-width: vmin(368);
                    .reward-title {
                        overflow: hidden;
                        text-overflow: ellipsis;
                        white-space: nowrap;
                        height: 22px;
                        opacity: 1;
                        color: rgba(128, 63, 63, 1);
                        font-size: vmin(28);
                        font-weight: 700;
                        font-family: "PingFang SC";
                        text-align: center;
                        line-height: 22px;
                        margin-top: vmin(8);
                    }
                }
            }
        }

    }

    .dots-box {
        min-width: vmin(56);
        display: flex;
        justify-content: center;
        align-items: center;
        transition: all 0.2s linear;
        position: absolute;
        bottom: vmin(20);
        left: 50%;
        transform: translateX(-50%);

        .dots-item {
            width: vmin(16);
            height: vmin(8);
            border-radius: vmin(6);
            opacity: 0.4;
            background: rgba(255, 142, 57, 1);
            margin: 0 vmin(3);
            transition: all 0.2s linear;
        }

        .dot-active {
            width: vmin(24);
            height: vmin(8);
            border-radius: vmin(6);
            opacity: 1;
            background: rgba(255, 142, 57, 1);
            margin: 0 vmin(4);
            transition: all 0.2s linear;
        }
    }
}

// 邀请卡片的
@mixin invite-list-swiper-box {
    overflow: visible !important;
    height: vmin(308);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;

    .swiper-box {
        overflow: visible !important;
        width: 100%;
        height: vmin(288);
        margin-bottom: vmin(24);

        .swiper-item {
            display: flex;
            justify-content: center;
            align-items: flex-start;
            overflow: visible !important;

            .swiper-item-not-active {
                transition: all 0.2s linear;
                transform: scale(0.9) !important;
            }

            .swiper-slide {
                width: vmin(303) !important;
                height: vmin(268) !important;
                transition: all 0.2s linear;
                padding: vmin(8);
                background: rgba(255, 255, 255, 1);
                border-radius: vmin(16);
                box-shadow: 0 vmin(12) vmin(16) 0 rgba(255, 194, 147, 1);
                display: flex;
                flex-direction: column;
                justify-content: center;
                align-items: center;
                box-sizing: border-box;
                
                .reward-pic-box {
                    width: vmin(285);
                    height: vmin(210);
                    border-radius: vmin(8);
                    display: flex;
                    justify-content: center;
                    align-items: center;
                    .reward-pic {
                        object-fit: contain;
                        opacity: 1;
                        width: 100%;
                        height: 100%;
                        border-radius: vmin(8);
                    }
                }

                .title-box {
                    max-width: vmin(280);
                    .reward-title {
                        overflow: hidden;
                        text-overflow: ellipsis;
                        white-space: nowrap;
                        height: 22px;
                        opacity: 1;
                        color: rgba(128, 63, 63, 1);
                        font-size: vmin(28);
                        font-weight: 700;
                        font-family: "PingFang SC";
                        text-align: center;
                        line-height: 22px;
                    }
                }
            }
        }

    }

    .dots-box {
        min-width: vmin(56);
        display: flex;
        justify-content: center;
        align-items: center;
        transition: all 0.1s linear;

        .dots-item {
            width: vmin(16);
            height: vmin(8);
            border-radius: vmin(6);
            opacity: 0.4;
            background: rgba(255, 142, 57, 1);
            margin: 0 vmin(3);
            transition: all 0.2s linear;
        }

        .dot-active {
            width: vmin(24);
            height: vmin(8);
            border-radius: vmin(6);
            opacity: 1;
            background: rgba(255, 142, 57, 1);
            margin: 0 vmin(4);
            transition: all 0.2s linear;
        }
    }
}

.list-swiper-box {
    @include list-swiper-box;
}

.invite-list-swiper-box {
    @include invite-list-swiper-box;
}

// 竖屏pad
@media screen and (min-width: 768px) and (orientation: portrait) {
    $deviceWidth: 1536 !global;
  
    .list-swiper-box {
        @include list-swiper-box;
    }

    .invite-list-swiper-box {
        @include invite-list-swiper-box;
    }
}
// 横屏pad
@media screen and (min-height: 768px) and (orientation: landscape) {
    $deviceWidth: 1536 !global;
   
    .list-swiper-box {
        @include list-swiper-box;
    }

    .invite-list-swiper-box {
        @include invite-list-swiper-box;
    }
}