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

//
//  Variables
//  _____________________________________________

@checkout-summary__background-color: #fff;
@checkout-summary__padding: 22px @indent__l;

@checkout-summary-title__margin: @indent__s;
@checkout-summary-mark-value__color: @color-gray60;

@checkout-summary-items__max-height: 370px;
@checkout-summary-items__padding: 15px;

//
//  Common
//  _____________________________________________

& when (@media-common = true) {

    //
    //  Order Summary
    //  ---------------------------------------------

    .opc-block-summary {
        .lib-css(background, @checkout-summary__background-color);
        .lib-css(padding, @checkout-summary__padding);
        border: 2px solid #e7e7e7;
        border-radius: 0;
        margin-bottom: 30px;

        &:extend(.abs-add-box-sizing all);

        > .title {
            &:extend(.abs-checkout-title all);
            text-transform: uppercase;
            font-weight: 600;
            color: #222529;
            display: block;
        }

        //  Totals table
        .table-totals {
            &:extend(.abs-sidebar-totals all);
        }

        .mark {
            .value {
                .lib-css(color, @checkout-summary-mark-value__color);
                display: block;
            }
        }

        .grand.incl {
            & + .grand.excl {
                .mark,
                .amount {
                    border-top: 0;
                    .lib-font-size(14);
                    padding-top: 0;
                    strong {
                        font-weight: @font-weight__regular;
                    }
                }
            }
        }

        .not-calculated {
            font-style: italic;
        }

        //
        //  Items list
        //  ---------------------------------------------

        //  Block title
        .items-in-cart {
            > .title {
                border-bottom: @border-width__base solid @border-color__base;
                .lib-css(padding, @indent__s 0 @indent__s @indent__xl);
                cursor: pointer;
                .lib-icon-font(
                @icon-down,
                @_icon-font-size: 12px,
                @_icon-font-line-height: 12px,
                @_icon-font-text-hide: true,
                @_icon-font-margin: 3px 0 0,
                @_icon-font-position: after,
                @_icon-font-display: block
                );
                margin-bottom: 0;
                position: relative;
                &:after {
                    position: absolute;
                    left: 0;
                    top: @indent__s;
                }
                strong {
                    .lib-font-size(10);
                    font-weight: @font-weight__light;
                    margin: 0;
                }
            }
            &.active {
                > .title {
                    .lib-icon-font-symbol(
                    @_icon-font-content: @icon-up,
                    @_icon-font-position: after
                    );
                }
            }
            .product {
                position: relative;
            }
        }

        //  Cart items
        .minicart-items-wrapper {
            .lib-css(margin, 0 0 0 -(@checkout-summary-items__padding));
            .lib-css(max-height, @checkout-summary-items__max-height);
            .lib-css(padding, @checkout-summary-items__padding 0 0 @checkout-summary-items__padding);
            border: 0;
        }
        .column.main & {
            .product-item {
                margin: 0;
                padding: 5px 0;
            }
        }
        .product-item {
            .product .product-image-container {
              background: none;
              padding-left: 10px;
            }
            .product-item-inner {
                display: table;
                margin: 0 0 @indent__s;
                width: 100%;
            }
            .product-item-name-block {
                display: table-cell;
                padding-left: @indent__xs;
                text-align: right;
            }
            .subtotal {
                display: table-cell;
                text-align: left;
            }
            .price {
                .lib-font-size(16);
                font-weight: @font-weight__regular;
            }
            .price-including-tax {
                & + .price-excluding-tax {
                    .price {
                        .lib-font-size(10);
                    }
                }
            }
        }
    }
}

//
//  Mobile
//  _____________________________________________

.media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__s) {
    .opc-block-summary {
        > .title {
            border-bottom: 0;
            .lib-css(font-size, @checkout-step-title-mobile__font-size);
            margin-bottom: @indent__base;
            padding-bottom: 0;
        }
        .totals {
            &:extend(.abs-sidebar-totals-mobile all);
        }
    }
}

//
//  Desktop
//  _____________________________________________

.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) {
    .opc-summary-wrapper {
        .modal-header {
            .action-close {
                display: none;
            }
        }
    }
}
