@import "./functions/func.scss";

.ui-text,
.ui-input[type] {
    font-size: var(--font-size);
    font-family: var(--font-family);

    @include outborder();

    &.validation-error,
    &:invalid {
        border-color: var(--red-color);

        &:focus,
        &:hover {
            border-color: var(--red-color);
        }
    }
}

.ui-input {
    text-indent: var(--text-indent);
    line-height: var(--line-height);
}

.ui-loading {
    position: absolute;
    @include inset(0, 0, 0, 0);
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s linear .12s, opacity .12s ease;
    background-color: var(--loading-bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;

    >div {
        width: 15px;
        aspect-ratio: 1;
        border-radius: 50%;
        animation: loading-dot 1s infinite linear alternate;
        /*background-color: var(--loading-fore-color);
        border-radius: var(--loading-border-radius);

        >svg {
            width: var(--loading-size);
            height: var(--loading-size);
            padding: 20px;
            animation: loading-spinner 1.2s infinite linear;
        }*/
    }
}

.ui-notify {
    padding: 10px 10px 12px;
    position: fixed;
    top: 16px;
    right: 16px;
    min-width: 300px;
    max-width: 600px;
    box-shadow: 0 3.2px 7.2px 0 rgba(0, 0, 0, .13), 0 0.6px 1.8px 0 rgba(0, 0, 0, .11);
    transition: transform .12s ease, opacity .12s ease;
    transform-origin: right;
    transform: translateX(100%);
    opacity: 0;

    &.active {
        transform: translateX(0);
        opacity: 1;
    }

    .ui-icon {
        width: 30px;
        height: 30px;
        box-sizing: border-box;
    }

    >.ui-notify-single {
        display: flex;
        align-items: center;

        >.ui-notify-message {
            margin: 0 6px;
        }
    }

    .ui-notify-header {
        display: flex;
        align-items: center;
    }

    .ui-notify-type {
        padding: 3px;
        fill: var(--green-color);

        &.warning {
            fill: var(--orange-color);
        }

        &.error {
            fill: var(--red-color);
        }
    }

    .ui-notify-title {
        flex: 1 1 auto;
        font-size: 1rem;
        margin: 0 6px;
    }

    .ui-notify-close {
        cursor: pointer;
        padding: 6px;
        transition: background-color .12s ease, fill .12s ease;
        fill: var(--red-color);

        &:hover {
            background-color: var(--red-color);
            fill: #fff;
        }
    }

    .ui-notify-message {
        flex: 1 1 auto;
    }
}