/**
 * @author 1902 Software
 * @copyright Copyright © 2023 1902 Software (https://1902software.com/magento/)
 * @package WriteTextAI_WriteTextAI
 */

/* eslint-disable Magento2.Less.ClassNaming.NotAllowedSymbol */

.wtai-signalr {
    .wtai-generate-message {
        background: #FFFFFF;
        border-radius: 1px;
        box-shadow: 0px 0px 12px rgba(0, 0, 0, 0.12);
        display: flex;
        flex-wrap: wrap;
        left: 50%;
        max-width: 400px;
        padding: 10px;
        position: fixed;
        top: 40px;
        transform: translate(-50%);
        z-index: 903;

        &.wtai-no-display {
            display: none;
        }

        &.wtai-success {
            .wtai-content {
                .wtai-message {
                    &::before {
                        background-image: url("../WriteTextAI_WriteTextAI/images/generate-completed.png");
                    }
                }
            }
        }

        &.wtai-error {
            .wtai-content {
                .wtai-message {
                    &::before {
                        background-image: url("../WriteTextAI_WriteTextAI/images/generate-error.png");
                    }
                }
            }
        }

        img + img {
            margin-left: 10px;
        }

        .wtai-content {
            align-items: center;
            display: flex;
            flex-grow: 1;

            .wtai-message {
                color: #303030;
                font-family: 'Open Sans';
                font-size: 14px;
                font-style: normal;
                font-weight: 400;
                line-height: 19px;
                background: none;
                padding: 0;
                margin-right: 20px;

                &::before {
                    background-color: transparent;
                    background-position: center center;
                    background-repeat: no-repeat;
                    background-size: contain;
                    content: "";
                    display: inline-block;
                    height: 19px;
                    margin-right: 10px;
                    vertical-align: middle;
                    width: 19px;
                    left: 0;
                    top: ~"calc(50% - 10px)";
                    margin-top: 0;
                }
            }
        }

        .wtai-action {
            align-items: center;
            display: flex;
            margin-left: auto;
            min-width: 73px;

            button {
                background: #514943;
                height: 33px;
                vertical-align: middle;
                width: 73px;

                span {
                    color: #FFFFFF;
                    font-family: 'Open Sans';
                    font-size: 14px;
                    font-style: normal;
                    font-weight: 600;
                    line-height: 19px;
                }
            }
        }

        .wtai-footer {
            font-family: 'Open Sans';
            font-size: 13px;
            font-style: normal;
            font-weight: 400;
            line-height: 19px;
            margin-top: 20px;

            .wtai-error-message {
                color: #DC3232;
                margin-top: 10px;
                margin-bottom: 10px;
                display: block;

                .wtai-submessage {
                    color: #303030;
                    margin-bottom: 5px;
                    display: block;
                }
                
                img {
                    width: 75px;
                }

                ul {
                    padding-left: 20px;
                }
            }
        }
    }
}

.adminhtml-system_config-edit,
.wtai-categories-index,
.wtai-grid-index {
    .messages .message {
        margin-bottom: 5px;
        display: flex;

        .action-close {
            margin-left: auto;

            &:active::before,
            &::before {
                font-size: 1.4rem;
            }
        }
    }
}