// /**
//  * Copyright Â© 2015 Magento. All rights reserved.
//  * See COPYING.txt for license details.
//  */

@account-title-border-color: @color-gray-middle2;
@account-table-border-bottom-color: @color-gray-middle1;
@account-table-action-delete: @color-red12;

//
//  Common
//  ---------------------------------------------

& when (@media-common = true) {

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

    .block-addresses-list {
        .items.addresses {
            > .item {
                margin-bottom: @indent__base;
                &:last-child {
                    margin-bottom: 0;
                }
            }
            .item.actions {
                margin-top: @indent__xs;
                .action {
                    &:extend(.abs-account-actions all);
                }
            }
        }
        address {
            &:extend(.abs-account-block-line-height all);
        }
    }

    .form-address-edit {
        #region_id {
            display: none;
        }
        .actions-toolbar .action.primary {
            &:extend(.abs-button-l all);
        }
    }

    .form-edit-account {
        .fieldset.password {
            display: none;
        }
    }

    .form-create-account {
        .fieldset-fullname {
            .fields {
                .field {
                    float: none;
                }
            }
        }
    }

    .box-billing-address,
    .box-shipping-address,
    .box-information,
    .box-newsletter {
        .box-content {
            &:extend(.abs-account-block-line-height all);
        }
    }

    //  My account
    .account {
        .page-title-wrapper {
            .page-title {
                display: inline-block;
/*                color: @cpanel-product-det-name-font-color;
                font-weight: @cpanel-product-det-name-font-weight;
                font-size: @cpanel-product-det-name-font-size;*/
            }
        }
        .messages {
            margin-bottom: @indent__base;
        }
        .column.main {
            margin-bottom: @indent__l;
            h2 {
                margin-top: 0;
            }
            .block:not(.widget) {
                &:extend(.abs-account-blocks all);
            }
        }
        .sidebar-additional {
            margin-top: @indent__xl;
        }

        .table-wrapper {
            .lib-css(margin-bottom, @indent__base);
            border-bottom: 1px solid @account-table-border-bottom-color;
            &:last-child {
                margin-bottom: 0;
            }
        }
        .legend {
            &:extend(.abs-account-title all);
        }
    }

    .account,
    [class^="sales-guest-"],
    .sales-guest-view {
        .column.main {
            .order-details-items {
                .table-wrapper {
                    .data.table {
                        &:extend(.abs-table-striped all);
                    }
                }
            }
        }
        .data.table {
            .col.actions {
                .action {
                    &:extend(.abs-account-actions all);
                    &.delete {
                        .lib-css(color, @account-table-action-delete);
                    }
                }
            }
        }
    }

    //  Checkout address (create shipping address)
    .field.street {
        .field.additional {
            .label {
                &:extend(.abs-visually-hidden all);
            }
        }
    }

    //
    //  Blocks & Widgets
    //  ---------------------------------------------

    .block {
        &:extend(.abs-margin-for-blocks-and-widgets all);
        .column.main & {
            &:last-child {
                margin-bottom: 0;
            }
        }
        .title {
            strong {
                .lib-heading(h4);
                .column.main & {
                }
            }
            margin-bottom: @indent__s;
        }
        p {
            &:last-child {
                margin: 0;
            }
        }
        .box-actions {
            margin-top: @indent__xs;
            .action {
                &:extend(.abs-account-actions all);
            }
        }
    }

    .control.captcha-image {
        .lib-css(margin-top, @indent__s);
        .captcha-img {
            vertical-align: middle;
        }
    }

    .account {
        .data.table-return-items {
            .qty {
                .input-text {
                    &:extend(.abs-input-qty all);
                }
            }
        }
    }

    .order-products-toolbar {
        position: relative;
    }
}

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

.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) {
    .login-container {
        &:extend(.abs-add-clearfix-desktop all);
        .block {
            &:extend(.abs-blocks-2columns all);
            &.login {
                .actions-toolbar {
                    > .primary {
                        margin-bottom: 0;
                        margin-right: @indent__l;
                    }
                    > .secondary {
                        float: left;
                    }
                }
            }
        }
        .fieldset {
            > .field {
                > .control {
                    width: 55%;
                }
            }
        }
    }

    .form-create-account {
        .fieldset-fullname {
            .fields {
                .field {
                    float: left;
                    margin: 0 @indent__s @indent__s 0;
                }
            }
            .field-name-prefix,
            .field-name-suffix {
                width: 50px;
            }
        }
    }

    .form.password.reset,
    .form.send.confirmation,
    .form.password.forget,
    .form.create.account {
        width: 50%;
        min-width: 600px;
    }

    //  My account
    .account.page-layout-2columns-left {
        .sidebar-main,
        .sidebar-additional {
            width: 25%;
        }
        .column.main {
            width: 75%;
        }
    }

    .account {
        .page-title-wrapper {
            &:extend(.abs-add-clearfix-desktop all);
        }
        .column.main {
            .block:not(.widget) {
                .block-content {
                    &:extend(.abs-add-clearfix-desktop all);
                    .box {
                        &:extend(.abs-blocks-2columns all);
                    }
                }
            }
        }
        .data.table {
            margin-bottom: 0;
            .col {
                &.actions {
                    white-space: nowrap;
                }
            }
        }
        .toolbar {
            &:extend(.abs-pager-toolbar all);
        }
    }

    .block-addresses-list {
        .items.addresses {
            &:extend(.abs-add-clearfix-desktop all);
            > .item {
                &:extend(.abs-blocks-2columns all);
                margin-bottom: @indent__base;
                &:nth-last-child(1),
                &:nth-last-child(2) {
                    margin-bottom: 0;
                }
            }
        }
        address {
            &:extend(.abs-account-block-font-size all);
        }
    }

    .page-main .block {
        margin-bottom: 30px;
    }

    .form-edit-account,
    .form-address-edit {
        .fieldset {
            &:extend(.abs-blocks-2columns all);
        }
    }

    .box-billing-address,
    .box-shipping-address,
    .box-information {
        .box-content {
            &:extend(.abs-account-block-font-size all);
        }
    }

    .control.captcha-image {
        .captcha-img {
            margin: 0 @indent__s @indent__s 0;
        }
    }
}

//
//  Mobile @screen__s
//  ---------------------------------------------

.media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__s) {
    .account {
        .column.main,
        .sidebar-additional {
            margin: 0;
        }
        .data.table {
            &:extend(.abs-table-striped-mobile all);
        }
    }
}

//
//  Mobile @screen__m
//  ---------------------------------------------

.media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__m) {
    .login-container {
        .fieldset {
            &:after {
                text-align: center;
            }
        }
    }

    .account {
        .page.messages {
            margin-bottom: @indent__xl;
        }
        .column.main {
            .block:not(.widget) {
                .block-title {
                    &:extend(.abs-add-clearfix-mobile-m all);
                    > .action {
                        float: right;
                        .lib-css(margin-top, @indent__xs);
                    }
                }
                .block-content {
                    .box {
                        .lib-css(margin-bottom, @indent__base);
                        &:last-child {
                            margin-bottom: 0;
                        }
                    }
                }
            }
        }
    }
    .control.captcha-image {
        .captcha-img {
            display: block;
            .lib-css(margin-bottom, @indent__s);
        }
    }
    .customer-account-index {
        .page-title-wrapper {
            position: relative;
        }
    }
}
