@use "bzhy_frontend.scss" as frontend;
$help_tip_icon_background_color: #1E2021;
$help_tip_icon_diameter: 20px;
$help_tip_icon_font-size: 14px;
$help_tip_icon_line-height: 22px;
$help_tip_icon_left: 10px;
$heavier_font: 600;

@mixin bzhy-admin-commom-circle-inline-text-icon($background,$diameter,$font-size,$line-height,$left) {
    position: relative;
    text-align: center;
    background-color: $background;
    border-radius: 50%;
    width: $diameter;
    height: $diameter;
    display: inline-block;
    font-size: $font-size;
    line-height: 22px;
    left: $left;
    cursor: default;

}

@mixin bzhy-admin-commom-circle-inline-text-icon-before($color) {
    font-weight: bold;
    color: $color;
}

.bzhy-admin-common-help-tip{
    @include bzhy-admin-commom-circle-inline-text-icon($help_tip_icon_background_color,$help_tip_icon_diameter,$help_tip_icon_font-size,$help_tip_icon_line-height,$help_tip_icon_left);    
}

.bzhy-admin-common-help-tip:before{
    @include bzhy-admin-commom-circle-inline-text-icon-before(#fff);
    content:'?';
}

.bzhy-admin-common-help-tip:hover {
    cursor: pointer;
}

.bzhy-admin-common-help-tip:hover p{
    display:block;
    transform-origin: 100% 0%;
    -webkit-animation: fadeIn 0.3s ease-in-out;
    animation: fadeIn 0.3s ease-in-out;
}

.bzhy-admin-common-help-tip p{
    display: none;
    position: absolute;	
    right: -150px;
    /*在元素的左边还是右边*/
    /*left:-4px;*/
    
    padding: 10px;
    width:150px;
    max-width: 300px; 
    border-radius: 3px;
    box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2);
    background-color: #1E2021;
    text-align: left;
    color: #FFF;
    font-size: 13px;
    line-height: 1.4;
    z-index: 999;
}

/*小三角的实现*/
.bzhy-admin-common-help-tip p:before{
    position: absolute;
    content: '';
    width:0;
    height: 0;
    border:6px solid transparent;
    border-bottom-color:#1E2021;
    right: 150px;
    top:-12px;
}

.bzhy-admin-common-help-tip p:after{
    width:100%;
    height:40px;
    content:'';
    position: absolute;
    top:-40px;
    left:0;
}

@-webkit-keyframes fadeIn {
    0% { 
        opacity:0; 
        transform: scale(0.6);
    }

    100% {
        opacity:100%;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    0% { opacity:0; }
    100% { opacity:100%; }
}

@mixin bzhy-admin-commom-bigger-weighter-font($scale){
    font-size: $scale;
    font-weight: $heavier_font;
}

/*
* @block: slider button name
* @float: position, one of none or right
* @checkedBgColor: The background color when input is checked
* $translateX: The distance of slider sliding  
*/
@mixin admin-slider-button-container($block,$float,$checkedBgColor,$translateX){
    $Container: 'bzhy-admin-slider-button-' + $block + '-container';
    $Slider: 'bzhy-admin-slider-button-' + $block;
    .#{$Container}{
        display: inline-flex;
        float: $float;
    }

    .#{$Container} input {
        display: none !important;
    }

    /* 当checkbox被选中时，改变滑块的样式 */
    .#{$Container} input:checked + .#{$Slider} {
        background-color: $checkedBgColor;
    }
  
    .#{$Container} input:checked + .#{$Slider}::before {
        transform: translateX($translateX);
    }
  
}

@mixin admin-slider-button($block,$width,$height,$bgcolor,$radius,$cursor,$float){
    $Slider: 'bzhy-admin-slider-button-' + $block;
    .#{$Slider}{
        position: relative;
        display: inline-block;
        width: $width;
        height: $height;
        background-color: $bgcolor;
        border-radius: $radius;
        transition: .4s;
        cursor: $cursor;
        float: $float;
    }
}

@mixin admin-slider-button-before($block,$width,$heiht,$left,$bottom,$bgcolor){
    $Slider: 'bzhy-admin-slider-button-' + $block;
    .#{$Slider}::before{
        content: "";
        position: absolute;
        width: $width;
        height: $heiht;
        left: $left;
        bottom: $bottom;
        background-color: $bgcolor;
        border-radius: 50%;
        transition: .4s;
    }
}


@mixin banner-nav-block($left,$bgcolor,$lineheight,$fontsize,$color){
    display: flex;
    margin-left: $left;
    background-color: $bgcolor;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -ms-flex-flow: row wrap;
    flex-flow: row wrap;
    line-height: $lineheight;
    font-size: $fontsize;
    color: $color;
}

@mixin banner-nav-item($marginleft,$color,$font-weight){
    @if($marginleft){
        margin-left: $marginleft;
    }
    
    @if($color){
        color: $color;
    }
    
    @if($font-weight){
        font-weight: $font-weight;
    }
    
}


@mixin pop_page($width,$height,$bgcolor,$left,$top, $radius,$border-color){
    position: absolute;
    display: none;
    z-index: 9999;
    width: $width;
    height: $height;
    overflow: auto;
    background-color: $bgcolor;
    @if($radius){
        border-radius: $radius;
    }
    transition: .4s;
    @if($left){
        left: $left;
    }
    @if($top){
        top: $top;
    }
    @if($border-color){
        border-width: 1px;
        border-style: solid;
        border-color: $border-color;
    }
}    

.bzhy_admin_full_flex{
    @include frontend.bzhy_flex_container("",100%,"","","");
}

.bzhy-admin-form-title{
    line-height: 30px;
}

.bzhy-admin-form-title label {
    font-size: 20px;
    font-weight: 400;
}

.bzhy_admin_tablenav{
    display: flex;
    clear: both;
    height: 30px;
    /* margin: 6px 0 4px; */
    padding-top: 5px;
    vertical-align: middle;
    justify-content: space-between;
}