/**
 * @author 1902 Software
 * @copyright Copyright © 2023 1902 Software (https://1902software.com/magento/)
 * @package WriteTextAI_WriteTextAI
 */
 
/* eslint-disable Magento2.Less.ClassNaming.NotAllowedSymbol */

@btn-dark: #808080;
@text-red: #eb5202;
@blink-bg: #ffe8dc;
@text-dark: #303030;
@text-dark2: #808080;
@btn-dark2: #303030;
@bg-white: #ffffff;
@bg-red: #eb5202;
@bg-white2: #fccccc;
@bg-white3: #e9e2f2;
@bg-red2: #fea577;
@bg-white4: #e3e3e3;
@bg-white5: #f8f8f8;

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}
 
@keyframes blink {
    0% {
        background-color: transparent;
    }

    50% {
        background-color: @blink-bg;
    }

    100% {
        background-color: transparent;
    }
}

.wtai-edit-modal {
    color: @text-dark;
    left: 0;
    min-width: 425px;

    @media screen and (min-width: 1180px) {
        left: 14.8rem;
    }

    &.wtai-edit-main .modal-header {
        padding-top: 1.9rem;
        padding-bottom: 1.9rem;
        
        #messages {
            display: none;
        }
    }
    
    &.wtai-edit-main .wtai-edit-modal-wrapper {
        position: relative;

        .wtai-store-container {
            padding-bottom: 0;
            padding-top: 0;

            + div #messages {
                display: none;
            }

            .wtai-store-scope {
                align-items: center;
                display: flex;

                button {
                    min-height: 34px;
                }

                .dropdown-menu {
                    z-index: 502;
                }

                .wtai-edit-loading-mask {
                    width: 138px;
                    height: 41px;
                    left: 64px;
                }
            }
        }

        .wtai-category-actions,
        .wtai-product-actions {
            @media screen and (min-width: 1180px) {
                position: sticky;
                top: 0;
                z-index: 501;
            }
        }

        .page-main-actions {
            display: flex;
            flex-wrap: wrap;
            margin-top: 0;

            .wtai-category-identifier-container,
            .wtai-product-identifier-container {
                display: flex;
                flex-direction: column;
                justify-content: center;

                .wtai-sku {
                    max-width: 500px;
                    word-wrap: break-word;
                }
            }

            .wtai-category-name {
                margin-bottom: 0;
                max-width: 460px;
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
            }

            .wtai-product-name {
                margin-right: 40px;
            }

            .wtai-buttons {
                align-items: center;
                display: flex;
                flex-grow: 1;
                justify-content: flex-end;
                margin-top: 20px;

                @media screen and (min-width: 1180px) {
                    margin-top: 0;
                }

                .page-actions-buttons {
                    .wtai-mark-reviewed {
                        align-items: center;
                        width: 100%;

                        @media screen and (min-width: 768px) {
                            width: auto;
                        }

                        label.wtai-disabled {
                            pointer-events: none;
                            opacity: .5;
                        }
                        
                        .admin__control-checkbox.wtai-disabled {
                            pointer-events: none;
                        }

                        .action-default {
                            font-size: 12px;
                            margin-left: 0;
                            min-width: 0;
                            padding-left: 0;

                            @media screen and (min-width: 1180px) {
                                font-size: 16px;
                            }

                            span {
                                line-height: 22px;
                            }
                        }

                        .wtai-tooltip-wrapper {
                            line-height: 10px;
                            margin-left: 0;
                            max-height: 20px;

                            .admin__field-tooltip {
                                margin-top: 0;
                            }
                        }
                    }

                    .wtai-preview-changes {
                        align-items: center;
                        width: 100%;

                        @media screen and (min-width: 768px) {
                            width: auto;
                        }

                        button {
                            @media screen and (min-width: 768px) {
                                margin-left: 0;
                            }

                            + .wtai-tooltip-wrapper {
                                &.wtai-no-display {
                                    display: none;
                                }
                            }

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

                        span {
                            font-size: 12px;

                            @media screen and (min-width: 1180px) {
                                font-size: 16px;
                            }
                        }

                        .wtai-tooltip-wrapper {
                            .admin__field-tooltip {
                                margin-top: 0;
                            }
                        }
                    }

                    .wtai-line-break {
                        display: none;

                        @media screen and (min-width: 768px) {
                            display: block;
                        }

                        @media screen and (min-width: 1180px) {
                            display: none;
                        }
                    }

                    .wtai-save {
                        margin: 10px auto 10px 0;
                        margin: 0;
                        margin-right: 10px;
                        margin-top: 10px;
                        width: auto;
                        order: unset;

                        @media screen and (min-width: 768px) {
                            margin-left: 20px;
                            margin-right: 10px;
                            margin-top: 0;
                        }

                        span {
                            font-size: 12px;

                            @media screen and (min-width: 1180px) {
                                font-size: 16px;
                            }
                        }
                    }

                    .wtai-transfer-action {
                        display: flex;
                    }

                    .wtai-transfer {
                        margin-left: 0;
                        margin-top: 10px;
                        width: auto;

                        @media screen and (min-width: 768px) {
                            margin-top: 0;
                        }

                        + .wtai-tooltip-wrapper {
                            margin-top: 10px;

                            @media screen and (min-width: 768px) {
                                margin-top: 0;
                            }
                        }

                        span:not(.wtai-step) {
                            font-size: 12px;

                            @media screen and (min-width: 1180px) {
                                font-size: 16px;
                            }
                        }
                    }
                }
            }
        }
    }

    .wtai-edit-modal-content._block-content-loading {
        max-height: ~"calc(100vh - 105px)";
        overflow: hidden;

        .loading-mask {
            height: 100%;
            background: #fff;

            .loader {
                margin: 0;
                width: 100%;
                height: 100%;
                background-image: url("../WriteTextAI_WriteTextAI/images/mage-loader.gif");
            }
        }
    }

    button.primary,
    .action-primary {
        background-color: #eb5202;
        border-color: #eb5202;
        color: #ffffff;
    }

    .wtai-step {
        border-radius: 3px;
        background: #4E5051;
        color: #ffffff;
        font-size: 11px;
        font-style: normal;
        font-weight: 600;
        line-height: normal;
        height: 15px;
        padding: 2px 4px;
        margin: auto 0;
        box-sizing: content-box;
        width: max-content;
        flex-shrink: 0;

        &.wtai-mobile-hidden {
            display: none;

            @media screen and (min-width: 1180px) {
                display: block;
            }
        }
    }
    
    .wtai-text-length {
        color: @text-dark2;
        font-size: 11px;
        text-align: right;

        &.wtai-mg {
            margin-top: 5px;
            margin-left: auto;
        }

        .wtai-over-limit {
            color: @text-red;
        }
    }

    .modal-title {
        background-image: url("../WriteTextAI_WriteTextAI/images/logo_writetext.png");
        background-size: contain;
        font-size: 0;
        height: 21px;
        margin-top: -5px;
        width:120px;

        &.wtai-loading {
            background: url("../WriteTextAI_WriteTextAI/images/loader.gif");
            background-position: left center;
            background-repeat: no-repeat;
            background-size: 60px 8px;
        }
    }

    .wtai-field {
        position: relative;
        width: 100%;
    }

    .wtai-highlight-mask {
        border: 1px solid transparent;
        color: transparent;
        line-height: 1.36;
        overflow: auto;
        padding: 8px 10px 6px 10px;
        position: absolute;
        width: 100%;
        white-space: pre-wrap;

        &.wtai-generated {
            animation: blink 1s 1;
        }

        &.wtai-small {
            height: 60px;
        }

        &.wtai-medium {
            height: 194px;
        }

        &.wtai-large {
            bottom: 37px;
            height: 376px;
            line-height: 20px;
            padding: 8px;
            padding-top: 14px;
        }

        + textarea,
        + .mce-tinymce,
        + .mce-tinymce .mce-edit-area {
            position: relative;
        }

        .wtai-highlight-keyword {
            background-color: @bg-red2;
        }

        .wtai-highlight-pronoun {
            background-color: @bg-white2;
        }
    }

    .admin__field-label {
        &.wtai-strong {
            font-weight: 700;
        }

        &wtai-.medium {
            font-size: 13px;
            font-weight: 600;
        }
    }

    .page-actions-buttons.wtai-input-wrapper {
        label.action {
            padding-right: 10px;

            &::before {
                margin-right: 10px;
                margin-top: 2px;
            }
        }
    }

    .wtai-product-name {
        float: left;
        line-height: 45px;
        margin: 0;
        max-width: 460px;
        overflow: hidden;
        padding: 0;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .page-actions-buttons {
        display: flex;
        flex-wrap: wrap;
        position: relative;

        .wtai-step-wrapper {
            width: 100%;
            text-align: right;
            margin-bottom: 10px;

            @media screen and (min-width: 1180px) {
                width: auto;
                margin-bottom: 0;
                align-items: center;
                display: flex;
                margin-right: 10px;
            }
        }

        button span,
        .wtai-mark-reviewed label {
            white-space: nowrap;
        }

        .wtai-mark-reviewed label {
            min-width: 195px;
        }

        .wtai-wtai-line-break {
            visibility: collapse;
        }
    }

    ul {
        list-style: none;
    }

    .wtai-accordion-block {
        border-color: #E3E3E3;
        border-style: solid;
        border-width: 1px 0px;
        margin-top: 20px;

        .wtai-trigger {
            height: 100%;
            position: absolute;
            top: 0;
            width: 100%;
            left: 0;
        }

        &.wtai-keywords-block {
            .admin__collapsible-block-wrapper {
                .admin__collapsible-title {
                    display: flex;
                    align-items: flex-end;
                    gap: 4px;

                    .wtai-accordion-right {
                        display: flex;
                        margin-left: auto;
                        margin-right: 48px;
                        align-items: center;
                        
                        .wtai-item {
                            font-size: 13px;
                            font-weight: 400;
                            margin-right: 16px;

                            .wtai-label {
                                font-weight: 600;
                            }
                        }

                        .wtai-separator {
                            width: 2px;
                            height: 100%;
                            margin-right: 20px;
                            color: #dddd;
                        }
                    }
                }
            }
        }

        &.wtai-keywords-block,
        &.wtai-attributes-block {
            background: @bg-white5;

            [data-role="content"] {
                padding: 0 20px;
            }
        }

        &.wtai-attributes-block {
            [data-role="content"] {
                padding-bottom: 20px;
                padding-top: 5px;
            }
        }
    }

    .admin__collapsible-block-wrapper {
        border: 0;

        &._show {
            .admin__collapsible-title:before {
                content: '\e615';
            }
        }

        .admin__collapsible-title {
            padding: 15px 20px;

            &:before {
                opacity: .6;
                top: 1.8rem;
            }

            h4 {
                display: inline-block;
                margin: 0
            }

            .admin__field-tooltip {
                margin-left: 5px;
                margin-top: 0;
            }
        }
    }

    .wtai-attributes-block {
        .wtai-field-column.wtai-thumbnail-field-column {
            .wtai-premium {
                margin-left: 26px;
            }
        }

        .wtai-field-column.wtai-product-research-data-field-column {
            
            .wtai-image-wrapper {
                .wtai-details {
                    width: 50px;
                    display: block;
                    height: 50px;
                    background-image: url("../WriteTextAI_WriteTextAI/images/img_product_research.svg");
                    background-size: contain;
                    background-repeat: no-repeat;
                    background-position: center;
                }
            }
        }

        .wtai-field-column.wtai-thumbnail-field-column,
        .wtai-field-column.wtai-product-research-data-field-column {
            .admin__field-label {
                display: flex;

                &:before {
                    flex-shrink: 0;
                }
                .wtai-image-wrapper {
                    margin-right: 10px;
                }
            }
        }

        .admin__field-label {
            font-weight: 700;
            text-align: left;

            .wtai-thumbnail-text {
                font-weight: 400;
                font-style: italic;
                font-size: 11px;
            }
        }

        .wtai-wtai-attributes {
            display: flex;

            .wtai-image-wrapper {
                cursor: pointer;
                img {
                    width: 50px;
                    max-width: unset;
                }
            }
        }

        .wtai-attributes {
            display: flex;
            flex-wrap: wrap;
            grid-column-gap: 20px;
            max-height: 300px;
            overflow-y: auto;
            width: ~"calc(100% - 410px)";
            padding-right: 20px;

            .wtai-field {
                display: flex;
                flex: 1 1 ~"calc(50% - 10px)";
                margin-bottom: 15px;
                min-width: 290px;

                &.wtai-select-all {
                    flex: 1 1 100%;
                }
                
                &:first-child {
                    flex: 100%;
                }

                .wtai-field-column {
                    width: 50%;

                    .wtai-details {
                        word-break: break-all;
                    }
                }
            }

            .admin__control-checkbox.wtai-disabled {
                pointer-events: none;
            }

            .admin__field-label {
                margin-right: 20px;
                min-width: 130px;

                &.wtai-disabled {
                    opacity: .5;
                    pointer-events: none;
                }
            }
        }

        .wtai-attributes-right-components {
            flex-grow: 1;
            margin-left: 20px;

            .wtai-other-details {
                .wtai-control {
                    margin-top: 10px;
                }

                textarea {
                    background: @bg-white;
                    border: 1px solid #ADADAD;
                    height: 96px;
                    padding: 12px;
                    resize: none;
                    width: 100%;
                }

                .wtai-note {
                    font-size: 12px;
                }
            }

            .wtai-wtai-additional-prompt {
                padding-top: 10px;
                border-top: 1px solid #E3E3E3;

                .wtai-header {
                    font-weight: 700;
                    text-align: left;
                    display: flex;
                    align-items: center;

                    .admin__field-tooltip.wtai-small {
                        top: -6px;
                        left: 10px;
                    }
                }

                .wtai-textarea {
                    background: #ffffff;
                    border: 1px solid #ADADAD;
                    height: 96px;
                    padding: 12px;
                    resize: none;
                    width: 100%;
                }

                .wtai-header-details {
                    font-size: 12px;
                }

                .wtai-footer-details {
                    font-size: 11px;
                    display: flex;
                    justify-content: flex-end;
                }
            }
        }
    }

    .wtai-toolbar {
        margin-top: 30px;

        &::after {
            display: none;
        }

        .wtai-field {
            width: 100%;
        }

        .lib-clearer();

        .wtai-top {
            background: #f8f8f8;
            padding: 15px 20px;

            @media screen and (min-width: 1180px) {
                display: flex;
                flex-wrap: wrap;
                align-items: center;
            }

            @media screen and (min-width: 1440px) {
                grid-gap: 40px;
            }

            .wtai-step {
                &:not(.wtai-mobile-hidden) {
                    @media screen and (min-width: 1180px) {
                        display: none;
                    }
                }
            }

            .wtai-col-right {
                width: auto;
                margin-top: 20px;

                @media screen and (min-width: 1180px) {
                    margin-top: 0;
                }

                .wtai-right {
                    display: flex;
                    gap: 20px;
                    justify-content: flex-start;

                    @media screen and (min-width: 1180px) {
                        justify-content: flex-end;
                    }
                    
                    .wtai-step {
                        display: block;
                        flex-shrink: 0;
                        @media screen and (min-width: 1180px) {
                            display: block;
                        }
                    }
                    .wtai-field.wtai-action {
                        width: auto;
                    }
                }
            }

            .wtai-col-left {
                grid-gap: 10px;
                display: grid;
                margin-top: 10px;

                @media screen and (min-width: 768px) {
                    grid-template-columns: 1fr 1fr;
                }

                @media screen and (min-width: 1180px) {
                    width: 50%;
                    grid-template-columns: auto 1fr 1fr;
                    margin-top: 0;
                }

                @media screen and (min-width: 1440px) {
                    width: auto;
                    flex-grow: 1;
                    align-items: center;
                }

                &.wtai-guide-steps {
                    @media screen and (min-width: 1180px) {
                        grid-template-columns: 1fr 1fr;
                    }
                }

                .wtai-custom-action-select-wrap {
                    @media screen and (min-width: 1440px) {
                        width: auto;
                        flex-grow: 1;
                    }

                    &.wtai-audience {
                        .admin__action-dropdown-menu {
                            @media screen and (min-width: 768px) {
                                left: auto;
                                right: 0;
                                width: 200%;
                            }

                            @media screen and (min-width: 1180px) {
                                left: 0;
                                right: auto;
                            }

                            .wtai-fieldset:not(.wtai-suggested) {
                                .wtai-field {
                                    @media screen and (min-width: 768px) {
                                        width: 50%;
                                    }
                                }
                            }
                        }
                    }

                    .admin__action-dropdown-menu {
                        min-width: 0;
                        width: 100%;

                        @media screen and (min-width: 768px) {
                            min-width: 570px;
                            width: 200%;
                        }

                        .wtai-fieldset {
                            flex-direction: column;
                            width: 100%;

                            @media screen and (min-width: 768px) {
                                flex-direction: row;
                            }

                            .wtai-tones {
                                width: 100%;

                                .wtai-field {
                                    margin-bottom: 0;
                                    width: 100%;

                                    .admin__control-checkbox.wtai-disabled,
                                    .admin__control-radio.wtai-disabled {
                                        pointer-events: none;
                                    }
                                    
                                    .admin__control-text.wtai-disabled,
                                    label.wtai-disabled {
                                        pointer-events: none;
                                        opacity: .5;
                                    }
                                }
                            }

                            .wtai-separator {
                                display: block;
                                height: 1px;
                                width: 100%;

                                @media screen and (min-width: 768px) {
                                    height: unset;
                                    width: 1px;
                                }
                            }

                            .wtai-styles {
                                width: 100%;

                                .wtai-field {
                                    display: flex;
                                    margin-bottom: 0;
                                    width: 100%;

                                    .admin__control-checkbox.wtai-disabled,
                                    .admin__control-radio.wtai-disabled {
                                        pointer-events: none;
                                    }
                                    
                                    .admin__control-text.wtai-disabled,
                                    label.wtai-disabled {
                                        pointer-events: none;
                                        opacity: .5;
                                    }

                                }
                            }
                        }

                        .wtai-suggested {
                            position: relative;

                            @media screen and (min-width: 768px) {
                                flex-direction: column;
                            }

                            .wtai-field {
                                width: 100%;
                            }
                            
                            label {
                                font-size: 12px;
                                margin-bottom: 0;
                            }
                        }
                    }
                }

                .wtai-dropdown-field {
                    @media screen and (min-width: 1180px) {
                        padding-right: 20px;
                    }

                    @media screen and (min-width: 1440px) {
                        display: flex;
                        height: 34px;
                    }

                    > label {
                        @media screen and (min-width: 1440px) {
                            margin-top: 5px;
                            margin-right: 10px;
                            margin-bottom: 0;
                        }
                    }
                }

                .wtai-field {
                    @media screen and (min-width: 768px) {
                        grid-template-columns: 1fr 1fr;
                    }

                    label {
                        margin-bottom: 10px;

                        &[for^="custom-"].wtai-disabled {
                            pointer-events: none;
                        }
                    }

                    input[name^="tones"].wtai-disabled {
                        pointer-events: none;
                    }

                    label[for^="tone-"].wtai-disabled {
                        pointer-events: none;
                    }
                }

                .admin__field-tooltip {
                    @media screen and (min-width: 1440px) {
                        margin-left: 5px;
                    }
                }
            }

            .wtai-separator {
                width: 40px;
                height: 40px;
                border-radius: 50%;
                background: #EFEFEF;
                display: flex;
                justify-content: center;
                align-items: center;
                margin: 10px auto;

                @media screen and (min-width: 768px) {
                    margin: 20px auto;
                }

                @media screen and (min-width: 1180px) {
                    margin: 10px auto;
                }

                @media screen and (min-width: 1440px) {
                    margin: 0;
                    width: 30px;
                    height: 30px;
                }

                span {
                    color: #303030;
                    font-size: 13px;
                    font-style: normal;
                    font-weight: 600;
                    line-height: normal;
                }
            }

            .wtai-col-right {
                @media screen and (min-width: 1180px) {
                    width: 50%;
                }
                @media screen and (min-width: 1440px) {
                    flex-grow: 1;
                }
            }

            .admin__field-label {
                margin-right: 5px;
            }

            .admin__action-dropdown-menu {
                left: 0;
                margin-top: 2px;
                padding: 0;
            }

            > .wtai-field:not(:last-child) {
                padding-right: 20px;
            }

            .wtai-fieldset {
                display: flex;
                
                &.wtai-tones-and-styles {
                    width: 570px;

                    > div {
                        padding: 20px;
                        width: 50%;
                    }

                    .wtai-separator {
                        height: unset;
                    }

                    .wtai-field.wtai-custom {
                        align-items: flex-end;
                        display: flex;
                        flex-direction: column;

                        input {
                            margin-left: 2.6rem;
                            width: ~"calc(100% - 2.3rem)";
                            &.wtai-disabled {
                                pointer-events: none;
                            }
                        }
                    }

                    .wtai-tones,
                    .wtai-styles {
                        .wtai-field {
                            .wtai-label {
                                text-align: left;
                            }
                        }
                    }
                }

                .wtai-field {
                    margin-bottom: 10px;
                }

                .admin__field-label + .wtai-field {
                    margin-top: 10px;
                }

                .wtai-header {
                    align-items: center;
                    display: flex;
                    margin-bottom: 5px;
                    width: 100%;
                    
                    button {
                        margin-right: -15px;
                        margin-left: auto;
                    }
                }

                &.wtai-audience {
                    flex-wrap: wrap;
                    padding: 10px 20px;
                    width: 566px;

                    .wtai-field {
                        margin-bottom: 0;
                        width: 100%;
                    }
                }

                &.wtai-suggested {
                    border-top: 1px solid #e3e3e3;
                    flex-direction: column;
                    padding: 20px 20px 10px;

                    .admin__control-text {
                        width: 100%;

                        &.wtai-disabled {
                            pointer-events: none;
                            opacity: 0.5;
                            background-color: #e9e9e9;
                            border-color: #adadad;
                            color: #303030;
                        }

                        &._disabled {
                            cursor: text;
                            opacity: 1;
                        }
                    }

                    ul {
                        list-style: none;

                        li {
                            animation: typing 3.5s steps(40, end);
                            cursor: pointer;
                            overflow: hidden;
                            padding: 5px 0;
                            white-space: nowrap
                        }
                    }
                }
            }

            .wtai-actions {
                border-top: 1px solid #adadad;
                display: flex;
                justify-content: space-between;
                padding: 5px;

                .wtai-field {
                    align-items: center;
                    display: flex;
                    width: auto;
                    .lib-tooltip(
                        @_tooltip-border-color: transparent,
                        @_tooltip-color: #303030,
                        @_tooltip-position: top
                    );
    
                    .tooltip-content {
                        box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.3);
                        text-align: center;
                        font-size: 13px;
                    }

                    label {
                        margin-bottom: 0;

                        &:before {
                            margin-top: 10px;

                            @media screen and (min-width: 768px) {
                                margin-top: 0;
                            }
                        }
                    }
                }
            }
        }

        .wtai-bottom {
            padding: 15px 20px;
            grid-gap: 10px;
            display: grid;
            margin-top: 20px;

            @media screen and (min-width: 1180px) {
                display: flex;
                align-items: center;
                justify-content: space-between;
                margin-top: 0;
            }

            .wtai-left {
                display: flex;
    
                .wtai-field {
                    margin-right: 10px;
                    width: auto;
                }
    
                .wtai-separator {
                    margin-right: 10px;
                    background: @bg-white4;
                    width: 1px;
                }
    
                .admin__field-label {
                    align-items: center;
                    display: flex;
                    line-height: normal;
                    text-align: left;
                    user-select: none;
                    color: #2271B1;
                    
                    &:hover {
                        text-decoration: underline;
                    }
                    
                }
    
                .wtai-toggle-accordion {
                    cursor: pointer;
                }
            }
    
            .wtai-right {
                display: flex;
                flex-wrap: wrap;
                grid-gap: 10px;
                position: relative;

                @media screen and (min-width: 768px) {
                    grid-gap: 20px;
                }

                @media screen and (min-width: 1180px) {
                    margin-right: 15px;
                }
    
                button {
                    width: ~"calc(100% - 15px)";

                    @media screen and (min-width: 1180px) {
                        width: auto;
                    }
                }
    
                .wtai-field {
                    @media screen and (min-width: 768px) {
                        width: auto;
                    }

                    &.wtai-option {
                        @media screen and (min-width: 768px) {
                            margin-top: 5px;
                        }
                    }

                    &.wtai-action {
                        @media screen and (min-width: 768px) {
                            flex-grow: 1;
                        }
                    }

                    .admin__control-radio {
                        opacity: 0;
                    }
                }
            }
        }

        .wtai-custom-action-select-wrap {
            display: inline-block;
            position: relative;
            width: ~"calc(100% - 15px)";

            @media screen and (min-width: 768px) {
                width: ~"calc(100% - 20px)";
            }

            @media screen and (min-width: 1180px) {
                width: ~"calc(100% - 15px)";
            }

            &._active {
                z-index: 500;

                .wtai-custom-action-select {
                    border-color: #007bdb;

                    &:before {
                        border-color: #007bdb;
                    }

                    &:after {
                        transform: rotate(180deg);
                    }
                }
            }

            .wtai-custom-action-select {
                background-color: @bg-white;
                font-weight: 400;
                overflow: hidden;
                padding-right: 3.2rem;
                text-align: left;
                text-overflow: ellipsis;
                white-space: nowrap;
                width: 100%;

                &.action-basic {
                    background-color: #514943;
                    padding-right: ~"calc(3.2rem + 15px)";
                }

                &:before {
                    background-color: #e3e3e3;
                    border: 1px solid #adadad;
                    bottom: 0;
                    content: '';
                    position: absolute;
                    right: 0;
                    top: 0;
                    width: 3.2rem;

                    @media screen and (min-width: 1180px) {
                        height: ~"calc(100% - 1px)";
                    }
                }

                &:after {
                    border-color: #000000 transparent transparent transparent;
                    border-style: solid;
                    border-width: .5rem 0.4rem 0 0.4rem;
                    content: '';
                    height: 0;
                    margin-top: -0.2rem;
                    position: absolute;
                    right: 1.2rem;
                    top: 50%;
                    transition: all .2s linear;
                    width: 0;
                }
            }
        }
    }

    .wtai-accordion-block.wtai-gallery-block,
    .wtai-accordion-block.wtai-text-block {
        border: 0;
        margin-top: 10px;
        background: #f8f8f8;

        .admin__collapsible-title {
            display: flex;
            position: relative;

            .admin__control-checkbox + .admin__field-label:before {
                margin-top: 4px;
            }

            .admin__control-checkbox:disabled + .admin__field-label {
                padding-left: 0;
                
                &:before {
                    display: none;
                }
            }

            .wtai-field {
                width: auto;
                z-index: 1;
                
            }

            .wtai-trigger {
                height: 100%;
                position: absolute;
                top: 0;
                width: 100%;
                left: 0;
            }
        }

        .admin__field > .admin__field-label span[data-config-scope] {
            margin-left: 5px;
            vertical-align: text-top;

            &:before {
                bottom: auto;
                position: relative;
            }
        }
        
        .wtai-field .wtai-control {
            textarea {
                &.wtai-disabled {
                    opacity: unset;
                }
            }
        }

        [data-role="content"] {
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
            margin-bottom: 40px;
            padding: 10px 20px;
            position: relative;

            @media screen and (min-width: 1180px) {
                padding: 20px 74px;
            }

            > div.messages {
                width: 100%;
                margin-bottom: 20px;

                @media screen and (min-width: 1101px) {
                    width: ~"calc(50% - 45px)";
                }
            }

            .wtai-field-transfer-wrapper {
                margin: 10px auto;
                position: relative;
    
                @media screen and (min-width: 1180px) {
                    margin: auto;
                }

                &:hover .wtai-transfer-tooltip {
                    display: block;
                }

                .wtai-transfer-tooltip {
                    display: none;
                    position: absolute;
                    left: 50%;
                    background: #FFFFFF;
                    padding: 10px;
                    border-radius: 1px;
                    box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.3);
                    top: -150%;
                    width: max-content;
                    transform: translate(-50%);
                    z-index: 1;

                    &:hover {
                        display: block;
                    }

                    &::after {
                        border-color: #fff transparent transparent transparent;
                        border-style: solid;
                        border-width: 10px;
                        top: 100%;
                        content: "";
                        left: 50%;
                        transform: translate(-50%);
                        position: absolute;
                    }

                    .wtai-transfer-tooltip-content {
                        color: #2C3338;
                        font-size: 14px;
                        font-style: normal;
                        font-weight: 400;
                        line-height: normal;
                    }
                }

                .wtai-field-transfer {
                    border-radius: 4px;
                    background-color: #eb5202;
                    border-color: #eb5202;
                    display: flex;
                    width: 40px;
                    height: 40px;
                    flex-direction: column;
                    justify-content: center;
                    align-items: center;
                    background-image: url("../WriteTextAI_WriteTextAI/images/ic_transfer.png");
                    background-size: 16px;
                    background-repeat: no-repeat;
                    background-position: center;
                    transform: rotate(90deg);
                    
                    @media screen and (min-width: 1180px) {
                        transform: unset;
                    }
                }
            }

            .wtai-image-row {
                display: flex;
                flex-wrap: wrap;
                justify-content: space-between;
                flex-grow: 1;
                width: 100%;

                .wtai-field .wtai-control {
                    textarea {
                        background: transparent;
    
                        &.wtai-disabled {
                            background: #f7f7f7;
                            opacity: unset;
                        }
                    }
                }
            }

            .wtai-field-wrapper {
                display: flex;
                flex-wrap: wrap;
                justify-content: space-between;
                align-items: center;

                &:last-child {
                    flex: 1 1 80%;
                    margin-left: 40px;
                }

                .wtai-field:not(.admin__field):first-child {
                    width: auto;

                    label {
                        display: flex;
                        align-items: center;
                    }
                }
            }

            .wtai-image-wrapper {
                display: flex;
                flex-wrap: wrap;
                justify-content: space-between;
                align-items: center;
                cursor: pointer;
            }
            
            .wtai-field {
                width: ~"calc(50% - 45px)";

                .wtai-text-label {
                    &.wtai-long-text {
                        max-width: 40%;
                        text-align: left;

                        @media screen and (min-width: 1180px) {
                            display: block;
                            max-width: 100%;
                        }

                        @media screen and (min-width: 1220px) {
                            display: inline-block;
                            max-width: 40%;
                        }

                        @media screen and (min-width: 1440px) {
                            max-width: 264px;
                        
                        }

                        @media screen and (min-width: 1697px) {
                            max-width: unset;
                        }

                        &.wtai-image-alt-text-label {
                            @media screen and (min-width: 1440px) {
                                max-width: 40%;
                            }

                            @media screen and (min-width: 1697px) {
                                max-width: unset;
                            }
                        }
                    }
                }

                .wtai-generate-status,
                .wtai-transfer-status {
                    font-size: 11px;
                    font-style: normal;
                    font-weight: 600;
                    line-height: normal;
                    border-radius: 3px;
                    padding: 4px;
                    margin-left: 5px;

                    &.wtai-transferred {
                        background: #d0e5a9;
                        color: #185b00;
                    }

                    &.wtai-not-transferred {
                        color: #C35F5F;
                        background: #FFE9E9;
                    }
                }

                &.admin__field {
                    margin-top: 0;
                }

                .wtai-control {
                    margin-top: 10px;
                    position: relative;

                    &:hover .wtai-disabled-tooltip-wrapper {
                        .wtai-disabled-tooltip {
                            display: block;
                        }
                    }

                    &.wtai-disabled {
                        cursor: not-allowed;

                        .tox-tinymce,
                        .mce-tinymce {
                            opacity: .5;
                            pointer-events: none;

                            .tox-edit-area,
                            .mce-edit-area {
                                background: #f7f7f7;

                                .tox-edit-area__iframe {
                                    background-color: #f7f7f7;
                                }
                            }
                        }

                        .wtai-highlight-mask {
                            background: #f7f7f7;
                        }
                    }

                    .tox-tinymce {
                        min-height: 452px;
                    }

                    .tox-tinymce,
                    .mce-tinymce {
                        padding-right: 1px;
                        
                        &.wtai-generated {
                            animation: blink 1s 1;
                        }
                        
                        .tox-edit-area,
                        .mce-edit-area {
                            background: #ffffff;

                            .tox-edit-area__iframe {
                                background-color: #ffffff;
                            }
                        }
                    }

                    .wtai-highlight-mask {
                        background: #ffffff;
                    }

                    textarea {
                        background: transparent;
                    }

                    /** mask field */
                    .mce-tinymce:first-child {
                        position: absolute;
                    }

                    /** original field */
                    .wtai-highlight-mask + .mce-tinymce {
                        background: transparent;

                        .mce-edit-area {
                            background: transparent;
                        }
                    }

                    /** mask field */
                    .wtai-highlight-mask + .tox-tinymce {
                        position: absolute;
                    }

                    /** original field */
                    textarea + .tox-tinymce {
                        background-color: transparent;

                        .tox-edit-area {
                            background-color: transparent;

                            .tox-edit-area__iframe {
                                background-color: transparent;
                            }
                        }
                    }

                    &.wtai-current {
                        display: flex;
                        flex-wrap: wrap;

                        .tox-tinymce,
                        .mce-tinymce {
                            &:first-child {
                                position: relative;
                            }

                            .tox-edit-area,
                            .mce-edit-area {
                                background: #f7f7f7;
                                /* Need !import to overrider tinymce inline style*/
                                border-width: 0 !important;

                                .tox-edit-area__iframe {
                                    background-color: #f7f7f7;
                                }
                            }
                        }

                        .wtai-field-content {
                            margin-top: 5px;
                        }
                    }

                    .row {
                        display: flex;
                        justify-content: space-between;
                    }
                }

                textarea {
                    resize: none;
                }

                .tox-tinymce,
                textarea {
                    &:hover + .wtai-disabled-tooltip-wrapper {
                        .wtai-disabled-tooltip {
                            display: block;
                        }
                    }

                    + .wtai-disabled-tooltip-wrapper {
                        .wtai-disabled-tooltip {
                            display: none;
                            position: absolute;
                            left: 50%;
                            background: #FFFFFF;
                            padding: 10px;
                            border-radius: 1px;
                            box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.3);
                            top: -50px;
                            transform: translate(-50%);
                            z-index: 1;
                            width: max-content;

                            &:hover {
                                display: block;
                            }

                            &::after {
                                border-color: #fff transparent transparent transparent;
                                border-style: solid;
                                border-width: 10px;
                                top: 100%;
                                content: "";
                                left: 50%;
                                position: absolute;
                                transform: translate(-50%);
                            }

                            .wtai-disabled-tooltip-content {
                                color: #2C3338;
                                font-size: 14px;
                                font-style: normal;
                                font-weight: 400;
                                line-height: normal;
                            }
                        }
                    }
                }

                textarea,
                .wtai-value-wrapper {
                    border: 1px solid rgba(173, 173, 173, 0.5);
                    line-height: 19px;
                    overflow: auto;
                    width: 100%;

                    &.wtai-small {
                        height: 60px;
                    }
                    &.wtai-medium {
                        height: 194px;
                    }
                    &.wtai-large {
                        height: 452px;
                    }
                }

                .wtai-value-wrapper {
                    padding: 10px;
                    background: #F7F7F7;

                    ul {
                        list-style: unset;
                    }

                    ol, ul {
                        list-style-position: inside;
                    }
                }
            }
            .admin__field.row {
                display: flex;
                margin-bottom: 20px;
                width: 100%;

                .wtai-control {
                    margin-left: 15px;
                    margin-top: 0;

                    .wtai-label {
                        font-size: 13px;
                        margin-right: 5px;
                    }
                }
            }

            .wtai-row {
                width: 100%;
            }
            .wtai-flex-container {
                display: flex;
                width: ~"calc(50% - 45px)";
                flex-wrap: wrap;
                justify-content: space-between;
                .admin__field.row {
                    width: auto;
                }
            }
        }
    }

    .wtai-accordion-block.wtai-gallery-block {
        .admin__collapsible-block-wrapper {
            &._hide {
                margin-bottom: 40px;
            }

            .admin__collapsible-title {
                .admin__control-checkbox._disabled {
                    opacity: 0;
                }
            }
        }

        [data-role="content"] .wtai-image-wrapper {
            width: 75px;
        }
    }

    .wtai-accordion-block.wtai-text-block {
        [data-role="content"] {
            .wtai-field {
                .admin__field-label::before {
                    /** display: none; */
                }
            }
        }
    }

    .modal-header {
        margin-bottom: 0;

        .action-close {
            z-index: 9999;
            top: 0;
            padding: 1.6rem 2.6rem;
        }
        
        .page-main-actions {
            background: none;
            border: 0;
            margin: 0;
            padding: 10px 0 0;
            position: absolute;
            right: 88px;
            top: -5px;

            .page-actions-buttons {
                align-items: center;
            }

            [data-role="action"] {
                padding: 0;

                span {
                    font-size: 11px;
                }

                &.action {
                    height: 45px;
                    padding: 7px 10px 8px 0;

                    &:before {
                        content: '';
                        display: inline-block;
                        height: 20px;
                        margin: auto;
                        width: 20px;
                        position: relative;
                        bottom: -5px;
                    }
                }

                &.wtai-link-preview {
                    padding-right: 10px;

                    &.wtai-no-display {
                        display: none;
                    }
                    
                    &:before {
                        background: url(../WriteTextAI_WriteTextAI/images/ic_link_preview.png) no-repeat center;
                        background-size: 19px;
                    }
                }

                &.wtai-history-log {
                    margin-left: 10px;

                    &:before {
                        background: url(../WriteTextAI_WriteTextAI/images/ic_history.png) no-repeat center;
                        background-size: contain;
                    }
                }

                &.action-default {
                    background: #e3e3e3;
                    border-color: #adadad;
                    color: #514943;
                    height: 33px;
                    line-height: 33px;
                    margin-left: 10px;
                    margin-right: 0;
                }

                &.action-previous {
                    margin-left: 10px;
                }
            }
        }
    }

    .wtai-beta-note {
        font-size: 11px;
        font-weight: 700;
    }
    
    .modal-content {
        padding-bottom: 0;
    }
}

.wtai-history-log-overlay {
    opacity: 0;
}

.wtai-error-messages {
    @media screen and (min-width: 1180px) {
        position: sticky;
        top: 96px;
        z-index: 501;
    }

    .message {
        display: flex;
        align-items: center;
    }
}

.wtai-edit-history-log {
    color: @text-dark;
    left: auto;

    .modal-title {
        font-size: 16px;
        font-weight: 700;
    }

    .modal-content {
        height: 100%;
        overflow-y: scroll !important;
        padding: 0;

        .loader {
            background-color: transparent;
            background-size: 27px;
            height: 30px;
            width: 50px;
        }
    }

    .wtai-history-log-modal {
        font-size: 13px;
        max-width: ~"calc(100vw - 20px)";
        padding: 20px 0;
        width: 600px;
    }

    .wtai-actions {
        border-bottom: 1px solid #E3E3E3;
        padding: 0 20px 20px;
    }

    .wtai-history-log-filter-form {
        display: flex;
        flex-wrap: wrap;
        grid-gap: 10px;
        justify-content: space-between;

        .wtai-control {
            position: relative;
            width: ~"calc(50% - 5px)";

            @media screen and (min-width: 768px) {
                width: auto;
            }

            .admin__control-select,
            .admin__control-text {
                width: 100%;

                @media screen and (min-width: 768px) {
                    width: 15rem;
                }
            }
        }

        .action-basic {
            width: ~"calc(50% - 5px)";

            @media screen and (min-width: 768px) {
                width: auto;
            }
        }
    }
    .wtai-accordion-block {
        border-bottom: 1px solid #E3E3E3;
        padding: 0 20px;

        .admin__collapsible-block-wrapper {
            border: none;
        }
        .wtai-date {
            font-size: 16px;
            margin-bottom: 0;
        }

        .wtai-product-name {
            color: @text-red;
            display: inline-block;
            font-size: 13px;
            margin-bottom: 0;
            margin-top: .5rem;
            text-decoration: underline;
        }
        .wtai-editor {
            color: @btn-dark;
            font-size: 13px;
            margin-bottom: 0;
            margin-top: .5rem;
        }

        .wtai-text-type {
            font-weight: 600;
            
            &::first-letter {
                text-transform: uppercase;
            }
        }

        .wtai-text-content {
            margin-bottom: 13px;
            margin-top: 13px;
            margin-left: 0;
            overflow-wrap: break-word;

            li {
                margin-bottom: 10px;
            }

            ul {
                list-style: unset;
            }

            ol,
            ul {
                list-style-position: inside;
            }

            img {
                height: auto;
            }
        }

        [data-role='content'] {
            padding-bottom: 20px;
        }
    }

    .wtai-no-result {
        color: @btn-dark;
        padding-top: 20px;
        text-align: center;
    }

    .wtai-footer-actions {
        padding-top: 20px;
        text-align: center;

        .wtai-no-more {
            color: @btn-dark;
        }
    }
}

.wtai-guide-steps {
    display: flex;
    align-items: center;
}

.wtai-page-title-loading-mask,
.wtai-page-description-loading-mask,
.wtai-category-description-loading-mask,
.wtai-product-description-loading-mask,
.wtai-short-description-loading-mask,
.wtai-open-graph-loading-mask,
.wtai-gallery-loading-mask,
.wtai-edit-loading-mask,
.wtai-audience-loading-mask {
    background: transparent;
    bottom: 0;
    display: none;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    z-index: 2003;

    &.wtai-show {
        display: block;
    }
}