// /**
//  * Copyright © Magento, Inc. All rights reserved.
//  * See COPYING.txt for license details.
//  */

//
//  Variables
//  _____________________________________________

@block-auth__dropdown__padding: @indent__m;
@block-auth__dropdown__background-color: @color-white;
@block-auth__or-label__size: 36px;
@block-auth__width: 0;
@block-auth__border: 1px solid @color-gray-light3;

//
//  Common
//  _____________________________________________

& when (@media-common =true) {
    .authentication-dropdown {
        box-sizing: border-box;

        .modal-inner-wrap {
            padding: @block-auth__dropdown__padding;
        }
    }

    .authentication-wrapper {
        margin-top: 0;
        position: relative;
        z-index: 1;
        border-bottom: 1px solid #f0f0f0;
        margin-bottom: 50px;
        padding-bottom: 15px;
        max-width: 100%;
        text-align: left;

        ._has-auth-shown & {
            z-index: inherit;
        }

        .action-auth-toggle {
            font-size: 14px;
            color: var(--thim-mgs-color-01);
            border: 2px solid #222;
            background-color: #fff;
            margin-top: 10px;
            padding: 0 25px;
            font-weight: 600;
            margin-left: 0;
            min-width: 130px;
            height: 36px;
            -webkit-border-radius: 40px;
            -moz-border-radius: 40px;
            border-radius: 40px;

            &:hover {
                background-color: #222;
                color: #fff;
                text-decoration: none;
            }
        }
    }

    .action-auth-toggle {
        &:extend(.abs-action-button-as-link all);
    }

    .block-authentication {
        .block-title {
            .lib-font-size(@h3__font-size);
            border-bottom: 0;
            margin-bottom: @indent__m;

            strong {
                font-weight: @font-weight__light;
                text-align: right;
                display: block;
                color: var(--thim-mgs-color-01);
            }
        }

        .field {
            .label {
                font-weight: @font-weight__regular;
            }
        }

        .actions-toolbar {
            margin-bottom: @indent__xs;

            >.secondary {
                padding-top: @indent__m;
                text-align: right;
            }
        }

        .action.action-register,
        .action.action-login {
            &:extend(.abs-button-l all);
        }

        .block[class] {
            margin: 0;

            ul {
                list-style: none;
                padding-right: @indent__s;
            }

            .field {

                .control,
                .label {
                    float: none;
                    width: auto;
                }
            }

            &+.block {
                border-top: 1px solid @color-gray-light5;
                margin-top: @indent__xl;
                padding-top: @indent__xl;
                position: relative;

                &:before {
                    .lib-css(height, @block-auth__or-label__size);
                    .lib-css(line-height, @block-auth__or-label__size - 2px);
                    .lib-css(margin, -(@block-auth__or-label__size/2 + 1px) 0 0 -(@block-auth__or-label__size / 2));
                    .lib-css(min-width, @block-auth__or-label__size);
                    background: @color-white;
                    border: 1px solid @color-gray-light5;
                    border-radius: 50%;
                    box-sizing: border-box;
                    color: @color-gray-light5;
                    content: attr(data-label);
                    display: inline-block;
                    right: 50%;
                    letter-spacing: normal;
                    padding: 0 .2rem;
                    position: absolute;
                    text-align: center;
                    text-transform: uppercase;
                    top: 0;
                }
            }
        }
    }

    .block.block-customer-login {
        form {
            button.action.action-login.secondary {
                background-color: #222;
                border: 1px solid #222;
                color: #fff;
                font-size: 14px;
                padding: 0 30px;
                height: 40px;
                margin-top: 25px;

                &:hover {
                    background-color: #01bad4;
                    border-color: #01bad4;
                }
            }
        }
    }
}

//
//  Desktop
//  _____________________________________________

.media-width(@extremum, @break) when (@extremum ='min') and (@break =@screen__m) {
    .authentication-dropdown {
        .lib-css(background-color, var(--thim-mgs-color-06, @block-auth__dropdown__background-color));
        .lib-css(border, @block-auth__border);
        -webkit-transform: scale(1, 0);
        -webkit-transform-origin: 0 0;
        -webkit-transition: -webkit-transform linear .1s, visibility 0s linear .1s;
        position: absolute;
        text-align: right;
        top: 100%;
        transform: scale(1, 0);
        transform-origin: 0 0;
        transition: transform linear .1s, visibility 0s linear .1s;
        visibility: hidden;
        left: 0;

        &._show {
            .lib-css(z-index, @dropdown-list__z-index);
            -webkit-transform: scale(1, 1);
            -webkit-transition: -webkit-transform linear .1s, visibility 0s linear 0s;
            transform: scale(1, 1);
            transition: transform linear .1s, visibility 0s linear 0s;
            visibility: visible;
        }
    }

    .block-authentication {
        .block-title {
            font-size: 24px;
            border-bottom: 0;
            margin-bottom: 20px;
            color: #333;
            line-height: normal;
        }

        .actions-toolbar {
            >.primary {
                display: inline;
                float: left;
                margin-left: 0;

                .action {
                    margin-left: 0;
                }
            }

            >.secondary {
                float: right;
                margin-left: 2rem;
                padding-top: 1rem;
            }
        }
    }

    .popup-authentication {
        .modal-inner-wrap {
            min-width: @screen__m;
            width: 60%;
        }

        .block-authentication {
            .lib-vendor-prefix-display(flex);
            .lib-vendor-prefix-flex-direction(row);
            border-top: 1px solid @color-gray-light5;
        }

        .block[class],
        .form-login,
        .fieldset,
        .block-content {
            .lib-vendor-prefix-display(flex);
            .lib-vendor-prefix-flex-direction(column);
            .lib-vendor-prefix-flex-grow(1);
        }

        .block[class] {
            box-sizing: border-box;
            float: right;
            padding: @indent__s 0 0 @indent__l;
            width: 50%;

            &+.block {
                border-right: 1px solid @color-gray-light5;
                border-top: 0;
                margin: 0;
                padding: @indent__s @indent__xl 0 0;

                &:before {
                    right: 0;
                    top: 50%;
                }
            }
        }

        .actions-toolbar {
            margin-bottom: 0;
            margin-top: auto;
        }
    }
}