//------------------//
// Magsparrow - Lib //
//------------------//
// This library is required for all styles.
// Do not remove this.
$magsparrow-render-styles: false;
@import '../../../web/css/magsparrow-lib';
//------------------//

.order-links {
    margin-bottom: 10px;
    .item {
        display: inline-block;
        margin-right: 20px;
    }
}

.order-actions-toolbar {
    .action {
        margin: 0 20px 0 0;
    }
}

.order-details-items {
    margin-bottom: 20px;
    padding-bottom: 10px;
    .order-title {
        > strong {
            @include responsive-text-size('beta');
            display: inline-block;
        }
    }
    .items-qty {
        @extend %reset-list;

        .item {
            white-space: nowrap;
        }
        .title {
            &:after {
                content: ": ";
            }
        }
    }
    .table-order-items {
        .product-item-name {
            margin-top: 0;
        }
        tbody + tbody {
        }
    }
    .item-options {
        dt {
            margin: 0;
        }
        dd {
            margin: 0 0 15px;
        }
        &.links {
            dt {
                display: inline-block;
                &:after {
                    content: ": ";
                }
            }
            dd {
                margin: 0;
            }
        }
    }

    .cart-tax-total {
        @extend %abs-tax-total;

        &-expanded {

        }
    }

}

.order-actions-toolbar {
    margin-bottom: 25px;
    .action {
        margin-right: 30px;
        &.print {
            margin: 0;
        }
    }
}

.order-status {
    display: inline-block;
    margin-bottom: $indent-base;
}

.page-title-wrapper {
    .order-date {
        margin: 0 0 $indent-base;
    }
}

.account,
[class^="sales-guest-"],
.sales-guest-view {
    .page-title-wrapper {
        .page-title {
            margin-right: $indent-m;
        }
    }
}

.form-orders-search {
    .field {
        &.email,
        &.zip {
            margin-bottom: 0;
        }
    }
}

.block-reorder {
    .block-title {
        @include responsive-text-size('beta');
    }
    .product-item {
        .checkbox {
            position: relative;
            top: 2px;
            vertical-align: baseline;
        }
        .label {
            @include visually-hidden();
        }
        .field.item {
            display: inline-block;
        }
    }
    .product-item-name {
        display: inline-block;
    }
    .actions-toolbar {
        margin: 17px 0;
        max-width: 178px;
    }
    .sidebar-main & .subtitle,
    .sidebar-additional & .subtitle {
        display: none;
    }
}

.block-order-details {
    &-comments {
        margin: 0 0 40px;
        .comment-date {

        }
        .comment-content {
            margin: 0 0 20px;
        }
    }

    &-view {
        .box-content {
            .payment-method {
                .title {
                }
                .content {
                    margin: 0;
                    > strong {
                        &:after {
                            content: ': ';
                        }
                    }
                }
            }
        }
    }
}

.order-tracking {
    margin: 0;
    padding: 20px 0;
    .tracking-title {
        display: inline-block;
    }
    .tracking-content {
        display: inline-block;
        margin: 0 0 0 5px;
    }
}

//
//  Guest order view page
//  ---------------------------------------------

[class^="sales-guest-"],
.sales-guest-view {
    .column.main {
        .block:not(.widget) {
            @include account-blocks();
        }
    }
}

//
//  Mobile
//  ---------------------------------------------

@include respond-to('lib-tweakpoints-small-range') {
    .account {
        .order-details-items {
            .table-order-items {
                .product-item-name,
                .price-including-tax,
                .price-excluding-tax,
                .items-qty {
                    display: inline-block;
                    vertical-align: top;
                }
            }
            .action.print {
                display: none;
            }
        }
        .toolbar {
            @include clearfix();

            .pages {
                float: right;
            }
            .limiter {
                clear: both;
            }
        }
    }
}

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

@include respond-to('medium') {
    .table-order-items {
        .subtotal,
        .amount {
            text-align: right;
        }
        &.creditmemo {
            .col {
                &.qty,
                &.discount,
                &.subtotal {
                    text-align: center;
                }
                &.total {
                    text-align: right;
                }
            }
        }
    }

    .order-actions-toolbar {
        .action.print {
            display: block;
            float: right;
        }
    }

    .page-title-wrapper {
        .order-date {
        }
    }

    //
    //  Guest order view page
    //  ---------------------------------------------
    [class^="sales-guest-"],
    .sales-guest-view {
        .column.main {
            .block:not(.widget) {
                .block-content {
                    @include clearfix();

                    .box {
                        @include blocks-2columns();
                        margin-bottom: $indent-base;
                    }
                }
            }
        }
    }
}
