@import '~@equitysim/react-uikit/dist/styles/styleguide';
@import '~@equitysim/react-uikit/dist/styles/global/utils/size';

.c-order-algorithm {
    $space-between: v-space(1);
    @extend %modal-section-large;

    margin-bottom: v-space(2);
    padding-top: 0;
    text-align: left;
    border-left: none;
    border-right: none;

    p {
        margin: v-space(2) 0;
    }

    &__label {
        font-family: $base-font-family;
        position: absolute;
        right: 0;
        top: v-space(2);
        font-size: 1.2rem;
        color: $grey-80;
        font-weight: $font-weight-bold;
        line-height: 0;
        color: $grey-50;
        text-transform: uppercase;
    }

    &__element {
        font-weight: $font-weight-bold;
        margin-left: $space-between;
        margin-right: $space-between;
        &:last-child {
            margin-left: $space-between;
            margin-right: 0;
        }
        &:first-child {
            margin-left: 0;
            margin-right: $space-between;
        }

        &--isFullWidth {
            flex-grow: 1;
            & > span {
                width: 100%;
                justify-content: center;
            }
        }
    }

    &__formula {
        display: flex;
        align-items: flex-end;

        @media screen and (min-width: $screen-small) {
            padding-left: v-space(6);
        }
    }

    &__input {
        display: inline-block;
        width: unset;
        flex-grow: 1;
        height: v-space(4);

        &::before {
            content: '$';
            position: absolute;
            left: 0;
            top: v-space(1);
            font-size: v-space(2);
            color: $grey-80;
        }

        &:last-of-type {
            margin-left: $space-between;
            margin-right: 0;
        }

        input {
            padding-left: v-space(3) !important;
            padding-right: v-space(11) !important;
            color: $success-color !important;
            font-family: $numeric-font-family;
            font-weight: 500;

            @media screen and (max-width: $screen-small) {
                width: 4rem;
            }
        }
    }

    &__input-wrapper {
        border-color: $grey-70 !important;
        height: v-space(4) !important;
    }
}
