@mixin checkout__registration(
    $name-space:                   null,
    $padding:                      null,
    $background-color:             null,
    $color:                        null,
    $search-results-padding:       null,
    $search-results-margin-bottom: null,
    $search-results-gutter:        null,
    $details-link-margin-bottom:   null,
    $details-link-color:           null,
    $details-margin-bottom:        null,
    $details-fields-margin-bottom: null,
    $label-margin-bottom:          null
) {
    .#{$name-space}registration {
        @include checkout__reset;
        padding: $padding;
        background-color: $background-color;
        color: $color;

        &__search-results {
            @include checkout__clearfix;
            margin: 0;
            padding: $search-results-padding;

            &__first-name {
                float: left;
                clear: left;
                margin-right: $search-results-gutter;
            }

            &__last-name {
                float: left;
                clear: right;
            }

            &__address-address {
                display: block;
                clear: both;
            }

            &__address-zipcode {
                float: left;
                clear: left;
                margin-right: $search-results-gutter;
            }

            &__address-city {
                float: left;
                clear: right;
            }

            &__address-state {
                float: left;
                clear: left;
                margin-right: $search-results-gutter;
            }

            &__address-country {
                float: left;
                clear: right;
            }
        }

        &__details-link {
            @include checkout__reset-button;
            margin: 0 0 $details-link-margin-bottom;
            color: $details-link-color;
        }

        &__details {
            margin: 0 0 $details-margin-bottom;

            &__footer {
                @include checkout__clearfix;
            }

            &__submit {
                float: left;
            }

            &__loader {
                float: left;
            }

            &__error-message {
                clear: both;
            }
        }

        &__details label {
            display: block;
        }

        &__label {
            margin-bottom: $label-margin-bottom;
        }

        @content;
    }
}

@mixin checkout__registration__phone-search(
    $name-space:          null,
    $margin-bottom:       null,
    $label-margin-bottom: null
) {
    .#{$name-space}registration__phone-search {
        @include checkout__reset;
        @include checkout__clearfix;
        margin: 0 0 $margin-bottom 0;

        &__label {
            display: block;
            margin-bottom: $label-margin-bottom;
        }

        &__input-container {
            position: relative;
            float: left;
            width: 75%;
        }

        &__input {
            display: block;
            width: 100%;
        }

        &__submit {
            max-width: 25%;
        }

        &__loader {
            position: absolute;
            top: 50%;
            right: 0;
            transform: translate(-100%, -50%);
        }

        @content;
    }
}