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

.moneyFieldSpace() {
    @prefix-cls: ~"@{prefix}-money-wrapper";
    @prefix-exc: ~"@{prefix}-exchange-wrapper";

    .@{prefix-cls} {
        display: flex;
        position: relative;
        align-items: center;

        &.in-table {
            .currency-dropdown {
                position: relative;
                padding-right: 4px;
            }

            .ant-input {
                padding-left: 8px;
            }
        }

        .currency-dropdown {
            padding-right: @box-padding/2;
            padding-left: @box-padding/4;
            display: flex;
            align-items: center;
            z-index: 9;
            height: 32px;
            cursor: pointer;

            &.disabled {
                cursor: default;
            }

            .anticon {
                color: @weak-text-color;
            }
        }
    }

    .@{prefix-exc} {
        font-size: 12px;

        .exchange-collection {
            display: flex;
            margin-top: 4px;

            .exchange-collection-title {
                margin-right: 4px;
            }

            .exchange-amount-value {
                margin-left: 4px;
            }
        }

        .exchange-rate {
            display: flex;
            margin-bottom: 2px;

            .coustom-rate {
                display: flex;
                flex: 1;
                margin-right: 8px;

                .rate {
                    width: 40px;
                }
            }

            .system-rate {
                flex: 1;

                .rate-title {
                    margin-right: 4px;
                }
            }
        }

        // display: flex;
        // flex-direction: row;
        // font-size: 12px;
        // color: #555555;
        // margin-top: 5px;

        // .exchange-rate {
        //     display: flex;
        //     flex-direction: row;
        //     align-items: center;

        //     .exchange-rate-label {
        //         color: #757575;
        //         margin-right: 4px;
        //     }

        //     .exchange-rate-value {
        //         font-size: 14px;
        //         width: 100px;
        //         .ant-input{
        //             height: 22px;
        //         }
        //         .exchange {
        //             border-bottom: 1px solid #e1e1e1;
        //             ;
        //             display: flex;

        //             :global .ant-input {
        //                 border: none !important;
        //                 width: 40%;
        //                 padding: 0;
        //             }

        //             .system {
        //                 display: inline-block;
        //                 text-decoration: line-through;
        //                 color: #999999;
        //                 font-size: 12px;
        //                 margin-bottom: -2px;
        //             }

        //             .readonly {
        //                 margin-right: 8px;
        //                 font-size: 14px;
        //                 line-height: 25px;
        //                 cursor: default;
        //             }
        //         }
        //     }
        // }

        // .exchange-amount {
        //     display: flex;
        //     flex-direction: row;
        //     margin-left: 5px;
        //     align-items: center;
        //     &-label {
        //         color: #757575;
        //         margin-right: 4px;
        //     }

        //     &-value {
        //         font-size: 14px;
        //     }
        // }
    }

    .ant-form-item .has-err {
        .@{prefix-cls} {
            .currency-dropdown {
                border-bottom: 1px solid @icon-fee-red;
            }
        }
    }

    :global {
        .fm-revised {
            position: absolute;
            font-size: 32px;
            color: #FF7100;
            opacity: 0.4;
            right: 48px;
            bottom: 0;
            transform: rotate(-15deg);
        }

        .money-currency-down {
            transition: transform .3s ease;
        }

        .money-currency-up {
            transform: rotate(-180deg);
        }
    }
}

.moneyFieldSpace();