@import "mixins/mixins";
@import "common/var";

@include b(complex-time-popover) {
    position: relative;
    width: 320px;
    min-width: 320px;

    &__popover {
        padding: 0;
    }

    &__tabs {
        position: relative;
        cursor: pointer;

        .el-complex-time-popover__tags {
            position: absolute;
            top: 50%;
            left: 12px;
            transform: translateY(-50%);

            &.is-disabled {
                color: $--color-info;
            }

            span {
                display: inline-block;
                line-height: 16px;
                background: #F0F3FC;
                padding: 4px 8px;
                border-radius: 4px;
                font-size: 12px;
                color: #3F4249;
            }

            &-icon {
                margin-left: 4px;
            }
        }

        &.is-error {
            .el-input {

                .el-input__inner,
                .el-input__inner:focus {
                    border-color: $--color-danger;
                    box-shadow: none;
                }
            }
        }
    }

    &__content {
        &--top {
            padding: 12px 16px 12px;
            border-bottom: 1px solid $--border-color-light;
            font-size: 12px;
            line-height: 18px;
        }

        &--bottom {
            max-height: 330px;
            overflow: auto;

            .complex-btns-class {
                display: flex;
                flex-wrap: wrap;
                justify-content: space-between;
                width: calc(100% - 32px);
                margin: 12px 16px 0;

                .complex-btns-span {
                    display: inline-block;
                    width: 64px;
                    height: 28px;
                    line-height: 28px;
                    margin-bottom: 12px;
                    background: #F5F7FE;
                    border-radius: 4px;
                    text-align: center;
                    color: $--color-gray;
                    cursor: pointer;

                    &:nth-last-child(2),
                    &:last-child {
                        width: 48%;
                        background: #F5F7FE;

                        i {
                            font-size: 12px;
                            color: $--color-text-secondary;
                            margin-left: 3px;
                        }
                    }

                    &:hover {
                        background-color: rgba(83, 114, 236, 0.15);
                    }

                    &.is-selected {
                        background: $--color-primary;
                        color: $--color-white;

                        i {
                            color: $--color-white;
                        }
                    }

                    &.is-disabled {
                        cursor: not-allowed;
                        pointer-events: none;

                        &,
                        &:hover,
                        &:focus {
                            color: $--button-disabled-font-color;
                            cursor: not-allowed;
                            background-image: none;
                            background-color: $--button-disabled-background-color;
                            border-color: $--button-disabled-border-color;

                            i {
                                color: $--button-disabled-font-color;
                            }
                        }
                    }
                }
            }

            .complex-btns-content {
                margin: 4px 16px 16px;

                &-fixed {
                    &__form-dynamic {
                        .el-form-item {
                            margin-bottom: 12px;

                            &__content {
                                display: flex;
                                align-items: center;

                                .el-date-editor--daterange {
                                    width: 100%;
                                }

                                &>i {
                                    margin-left: 13px;
                                    font-size: 16px;
                                    color: $--color-text-secondary;
                                    cursor: pointer;

                                    &:hover {
                                        color: $--color-primary;
                                    }
                                }

                                .el-button--dashed {
                                    width: 100%;
                                    padding: 8px 16px;
                                }
                            }
                        }
                    }
                }

                &-dynamic {
                    .el-radio-group {
                        width: 100%;
                        margin-bottom: 12px;

                        .el-radio-button {
                            width: 50%;

                            .el-radio-button__inner {
                                width: 100%;
                                padding-top: 6px;
                                padding-bottom: 6px;
                            }
                        }
                    }

                    .el-form {
                        &>div {
                            display: flex;
                            align-items: center;
                            justify-content: space-between;
                        }

                        .el-form-item {
                            margin-bottom: 0;

                            &__content {
                                .el-date-editor--daterange {
                                    width: 100%;
                                }

                                .el-input-number {
                                    width: 186px;
                                }

                                .el-select {
                                    width: 94px;
                                }
                            }
                        }
                    }
                }
            }
        }
    }

    &__error-tip {
        position: absolute;
        top: 100%;
        left: 0;
        line-height: 1;
        padding-top: 4px;
        color: $--color-danger;
        font-size: 12px;
    }
}