.ty-time-picker {
    position: relative;
    box-sizing: border-box;
    white-space: nowrap;
    font-size: 14px;
    display: inline-block;

    & * {
        box-sizing: border-box;
    }

    &-center {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    //ant下拉框样式覆盖
    .ant-select {
        width: 100%;

        .ant-select-arrow {
            transition: all 0.3s;
            transform: rotate(0deg);
        }

        &.ant-select-open .ant-select-arrow {
            transform: rotate(180deg);
        }

        .ant-select-dropdown {
            padding: 0;

            .ant-select-item {
                display: flex;
                align-content: center;
                flex-wrap: wrap;
                padding-left: 16px;
                padding-right: 8px;
            }

            .ant-select-item-option-selected {
                background-color: rgb(174 174 174 / 15%);
                color: var(--ty-color-text-heading, rgb(0 0 0 / 85%));
            }
        }
    }

    &-wrap {

        //ant按钮样式覆盖
        .ant-btn {
            &.ant-btn-default {
                color: var(--ty-color-text-label, rgb(0 0 0 / 65%));
                background: var(--ty-color-bg-layout, #f0f1f5);
                border-color: var(--ty-time-bg-border, #f0f1f5);
            }

            &.ant-btn-default:not(:disabled):not(.ant-btn-disabled):hover {
                background: var(--ty-time-bg-hover, #e3efff);
                border-color: #e3efff;
            }

            &.ant-btn-default:not(:disabled):not(.ant-btn-disabled):active,
            &.ant-btn-default:not(:disabled):not(.ant-btn-disabled):focus {
                background: var(--ty-time-bg-hover, #e3efff);
                border-color: #e3efff;
                color: #1677ff;
            }

            &.ant-btn:not(:disabled):focus-visible {
                outline: 4px solid #e3efff;
            }
        }

        //ant下拉框样式覆盖
        .ant-select {
            width: 100%;

            .ant-select-item {
                display: flex;
                align-content: center;
                flex-wrap: wrap;
            }

            &:not(.ant-select-customize-input) .ant-select-selector {
                color: var(--ty-color-text-label, rgb(0 0 0 / 65%));
                background: var(--ty-color-bg-layout, #f0f1f5);
                border-color: var(--ty-time-bg-border, #f0f1f5);
            }

            &:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer):hover .ant-select-selector {
                background: var(--ty-time-bg-hover, #e3efff);
                border-color: #e3efff;
            }

            &.ant-select-focused.ant-select:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer) .ant-select-selector {
                background: var(--ty-time-bg-hover, #e3efff);
                border-color: #e3efff;
                color: #1677ff;
                box-shadow: none;
            }

            &.ant-select-single.ant-select-open .ant-select-selection-item,
            &.ant-select-open .ant-select-selector {
                background: var(--ty-time-bg-hover, #e3efff);
                border-color: #e3efff;
                color: #1677ff;
            }

            &.ant-select-open .ant-select-arrow {
                color: #1677ff;
            }
        }

        &.ant-space {
            .ant-space-item {
                margin-right: 4px;

                &:last-child {
                    margin-right: 0;
                }
            }
        }

        .ty-time-picker-mian {
            color: var(--ty-color-text-label, rgb(0 0 0 / 65%));

            &-flag {
                margin: 0 6px;
                font-weight: bold;
            }
        }
    }

    /* 遮罩 */
    &-dialog-mask {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 498;
        pointer-events: auto;
        background-color: transparent;
    }

    &-dialog {
        --time-dialog-box-shadow: 0 6px 16px 0 rgba(0 0 0 / 8%), 0 3px 6px -4px rgba(0 0 0 / 12%), 0 9px 28px 8px rgba(0 0 0 / 5%);

        position: absolute;
        top: calc(100% + 4px);
        right: 0;
        background-color: var(--ty-color-bg-container, #fff);
        border-radius: 6px;
        z-index: 499;
        box-shadow: var(--ty-box-shadow, var(--time-dialog-box-shadow));
        display: flex;

        .ty-time-label {
            margin-top: 16px;
            margin-bottom: 4px;
            color: var(--ty-color-text-heading, rgb(0 0 0 / 85%));
            font-size: 12px;
            line-height: 20px;
            word-wrap: break-word;
        }

        .ty-time-exact {
            position: relative;
            width: 200px;
            padding: 0 16px 16px;
            border-right: 1px solid rgb(174 174 174 / 25%);

            &-title {
                font-family: inherit;
                font-weight: bold;
                color: var(--ty-color-text-heading, rgb(0 0 0 / 85%));
                line-height: 22px;
                padding: 12px 0;
            }

            &-btn {
                position: absolute;
                bottom: 16px;
                right: 24px;
            }
        }

        .ty-time-scope {
            flex: 1;

            &-title {
                position: relative;
                border-bottom: 1px solid rgb(174 174 174 / 25%);
                padding: 12px 16px;
                font-family: inherit;
                font-weight: bold;
                color: var(--ty-color-text-heading, rgb(0 0 0 / 85%));
                line-height: 22px;

                // &::after {
                //     content: 'or';
                //     position: absolute;
                //     width: 18px;
                //     height: 18px;
                //     background: #c8c9cc;
                //     border-radius: 50%;
                //     text-align: center;
                //     line-height: 18px;
                //     font-size: 12px;
                //     color: #f1f1f2;
                //     left: -9px;
                // }
            }

            &-wrap {
                padding: 0 8px;
            }

            &-content {
                list-style-type: none;
                margin: 0;
                padding: 0;
                flex: 1;
                margin-right: 2px;

                & li {
                    width: 100%;
                    min-width: 100px;
                    height: 32px;
                    line-height: 32px;
                    border-radius: 6px;
                    padding: 0 8px;
                    cursor: pointer;
                    color: var(--ty-color-text-label, rgb(0 0 0 / 65%));
                    // border:1px solid;
                }

                & li.active,
                & li:hover {
                    background-color: rgb(174 174 174 / 10%);
                }
            }


            .ty-time-previous-wrap {
                padding: 0 8px 8px;

                .ty-time-previous-title {
                    padding: 0 8px;
                    font-family: inherit;
                    font-weight: bold;
                    color: var(--ty-color-text-heading, rgb(0 0 0 / 85%));
                    line-height: 22px;
                }

                .ty-time-previous-content {
                    list-style-type: none;
                    margin: 0;
                    padding: 0;
                    display: flex;
                    font-size: 14px;
                    flex-wrap: wrap;

                    & li {
                        width: 24%;
                        min-width: 100px;
                        margin-right: 2px;
                        height: 32px;
                        line-height: 32px;
                        border-radius: 6px;
                        padding: 0 8px;
                        cursor: pointer;
                        font-family: inherit;
                        color: var(--ty-color-text-label, rgb(0 0 0 / 65%));
                        // border:1px solid;
                    }

                    & li.active,
                    & li:hover {
                        background-color: rgb(174 174 174 / 10%);
                    }
                }
            }

            &>*:last-child {
                padding: 0 8px 8px !important;
            }
        }
    }
}