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

//
//  Variables
//  _____________________________________________

@checkout-summary__background-color: transparent;
@checkout-summary__padding: 0;

@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 {
        &:extend(.abs-add-box-sizing all);
        .lib-css(background, @checkout-summary__background-color);
        .lib-css(padding, @checkout-summary__padding);

        > .title {
            &:extend(.abs-checkout-title all);
            font-size: 3.6rem;
            margin-bottom: 30px;
            margin-top: 5px;
        }
        .message.success{
            &:before{
                width: 100%;
                z-index: -1;
                padding-left: 20px;
                text-align: center;
            }
        }
        //  Totals table
        .table-totals {
            &:extend(.abs-sidebar-totals all);
            margin-bottom: 30px;
        }

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

        .discount.coupon {
            display: none;
        }

        .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;
            white-space: normal;
        }

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

        //  Block title
        .items-in-cart {
            &:extend(.abs-discount-block all);
            /*> .title {
                border-top: @border-width__base solid @border-color__base;
                .lib-css(padding, 30px 40px 0 0);
                cursor: pointer;
                .lib-icon-font(
                @icon-down,
                @_icon-font-size: 30px,
                @_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;
                    right: 0;
                }

            }
            &.block{
                > .title {
                    strong {
                        span{
                            .lib-font-size(18);
                            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);
            /*.lib-css(max-height, @checkout-summary-items__max-height);*/
            border: 0;
        }

        .column.main & {
            .product-item {
                margin: 0;
                background: none;
                padding: 0;
                padding-bottom: 30px;
            }
        }

        .product-item {
            padding: 20px 0;
            .product{
                display: flex;
                width: 100%;
            }
            .product-item-inner {
                display: table;
                margin: 0 0 @indent__s;
                width: 100%;
            }
            dl.item-options{
                margin-top: 7px;
                margin-bottom: 7px;
                display: flex;
                flex-wrap: wrap;
                width: 100%;
                dt{
                    width: 50%;
                    font-size: 13px;
                    text-transform: uppercase;
                    line-height: 1;
                }
                dd{
                    font-weight: @font-weight__semibold;
                    line-height: 1;
                    width: 50%;
                }
            }
            .product-item-details {
                > .product.options{
                    margin-top: 7px;
                }
                .product.options{
                    flex-wrap: wrap;
                    margin-top: 10px;
                    .field.configurable{
                        margin: 10px 0;
                    }
                }
                .price-excluding-tax{
                    margin:0;
                    > span{
                            display: block;
                    }
                }
            }
            
            .details-qty{
                font-weight: @font-weight__bold;
                .label{
                    word-break: initial;
                }
            }
            .product-item-name-block {
                display: table-cell;
                padding-right: @indent__xs;
                text-align: left;
            }
            .product-item-name{
                margin-left: 0;
                max-width: 100%;
            }
            .subtotal {
                vertical-align: top;
                display: table-cell;
                text-align: right;
            }


            .price-including-tax {
                & + .price-excluding-tax {
                    margin: 0;

                    .price {
                        .lib-font-size(10);
                    }
                }
            }
        }

        .actions-toolbar {
            position: relative;
            z-index: 1;

            .secondary {
                border-top: @border-width__base solid @border-color__base;
                display: block;
                float: none;
                margin: -1px 0 0;
                padding: 15px 0 0;
                text-align: left;

                .action {
                    margin: 0;
                }
            }
        }
    }

}
.media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__m) {
    .opc-summary-wrapper.custom-slide {
        .modal-inner-wrap{
            padding: 50px;
        }
        .action-close{
            margin:0;
        }
        .opc-block-summary {
            > .title{
                font-size: 2.8rem;
                margin-bottom: 20px;
                margin-top: 0;
            }
            .product-item {
                .product-item-inner{
                    display: block
                }
                .subtotal{
                    display: block;
                    text-align: left;
                }
                .product-item-name-block{
                    display: block;
                }
            }
        }
    }
}
.media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__xs) {
    .opc-summary-wrapper.custom-slide {
        .modal-inner-wrap{
            padding: 30px;
        }
    }
}
//
//  Desktop
//  _____________________________________________

.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) {
    .opc-summary-wrapper {
        .modal-header {
            .action-close {
                display: none;
            }
        }
        .modal-inner-wrap{
            box-shadow:none;
        }
    }
    .opc-block-summary .product-item .subtotal .price-including-tax{
         margin:0;
        > span{
            justify-content: flex-end;
        }
    }
}
