@import "../../../style/variables.less";

.@{prefix}-option-input-display-value {
    height: auto;
    padding: 4px 0;
    line-height: 18px;
    border-bottom: 1px solid @border-color;
    cursor: pointer;
    display: flex;
    justify-content: space-between;

    &:hover {
        border-bottom-color: @active-form-border-bottom-color;
        .ant-select-arrow {
            color: @active-form-border-bottom-color;
        }
        .ant-select-clear {
            opacity: 1;
        }
        .ant-select-arrow-hide {
            display: none;
        }
    }

    .placeholder {
        color: @form-input-placeholder;
    }

    .ant-select-arrow {
        transition: transform .3s;

        &.up {
            transform: rotate(180deg);
        }

        // &.down {
        //     // transform: rotate(-180deg);
        // }
    }

    .ant-select-clear {
        width: 16px;
        height: 16px;
        display: flex;
        justify-content: center;
        align-items: center;
        color: #fff;
        border-radius: 50%;
        font-size: 10px;
        background: @active-form-border-bottom-color;
        opacity: 0;
    }
}

.@{prefix}-option-input {
    @height: 27px;
    @color: #e6f7ff;
    position: relative;

    .crumbs {
        display: flex;
        align-items: center;
        padding: 8px 12px;
        line-height: 24px;
        border-bottom: 1px solid @border-color;

        .crumb-item {
            .crumb-name {
                cursor: pointer;
                color: @maycur-color;
            }

            .split {
                margin: 0 4px;
                color: #888;
            }

            &:last-child {
                .crumb-name {
                    color: #333;
                }
            }
        }
    }

    .dropdown {
        display: none;
        position: absolute;
        top: @height;
        width: 100%;
        min-width: 250px;
        max-height: 300px;
        min-height: 200px;
        // overflow: auto;
        z-index: 1;
        box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
        background-color: #fff;
        margin-top: 4px;
        border-radius: 4px;
        z-index: 99;

        .city-picker-display-value-clone {
            height: auto;
            padding: 4px 0;
            line-height: 18px;
            border-bottom: 1px solid @border-color;
            margin: 2px 7px;
        }

        &.in {
            display: flex;
            flex-direction: column;
        }

        .search {
            display: flex;
            flex-shrink: 0;
            border-bottom: 1px solid @border-color;
            padding: 5px 12px;
            background-color: #fff;

            input {
                background-color: #f7f7f7;
                padding: 5px !important;
                border: none;
            }
        }

        .ant-list {
            overflow: auto;

            .ant-list-item {
                padding: 8px 12px;
                border-bottom: none;
                cursor: pointer;

                &:hover {
                    background-color: @color;
                }

                .item-name {
                    .fm-paper {
                        margin-right: 5px;
                        color: @maycur-color;
                    }
                }
            }
        }

        .panel {
            position: relative;
            display: flex;
            flex-grow: 1;
            flex-direction: column;
            overflow: auto;
        }

        .empty-text {
            display: flex;
            align-items: center;
            justify-content: center;
            flex-grow: 1;
            color: #888;
        }

        .item {
            padding: 5px 12px;
            line-height: 22px;
            cursor: pointer;

            &:hover {
                background-color: @color;
            }

            .fm {
                color: @maycur-color;
                margin-right: 5px;
            }

            &-code {
                padding-left: 19px;
                line-height: 1;
                font-size: @secondary-font-size;
                color: @secondary-text-color;
            }
        }
    }
}

.has-error {
    .@{prefix}-option-input {
        .display-value {
            border-bottom-color: @icon-fee-red;
        }
    }
}

.@{prefix}-option-input-table-cell {
    padding: 6px 5px;
    border: 1px solid @border-color;
}
