@import '../styles/variables';

$success-background: #ebfaf4;
$success-icon-color: #5bc89c;

$error-background: #fad9d8;
$error-icon-color: #e43e3b;

$note-background: #eef3fd;
$note-icon-color: #2c52b3;

$warning-background: #fdeed3;
$warning-icon-color: #f5a622;

$border-color: #ced6d9;

$background-color-white: #ffffff;
$background-color-gray: #f5f7f7;

.main {
    display: flex;
    word-break: break-word;
    background-color: $background-color-white;

    .text {
        font-size: 14px;
    }

    .title {
        font-family: $duda-title-font;
        font-size: 16px;
        padding-block-start: 0;
        font-weight: 500;
    }

    .icon {
        border-radius: 50%;
        color: #fff;
        flex: 0 0 auto;
        margin-inline-end: 15px;
        align-self: flex-start;
        width: 22px;
        height: 22px;

        .iconSVG {
            width: 14px;
            height: 14px;
        }

        &.icon-success {
            background-color: $success-icon-color;
        }

        &.icon-error {
            background-color: $error-icon-color;
        }

        &.icon-note {
            background-color: $note-icon-color;
        }

        &.icon-warning {
            background-color: $warning-icon-color;
        }
    }

    &.section {
        width: 440px;
        padding-block-start: 20px;
        padding-inline-end: 20px;
        padding-block-end: 20px;
        padding-inline-start: 20px;

        &.shadow {
            border-radius: 4px;
            box-shadow: 0 5px 10px 0 rgba(0, 0, 0, 0.2);
        }
    }

    &.floating {
        min-width: 320px;
        display: inline-flex;
        align-items: center;

        .icon {
            align-self: center;
        }

        .content {
            display: inline-flex;
            align-items: center;
        }

        &.shadow {
            border-radius: 3px;
            box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.08),
                0 1px 3px 0 rgba(0, 0, 0, 0.12);
        }
    }

    &.banner {
        box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.08),
            0 1px 3px 0 rgba(0, 0, 0, 0.12);
        border-radius: 3px;
        justify-content: center;

        .text {
            flex: 0 1 auto;
            font-size: 15px;
        }
    }

    &.inline {
        display: flex;
        border: solid 1px $border-color;
        border-radius: 3px;
        padding-block-start: 14px;
        padding-block-end: 13px;
        padding-inline-end: 15px;
        padding-inline-start: 15px;

        &.withTitle {
            padding-block-start: 15px;
            padding-block-end: 15px;
        }
        .icon {
            margin-inline-end: 10px;
        }
        .title {
            padding-block-end: 6px;
        }
        .content {
            width: 100%;
        }
    }

    &.banner,
    &.floating,
    &.inline {
        .icon {
            width: 18px;
            height: 18px;

            .iconSVG {
                width: 12px;
                height: 12px;
            }
        }
    }
    &.banner,
    &.floating {
        padding-block-start: 13px;
        padding-inline-end: 16px;
        padding-block-end: 13px;
        padding-inline-start: 16px;
        .icon {
            margin-inline-end: 8px;
        }
    }
    &.floating,
    &.banner {
        &.success {
            background-color: $success-background;
        }

        &.error {
            background-color: $error-background;
        }

        &.note {
            background-color: $note-background;
        }

        &.warning {
            background-color: $warning-background;
        }
    }

    &.section,
    &.banner,
    &.floating,
    &.inline {
        &.no-padding {
            padding-block-start: 0;
            padding-inline-end: 0;
            padding-block-end: 0;
            padding-inline-start: 0;
        }

        &.gray-background {
            background-color: $background-color-gray;
            border: none;
        }
    }
}
