/*
* created by zhongzheng at 2019.11.26
*/
@import '../style/themes/default.less';
@import '../style/core/animation.less';

@toast-prefix-cls: ~"@{sino-prefix}-toast";

.@{toast-prefix-cls} {
    box-sizing: content-box;
    position: fixed;
    top: 45%;
    left: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: @toast-min-width;
    max-width: @toast-max-width;
    padding: @toast-padding;
    color: @toast-text-color;
    font-size: @toast-font-size;
    line-height: @toast-line-height;

    // allow newline charactor
    white-space: pre-wrap;
    text-align: center;
    word-wrap: break-word;
    background-color: @toast-background-color;
    border-radius: @toast-border-radius;
    transform: translateX(-50%);

    &-unclickable {
        * {
            pointer-events: none;
        }
    }

    &-text {
        width: fit-content;
        min-height: unset;

        .@{toast-prefix-cls}-inner-text {
            margin-top: 0;
        }
    }

    &&-icon {
        top: 40%;
        min-width: 1.68rem;
        max-width: 3.36rem;
        padding: .36rem .46rem;

        .@{toast-prefix-cls}-inner-text {
            text-align: center;
        }
    }

    &-top {
        top: @toast-position-top-distance;
    }

    &-bottom {
        top: auto;
        bottom: @toast-position-bottom-distance;
    }

    &-inner-icon {
        margin-bottom: .28rem;
        font-size: @toast-icon-size;
    }

    &-loading {
        padding: @padding-base;
        color: @toast-loading-icon-color;
    }

    &-multiline {

        .@{toast-prefix-cls}-inner-text {
            text-align: left;
        }
    }
}
