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

.expense-type-list {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    overflow: hidden;

    .opt-bar {
        flex: 0 0 auto;
        display: flex;
        flex-direction: row;
        align-items: center;
        margin: 5px 0 5px 16px;

        .select-all-btn {
            flex: 0 0 auto;
            display: inline-flex;
            flex-direction: row;
            align-items: center;
            color: @maycur-color;
            cursor: pointer;
        }

        .expand-all-btn {
            color: @maycur-color;
            cursor: pointer;
        }
    }

    .group-header {
        display: flex;
        flex-direction: row;
        align-items: center;

        .label {
            flex: 1 1 auto;
            color: @primary-font-color;
            font-weight: bold;
        }

        :global(.fm-check) {
            flex: 0 0 auto;
            width: 18px;
            height: 18px;
            line-height: 16px;
            text-align: center;
            background-color: #fff;
            border: 1px solid @border-color;
            color: #fff;
            border-radius: 100%;
            margin: 0 5px 0 11px;
            font-size: 12px;
            display: inline-block;

            &:global(.selected) {
                background-color: @maycur-color;
                border-color: @maycur-color;
            }

            &:global(.disabled) {
                background-color:#eee;
                border-color:#eee;
            }
        }
    }

    :global {
        .anticon-right.ant-collapse-arrow {
            right: 11px;
            left: inherit !important;
        }

        .fm-check {
            width: 18px;
            height: 18px;
            line-height: 18px;
            text-align: center;
            background-color: #fff;
            color: #fff;
            border-radius: 100%;
            margin-right: 5px;
            font-size: 12px;
            display: inline-block;

            &.selected {
                background-color: @maycur-color;
            }
        }

        .ant-list {
            border-top: 1px solid @border-color;

            .ant-list-item {
                padding: 5px 0 5px 16px;
                cursor: pointer;

                &.selected {
                    .fm-check {
                        background-color: @maycur-color;
                    }
                }

                &.notick {
                    .fm-check {
                        visibility: hidden;
                    }
                }

                .fm-check {
                    flex: 0 0 auto;
                    margin-top: 2px;
                }

                .fm-organization {
                    flex: 0 0 auto;
                    width: 22px;
                    height: 22px;
                    line-height: 22px;
                    font-size: 14px;
                    text-align: center;
                    color: @maycur-color;
                    border-radius: 3px;

                    &:hover {
                        background-color: @maycur-color;
                        color: #fff;
                    }
                }
            }
        }

        .ant-collapse {
            border: none;
            border-radius: 0;
            background-color: transparent;

            >.ant-collapse-item {
                border: none;
                border-radius: 0;

                >.ant-collapse-header {
                    color: @weak-text-color;
                    padding: 5px;
                    border-bottom: 1px solid @border-color;
                    background-color: #fdfdfd;

                    // .arrow {
                    //     left: 34px;
                    //     line-height: 33px;
                    //     color: @weak-text-color;
                    //     top: 0;
                    //     transform: rotate(-90deg);
                    // }

                    // &[aria-expanded="true"] {
                    //     .arrow {
                    //         transform: rotate(0deg);
                    //     }
                    // }
                }
            }

            .ant-collapse-content {
                border: none;
                background-color: transparent;

                >.ant-collapse-content-box {
                    padding: 0;
                }
            }
        }
    }

    .item-name {
        flex: 1 1 auto;
        color: @primary-font-color;
        margin-right: 5px;
        line-height: 20px;

        >span {
            vertical-align: middle;
        }

        :global(.fm) {
            color: @maycur-color;
            margin-right: 5px;
            font-size: 18px;
        }
    }

    :global(.ant-list-item.disabled) {
        cursor:not-allowed;
        background-color:#eee;
        .fm-check{
            background:#e1e1e1;
            &:before{
                content:"";
            }
        }
        .item-name{
            flex:inherit;
        }
        // .item-name {
        //     color: @gray-text-color;

        //     :global(.fm) {
        //         &:before {
        //             color: @gray-text-color;
        //         }
        //     }
        // }
    }
}