/**
 * Copyright Â© 2021 O2TI. All rights reserved.
 * @author  Bruno Elisei <brunoelisei@o2ti.com>
 * See LICENSE.txt for license details.
 */

//
//  Common
//  _____________________________________________

& when (@media-common = true) {
    .full-checkout {
        .modal-popup {
            &.modal-slide {
                left: 0;
            }

            .field-tooltip {
                .field-tooltip-content {
                    &:extend(.abs-checkout-tooltip-content-position-top all);
                }
            }

            .modal-footer {
                .action-hide-popup {
                    &:extend(.abs-action-button-as-link all);

                    margin-top: 8px;
                }
            }
        }
    }
}

//
//  Mobile
//  _____________________________________________

.media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__m) {
    .full-checkout {
        .modal-popup {
            .modal-footer {
                .action-save-address {
                    width: 100%;
                }

                .action-hide-popup {
                    margin-top: @indent__base;
                }
            }
        }
    }
}

//
//  Desktop
//  _____________________________________________

.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) {
    .full-checkout {
        .modal-popup {
            .form-shipping-address {
                .lib-css(max-width, @theme-full-checkout-shipping-address__max-width);
            }

            .modal-footer {
                .action-save-address {
                    float: right;
                    margin: 0 0 0 @indent__base;
                }
            }
        }
    }
}

.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__l) {
    .full-checkout {
        .modal-popup {
            .modal-inner-wrap {
                .lib-css(margin-left, -(@theme-full-checkout-modal-popup__width/2));
                .lib-css(width, @theme-full-checkout-modal-popup__width);

                left: 50%;
            }
        }
    }
}
