//
//  Common
//  _____________________________________________

& when (@media-common = true) {
    body.account {
        .sidebar-main {
            .additional-block {
                margin-top: 20px;
            }
        }
        .customer-account-top-block {
            margin-bottom: 40px;
        }
        .customer-account-bottom-block {
            .lib-css(padding-bottom, @indent__xl);
            clear: both;
            position: relative;
        }
        .block-dashboard-details {
            margin-bottom: 20px;
            margin-top: -10px;
            .account-no {
                .lib-font-size(19);
            }
        }
        .block-dashboard-info {
            .block-title {
                > strong + a {
                    display: inline-block;
                    margin-left: 15px;
                }
            }
        }
        .order-details-items {
            &.ordered {
                .order-title {
                    display: none;
                }
            }
            &.invoice,
            &.shipments {
                .actions-toolbar {
                    margin: -10px 0 20px;
                }
                .order-title {
                    border: 0;
                    padding : 0 0 4px;
                    & > strong {
                        background: #f0f0f0;
                        border: 1px solid #cccccc;
                        display: block;
                        font-weight: 400;
                        margin: 0 -8px 3px;
                        padding: 6px;
                        .action {
                            font-size: 15px;
                        }
                    }
                    & + .order-tracking {
                        border: 0;
                        padding: 0;
                    }
                }
                .order-tracking .tracking-title {
                    font-weight: 400;
                }
                .table-wrapper {
                    border: 0;
                }
                .table-wrapper:not(:last-child) {
                    margin-top: -8px;
                }
            }
            .table.table-order-items {
                tbody {
                    .col.name {
                        .product-item-name {
                            .lib-font-size(20);
                            margin-bottom: 4px;
                        }
                        .item-options,
                        .item.options { // shipping
                            .lib-clearfix();
                            .lib-font-size(14);
                            margin-bottom: 0;
                            dt {
                                clear: left;
                                float: left;
                                margin: 0;
                                &::after {
                                    content: ":\00a0";
                                }
                            }
                            dd {
                                float: left;
                                margin-bottom: 2px;
                            }
                        }
                    }
                    .col.price {
                        .price-including-tax,
                        .price-excluding-tax {
                            .lib-font-size(17);
                            color: @djo-gray;
                        }
                    }
                    .col.subtotal {
                        .price-including-tax,
                        .price-excluding-tax {
                            .lib-font-size(17);
                            color: @djo-gray;
                        }
                        .subtotal {
                            display: block;
                            .price {
                                .lib-font-size(16);
                                font-weight: 400;
                                text-decoration: line-through;
                            }
                            & + .discount {
                                display: block;
                                color: #cc0000;
                                margin: 0 0 3px;
                                .price {
                                    .lib-font-size(16);
                                    color: #cc0000;
                                }
                                & + .total {
                                    display: block;
                                    .price {
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    body.subaccounts-manage-edit {
        fieldset.permissions {
            width: 100%;
        }
    }

    body.magento-rma-returns-view {
        .table-returns {
            tr.hidden {
                display: none;
            }
        }
    }

    body.magento-rma-returns-create {
        .form-create-return {
            #add-item-to-return {
                .lib-button-as-link();
                margin-top: 20px;
                .lib-font-size(14);
            }
        }
    }
}


//
//  Mobile
//  _____________________________________________

.media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__s) {
    body.account {
        .order-details-items {
            .table-wrapper.order-items {
                .table.table-order-items {
                    .col {
                        text-align: left;
                        &.name {
                            .item-options {
                                dt {
                                    &::after {
                                        content: ":\00a0";
                                        padding-right: 11px;
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}


//
//  Desktop
//  _____________________________________________

.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__s) {
    body.account {
        .order-details-items {
            &.invoice,
            &.shipments {
                .order-title {
                    .action {
                        float: right;
                        margin: 8px 0 0 0;
                    }
                }
            }
        }
    }
}

.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) {
    body.account {
        .page-main {
            .block-addresses-list {
                margin-bottom: 33px;
                .items.addresses {
                    >.item:nth-child(odd) {
                        clear: left;
                        float: left;
                    }
                    >.item:nth-child(even) {
                        float: right;
                        + * {
                            clear: both;
                        }
                    }
                    > .item,
                    > .item:nth-last-child(1),
                    > .item:nth-last-child(2),
                    > .item:last-child {
                        margin-bottom: 22px;
                    }
                }
            }
        }
    }
    .account .column.main .block.block-order-details-view .block-content:not(.widget) .box,
    [class^='sales-guest-'] .column.main .block.block-order-details-view .block-content:not(.widget) .box,
    .sales-guest-view .column.main .block.block-order-details-view .block-content:not(.widget) .box {
        width: 50%;
        &.box-order-billing-address {
            clear: left;
        }
    }
}
