@import "../var.scss";

.Ebar {
    display: flex;
    //position: relative;
    align-items: center;
    min-height: 45Px;
    justify-content: space-between;

    .action {
        display: flex;
        align-items: center;
        height: 100%;
        justify-content: center;
        max-width: 100%;

        &.border-title {
            position: relative;
            top: -5Px;

            span,
            text {
                &[class*="bg-"] {
                    &:last-child {
                        position: absolute;
                        bottom: -0.5rem;
                        min-width: 2rem;
                        height: 3Px;
                        left: 0;
                    }
                }
            }
        }

        &.sub-title {
            position: relative;

            //  top: -0.2rem;
            span,
            text {
                position: relative;
                z-index: 1;

                &[class*="bg-"] {
                    &:last-child {
                        position: absolute;
                        display: inline-block;
                        bottom: -0.2rem;
                        border-radius: 3Px;
                        width: 100%;
                        height: 0.6rem;
                        left: 0.6rem;
                        opacity: 0.3;
                        z-index: 0;
                    }
                }

                &[class*="text-"] {
                    &:last-child {
                        position: absolute;
                        display: inline-block;
                        bottom: -0.7rem;
                        left: 0.5rem;
                        opacity: 0.2;
                        z-index: 0;
                        text-align: right;
                        font-weight: 900;
                        font-size: 18Px;
                    }
                }
            }
        }

        &:first-child {
            margin-left: 10Px;
            font-size: 15Px;

            > {

                span,
                text {
                    &[class*="EIcon-"] {
                        margin-left: -0.3em;
                        margin-right: 0.3em;
                    }
                }
            }
        }

        &:last-child {
            margin-right: 10Px;
        }

        &.justify-between {
            width: 100%;
            justify-content: space-between;
        }

        span,
        text {
            &.text-cut {
                text-align: left;
                width: 100%;
            }
        }

        > {

            text[class*="EIcon-"],
            span[class*="EIcon-"],
            view[class*="EIcon-"],
            div[class*="EIcon-"] {
                font-size: 18Px;
            }

            text[class*="EIcon-"]+text[class*="EIcon-"] {
                margin-left: 0.5em;
            }

            span[class*="EIcon-"]+span[class*="EIcon-"] {
                margin-left: 0.5em;
            }
        }
    }

    .justify-center {

        .action.border-title span:last-child,
        .action.border-title text:last-child,
        .action.sub-title span:last-child,
        .action.sub-title text:last-child {
            left: 0;
            right: 0;
            margin: auto;
            text-align: center;
        }
    }

    .Eavatar {
        &:first-child {
            margin-left: 10Px;
        }
    }

    .content {
        position: absolute;
        text-align: center;
        width: calc(100% - 170Px);
        left: 0;
        right: 0;
        bottom: 0;
        top: 0;
        margin: auto;
        height: 30Px;
        font-size: 16Px;
        line-height: 30Px;
        cursor: none;
        pointer-events: none;
        text-overflow: ellipsis;
        white-space: nowrap;
        overflow: hidden;
    }

    &.ios {
        .content {
            bottom: 3.5Px;
            height: 15PX;
            font-size: 16Px;
            line-height: 15Px;
        }
    }

    &.btn-group {
        justify-content: space-around;

        button {
            padding: 10Px 16Px;
            flex: 1;
            margin: 0 20px;
            max-width: 50%;
        }
    }

    .search-form {
        background-color: #f5f5f5;
        line-height: 32Px;
        height: 32Px;
        font-size: 12Px;
        color: #666;
        flex: 1;
        display: flex;
        align-items: center;
        margin: 0 10Px;

        +.action {
            margin-right: 10Px;
        }

        input {
            flex: 1;
            padding-right: 10Px;
            height: 32PX;
            line-height: 32Px;
            font-size: 13Px;
        }

        [class*="EIcon-"] {
            margin: 0 0.5em 0 0.8em;

            &::before {
                top: 0;
            }
        }
    }

    &.foot {
        position: fixed;
        width: 100%;
        bottom: 0;
        z-index: 1024;
        box-shadow: 0 -1Px 3Px rgba(0, 0, 0, 0.1);
    }

    &.tabbar {
        height: calc(100px + env(safe-area-inset-bottom) / 2);

        //height: calc(100px + env(safe-area-inset-bottom) / 2);
        //padding-bottom: calc(env(safe-area-inset-bottom) / 2);
        &.shadow {
            box-shadow: 0 -1px 6px rgba(0, 0, 0, 0.1);
        }

        .action {
            font-size: 22px;
            position: relative;
            flex: 1;
            text-align: center;
            padding: 0;
            display: block;
            height: auto;
            line-height: 1;
            margin: 0;
            background-color: inherit;
            overflow: initial;

            &.add-action {
                position: relative;
                z-index: 2;
                padding-top: 50px;

                [class*="EIcon-"] {
                    position: absolute;
                    width: 70px;
                    z-index: 2;
                    height: 70px;
                    border-radius: 50%;
                    line-height: 70px;
                    font-size: 50px;
                    top: -35px;
                    left: 0;
                    right: 0;
                    margin: auto;
                    padding: 0;
                }

                &::after {
                    content: "";
                    position: absolute;
                    width: 100px;
                    height: 100px;
                    top: -50px;
                    left: 0;
                    right: 0;
                    margin: auto;
                    box-shadow: 0 -3px 8px rgba(0, 0, 0, 0.08);
                    border-radius: 50px;
                    background-color: inherit;
                    z-index: 0;
                }

                &::before {
                    content: "";
                    position: absolute;
                    width: 100px;
                    height: 30px;
                    bottom: 30px;
                    left: 0;
                    right: 0;
                    margin: auto;
                    background-color: inherit;
                    z-index: 1;
                }
            }

            .EIcon-cu-image {
                margin: 0 auto;

                .taro-img,
                image {
                    width: 50px;
                    height: 50px;
                    display: inline-block;
                }
            }

            [class*="EIcon-"] {
                width: 100px;
                position: relative;
                display: block;
                height: auto;
                margin: 0 auto 10px;
                text-align: center;
                font-size: 40px;
            }
        }

        &.shop {
            .action {
                width: 140px;
                flex: initial;
            }
        }

        .btn-group {
            flex: 1;
            display: flex;
            justify-content: space-around;
            align-items: center;
            padding: 0 10px;
        }

        button {
            &.action {
                &::after {
                    border: 0;
                }
            }
        }

        .submit {
            align-items: center;
            display: flex;
            justify-content: center;
            text-align: center;
            position: relative;
            flex: 2;
            align-self: stretch;

            &:last-child {
                flex: 2.6;
            }

            +.submit {
                flex: 2;
            }
        }

        &.border {
            .action {
                &::before {
                    content: " ";
                    width: 200%;
                    height: 200%;
                    position: absolute;
                    top: 0;
                    left: 0;
                    transform: scale(0.5);
                    transform-origin: 0 0;
                    border-right: 2px solid rgba(0, 0, 0, 0.1);
                    z-index: 3;
                }

                //&:last-child {
                //  &:before {
                //    display: none;
                //  }
                //}
            }
        }
    }

    &.input {
        padding-right: 20px;
        background-color: $white;

        input {
            overflow: initial;
            line-height: 64px;
            height: 64px;
            min-height: 64px;
            flex: 1;
            font-size: 30px;
            margin: 0 20px;

            +.action {
                margin-right: 20px;
                margin-left: 0;
            }
        }

        .action {
            margin-left: 20px;

            [class*="cuIcon-"] {
                font-size: 48px;
            }

            &:first-child {
                [class*="cuIcon-"] {
                    margin-left: 0;
                }
            }
        }
    }
}

.Ebar.fixed,
.nav.fixed {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1024;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
}

.Etabbar-height {
    min-height: 100px;
    height: calc(100px + env(safe-area-inset-bottom) / 2);
}

.Ecustom {
    display: block;
    position: relative;

    .cu-bar {
        min-height: 0;
        padding-right: 200px;
        box-shadow: 0 0 0;
        z-index: 9999;

        .content {
            width: calc(100% - 440px);

            image {
                height: 60px;
                width: 240px;
            }
        }

        .border-custom {
            position: relative;
            background: rgba(0, 0, 0, 0.15);
            border-radius: 1000px;
            height: 30px;

            &::after {
                content: " ";
                width: 200%;
                height: 200%;
                position: absolute;
                top: 0;
                left: 0;
                border-radius: inherit;
                transform: scale(0.5);
                transform-origin: 0 0;
                pointer-events: none;
                box-sizing: border-box;
                border: 2px solid $white;
                opacity: 0.5;
            }

            &::before {
                content: " ";
                width: 1px;
                height: 110%;
                position: absolute;
                top: 22.5%;
                left: 0;
                right: 0;
                margin: auto;
                transform: scale(0.5);
                transform-origin: 0 0;
                pointer-events: none;
                box-sizing: border-box;
                opacity: 0.6;
                background-color: $white;
            }

            span,
            text {
                display: block;
                flex: 1;
                margin: auto !important;
                text-align: center;
                font-size: 34px;
            }
        }
    }
}

.Eload {
    display: block;
    line-height: 3em;

    &::before {
        font-family: "EIcon";
        display: inline-block;
        margin-right: 6px;
    }

    .label {
        margin-top: 0.5rem;
        height: 50px;
        line-height: 50px;
    }

    &.load-icon {
        &::before {
            font-size: 32px;
        }

        &::after {
            display: none;
        }

        &.over {
            display: none;
        }
    }

    &.load-modal {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 140px;
        left: 0;
        margin: auto;
        width: 260px;
        height: 260px;
        border-radius: 10px;
        box-shadow: 0 0 0 2000px rgba(0, 0, 0, 0.2);
        display: flex;
        align-items: center;
        flex-direction: column;
        justify-content: center;
        font-size: 28px;
        z-index: 9999;
        line-height: 2.4em;

        [class*="EIcon-"] {
            font-size: 60px;
        }

        div[class*="taro-img"],
        image,
        img {
            width: 70px;
            height: 70px;
        }

        &::after {
            content: "";
            position: absolute;
            border-radius: 50%;
            width: 200px;
            height: 200px;
            font-size: 10px;
            border-top: 6px solid rgba(0, 0, 0, 0.05);
            border-right: 6px solid rgba(0, 0, 0, 0.05);
            border-bottom: 6px solid rgba(0, 0, 0, 0.05);
            border-left: 6px solid $orange;
            animation: EIcon-spin 1s infinite linear;
            z-index: -1;
        }
    }

    &.load-image {
        display: flex;
        z-index: 9999;
        justify-content: center;
        align-items: center;
        position: fixed;
        width: 100vw;
        height: 100vh;
        top: 0;
        right: 0;
        background-color: rgba(0, 0, 0, 0.5);

        image {
            width: 30%;
        }
    }
}

.load-progress {
    pointer-events: none;
    top: 0;
    position: fixed;
    width: 100%;
    left: 0;
    z-index: 2000;

    &.hide {
        display: none;
    }

    .load-progress-bar {
        position: relative;
        width: 100%;
        height: 4px;
        overflow: hidden;
        transition: all 200ms ease 0s;
    }

    .load-progress-spinner {
        position: absolute;
        top: 10px;
        right: 10px;
        z-index: 2000;
        display: block;

        &::after {
            content: "";
            display: block;
            width: 24px;
            height: 24px;
            -webkit-box-sizing: border-box;
            box-sizing: border-box;
            border: solid 4px transparent;
            border-top-color: inherit;
            border-left-color: inherit;
            border-radius: 50%;
            -webkit-animation: load-progress-spinner 0.4s linear infinite;
            animation: load-progress-spinner 0.4s linear infinite;
        }
    }
}



.miao-bar {
    &--icon {
        overflow: hidden;

        &.fiexd {
            &-top {
                position: relative;
                top: -30Px;
            }

            &-bottom {
                position: relative;
                bottom: -30Px;
            }

            &-left {
                position: relative;
                left: -30Px;
            }

            &-right {
                position: relative;
                right: -30Px;
            }
        }
    }

}


@-webkit-keyframes load-progress-spinner {
    0% {
        -webkit-transform: rotate(0);
        transform: rotate(0);
    }

    100% {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

@keyframes load-progress-spinner {
    0% {
        -webkit-transform: rotate(0);
        transform: rotate(0);
    }

    100% {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}