/**
 * 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 {
        .checkout-shipping-method {
            position: relative;
        }

        .shipping-policy-block {
            &.field-tooltip {
                left: 0;
                top: @indent__base;

                .field-tooltip-action {
                    .lib-css(color, @theme-full-checkout-shipping-policy-action__color);

                    cursor: pointer;

                    &::before {
                        display: none;
                    }

                    span {
                        &:extend(.abs-visually-hidden-reset all);
                    }
                }

                .field-tooltip-content {
                    &:extend(.abs-add-box-sizing all);
                    &:extend(.abs-checkout-tooltip-content-position-top all);
                    .lib-css(width, @theme-full-checkout-shipping-policy-tooltip__width);

                    left: 0;
                    top: @indent__l;
                }
            }
        }
    }
}

//
//  Mobile
//  _____________________________________________

.media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__s) {
    .full-checkout {
        .shipping-policy-block {
            &.field-tooltip {
                left: @indent__base;
                margin-bottom: @indent__base;
                position: relative;
                top: auto;

                .field-tooltip-content {
                    .lib-css(width, @theme-full-checkout-shipping-policy-tooltip-mobile__width);

                    right: auto;

                    &::before,
                    &::after {
                        right: auto;
                    }
                }
            }
        }
    }
}
