/**
 * Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License").
 * You may not use this file except in compliance with the License.
 * A copy of the License is located at
 *
 *  http://aws.amazon.com/apache2.0
 *
 * or in the "license" file accompanying this file. This file is distributed
 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
 * express or implied. See the License for the specific language governing
 * permissions and limitations under the License.
 */

@import 'module/_vars.less';

& when (@media-common = true) {

    .amazon-button-container {
        display: table;
        margin: 0 0 22px;

        &__cell {
            display: table-cell;
            min-width: 45px;
            position: relative;
        }

        img {
            display: block;
        }

        .field-tooltip {
            display: none;
            margin: -12px 0 0;
            right: 5px;
            top: 50%;
        }

        .checkout-shipping-address & {
            margin: 22px 0;
        }
    }

    .login-container {
        .block {
            &-amazon-login {
                .actions-toolbar {
                    margin-top: 25px;
                }
            }
        }
    }

    .amazon-validate-container {
        .block {
            .block-title {
                &:extend(.abs-login-block-title all);
                .lib-font-size(18);
            }
        }
        .fieldset {
            .lib-form-hasrequired(bottom);
            &:after {
                margin-top: 35px;
            }
        }
    }
}

@media all and (max-width: @screen__m) {
    .amazon-button-container {
        width: 100%;
    }
}

//
//  Desktop
//  ---------------------------------------------

.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) {
    .login-container {
        .block {
            &-amazon-login {
                clear: none;
                float: right;
                .actions-toolbar {
                    margin-top: 25px;
                }
            }
            &:nth-child(2) + .block-amazon-login {
                clear: none;
            }
        }
    }

    .amazon-validate-container {
        margin: 40px auto 0 auto;
        width: 500px;

        .primary {
            width: 190px;
        }

        .continue-as-guest {
            width: 130px;
        }

        .forgot-password {
            text-align: right;
            width: 175px;
        }
    }
}

.amazon-logout-widget {
    display: none;
}
