//
//  Common
//  _____________________________________________

& when (@media-common = true) {
    .catalog-product-view {
        .product-info-main {
            .price-review-container {
                .product-info-price {
                    .price-box {
                        .special-price {
                            display: inline-block;
                            margin-right: 10px;
                            vertical-align: middle;
                            .price-wrapper .price {
                                color: @pdp-special-price__color;
                                font-weight: @pdp-special-price__font-weight;
                            }
                            .price-label {
                                &:extend(.abs-visually-hidden all);
                            }
                            .price-container > span {
                                margin-bottom: 0;
                            }
                        }
                        .old-price {
                            display: inline-block;
                            text-decoration: line-through;
                            vertical-align: middle;
                            .price-container {
                                .price-wrapper {
                                    .price {
                                        color: @pdp-old-price__color;
                                    }
                                }
                            }
                            &.no-display {
                                display: none;
                            }
                            .price-label {
                                &:extend(.abs-visually-hidden all);
                            }
                            .price-wrapper .price {
                                font-weight: 400;
                                line-height: 1;
                                position: relative;
                                text-align: center;
                            }
                        }
                    }
                    .price-difference {
                        color: @djo-blue;
                        font-weight: 700;
                        padding-right: 0;
                        text-transform: uppercase;
                        &.no-display {
                            display: none;
                        }
                        .price-wrapper {
                            .percentage {
                                .price {
                                    .lib-font-size(14);
                                }
                            }
                        }
                        .price-difference-amount {
                            .price {
                                line-height: 1;
                            }
                        }
                    }
                }
            }
        }
    }
}


//
//  Mobile
//  _____________________________________________

.media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__s) {
    .catalog-product-view {
        .product-info-main {
            .price-review-container {
                .product-info-price {
                    .price-box {
                        .special-price  {
                            .price-wrapper {
                                .price {
                                    .lib-font-size(@pdp-special-price__font-size);
                                }
                            }
                        }
                        .old-price {
                            .price-container {
                                .price-wrapper {
                                    .price {
                                        .lib-font-size(@pdp-old-price__font-size);
                                    }
                                }
                            }
                        }
                    }
                    .price-difference {
                        margin-bottom: 3px;
                        &.no-display {
                            display: none;
                        }
                        .price-wrapper {
                            .percentage {
                                &::after {
                                    content: ' | ';
                                    display: inline;
                                }
                                .percent-discount-subtitle {
                                    .lib-font-size(14);
                                }
                            }
                        }
                        .price-label {
                            .lib-font-size(14);
                        }
                        .price-difference-amount {
                            .price {
                                .lib-font-size(14);
                            }
                        }
                    }
                }
            }
        }
    }
}

.media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__m) {
    .catalog-product-view {
        .product-info-main {
            .product-info-price {
                .price-box {
                    .special-price {
                        .price-container {
                            .price-wrapper {
                                display: inline-block;
                                margin-left: 10px;
                            }
                        }
                    }
                    .old-price {
                        .price-container {
                            > .price-label {
                                &:extend(.abs-visually-hidden all);
                                display: none;
                            }
                            .price-wrapper {
                                .price {
                                    font-weight: 400;
                                    text-decoration: line-through;
                                }
                            }
                        }
                    }
                }
                .price-difference {
                    display: block;
                    margin-bottom: 5px;
                    &.no-display {
                        display: none;
                    }
                    .price-wrapper {
                        .percentage {
                            &::after {
                                content: ' | ';
                            }
                            .price {
                                line-height: 1;
                                &::after {
                                    content: '\00a0';
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}


//
//  Desktop
//  _____________________________________________

.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__s) {
    .catalog-product-view {
        .product-info-main {
            .price-review-container {
                .product-info-price {
                    .price-box {
                        .special-price {
                            .price-wrapper {
                                .price {
                                    .lib-font-size(@pdp-special-price__font-size + 4);
                                }
                            }
                        }
                        .old-price {
                            .price-container {
                                .price-wrapper {
                                    .price {
                                        .lib-font-size(@pdp-old-price__font-size + 2);
                                    }
                                }
                            }
                        }
                    }
                    .price-difference {
                        color: @djo-blue;
                        font-weight: 700;
                        text-transform: uppercase;
                        &.no-display {
                            display: none;
                        }
                        .price-container {
                            .price {
                                .lib-font-size(16);
                            }
                        }
                    }
                }
            }
        }
    }
}

.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) {
    .catalog-product-view {
        .product-info-main {
            .price-review-container {
                .product-info-price {
                    .price-box {
                        .old-price {
                            margin-right: 10px;
                        }
                    }
                    .price-difference {
                        display: block;
                        height: 40px;
                        line-height: 1;
                        &.price-difference-is-shown {
                            display: block;
                        }
                        &.no-display {
                            display: none;
                        }
                        .price-discount-amount {
                            .price-difference-amount {
                                .price {
                                    &::after {
                                        content: none;
                                    }
                                }
                            }
                            .percentage {
                                background: @djo-blue;
                                border-radius: 30px;
                                color: #fff;
                                display: inline-block;
                                height: 31px;
                                padding-top: 9px;
                                line-height: 11px;
                                margin-right: 5px;
                                text-align: center;
                                width: 40px;
                                .price {
                                    display: block;
                                    font-weight: 900;
                                    line-height: 11px;
                                    strong {
                                        font-weight: inherit;
                                    }
                                }
                                .percent-discount-subtitle {
                                    .lib-font-size(11);
                                    display: inline-block;
                                    text-transform: uppercase;
                                }
                            }
                        }
                        .price-label {
                            .lib-font-size(20);
                            position: relative;
                            top: -3px;
                        }
                        .price-difference-amount {
                            position: relative;
                            top: -3px;
                            .price {
                                .lib-font-size(20);
                            }
                        }
                    }
                }
            }
        }
    }
}

.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__l) {
    .catalog-product-view {
        .product-info-main {
            .price-review-container {
                .product-info-price {
                    .price-difference {
                        display: inline-block;
                        position: relative;
                        top: -5px;
                        &.price-difference-is-shown {
                            display: inline-block;
                        }
                    }
                }
            }
        }
    }
}
