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

@screen__t: 768px;
@screen__m: 1180px;
@screen__l: 1440px;
@screen__xl: 1600px;


.modal-popup.wtai-bulk-full-automation-popup {
    
    .modal-inner-wrap {
        .modal-content {
            .wtai-bulk-full-automation-form-container {
                @media screen and (min-width: @screen__m) and (min-height: 600px){
                    height: 70vh;
                    overflow: auto;
                }

                // @media screen and (min-width: @screen__m) and (min-height: 700px){
                //     height: calc(350px - 54px);
                // }

                // @media screen and (min-width: @screen__m) and (min-height: 800px){
                //     height: calc(400px - 54px);
                // }

                @media screen and (min-width: @screen__m) and (min-height: 850px){
                    height: unset;
                    overflow: unset;
                }
            }
            form {
                .wtai-form-fields {
                    .wtai-tabs {
                        .item.content.wtai-tab-content {
                            &.wtai-text-type-tab {
                                padding: 20px;
                                .wtai-field {
                                    height: 35px;
                                    display: flex;
                                    align-items: center;
                                }

                                .wtai-text-introduction {
                                    margin-bottom: 20px;
                                }
                            }

                            @media screen and (min-width: @screen__m) and (min-height: 600px){
                                min-height: 351px;
                            }
            
                            @media screen and (min-width: @screen__m) and (min-height: 850px){
                                min-height: unset;
                                height: 450px;
                            }
                        }
                    }
                    .wtai-col.wtai-col-1 {
                        .row {
                            @media screen and (min-width: @screen__m) and (min-height: 600px){
                                height: 300px;
                                min-height: 349px;
                            }
                            @media screen and (min-width: @screen__m) and (min-height: 850px){
                                height: 448px;
                                min-height: unset;
                            }
                        }
                    }
                    .wtai-col.wtai-col-2 {
                        .row.wtai-product-attributes {
                            @media screen and (min-width: @screen__m) and (min-height: 600px){
                                min-height: 251px;
                            }

                            @media screen and (min-width: @screen__m) and (min-height: 850px){
                                min-height: unset;
                                height: 350px;
                            }
                        }
                    }
                }
                

                .wtai-actions-box {
                    border-radius: 8px;
                    padding: 18px 16px 16px 16px;
                    margin-bottom: 18px;
                    max-width: 320px;
                    font-size: 13px;
                    display: flex;
                    flex-direction: column;
                    gap: 10px;
                    box-sizing: border-box;
                    margin-right: 20px;
                    padding: 0;
                }
                .wtai-action-group {
                    margin-bottom: 0;
                    background-color: #ffe4d5;
                    border-radius: 3px;
                    padding: 10px;

                    &.wtai-transfer-action {
                        background-color: #EFEFEF;
                        &.wtai-cron-not-available {
                            .admin__control-checkbox[disabled] + label {
                                opacity: 0.5;
                            }
                            .wtai-action-title {
                                color: #DC3232;
                                .wtai-status-icon {
                                    &::after {
                                        background-image: url("../WriteTextAI_WriteTextAI/images/generate-error.png");
                                        background-color: transparent;
                                        background-position: center center;
                                        background-repeat: no-repeat;
                                        background-size: contain;
                                        content: "";
                                        display: inline-block;
                                        vertical-align: middle;
                                        width: 15px;
                                        height: 15px;
                                        mix-blend-mode: multiply;
                                    }
                                    .lib-tooltip(
                                        @_tooltip-border-color: transparent,
                                        @_tooltip-color: #303030,
                                        @_tooltip-position: bottom
                                    );

                                    .tooltip-content {
                                        box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.3);
                                        font-size: 14px;
                                        font-weight: 400;
                                    }
                                }
                            }
                        }
                    }

                    .admin__control-checkbox[disabled] + label {
                        opacity: 1;

                        &::before {
                            opacity: 0.5;
                        }
                    }

                    &.wtai-transfer-action.wtai-auto-transfer-selected {
                        background-color: #ffe4d5;
                        .wtai-action-title {
                            .wtai-status-icon {
                                &::after {
                                    content: '\e62d';
                                    display: inline-block;
                                    font-family: 'Admin Icons';
                                    margin-left: 5px;
                                    font-size: 13px;
                                    font-weight: 400;
                                    text-align: right;
                                    color: #eb5202;
                                }
                            }
                        }
                    }
                    &:not(.wtai-transfer-action) {
                        .wtai-action-title {
                            .wtai-status-icon {
                                &::after {
                                    content: '\e62d';
                                    display: inline-block;
                                    font-family: 'Admin Icons';
                                    margin-left: 5px;
                                    font-size: 13px;
                                    font-weight: 400;
                                    text-align: right;
                                    color: #eb5202;
                                }
                            }
                        }
                    }
                }
                .wtai-action-title {
                    font-size: 14px;
                    font-weight: 600;
                    margin-bottom: 6px;
                    display: flex;
                    justify-content: space-between;
                }
                .wtai-action-label {
                    display: flex;
                    align-items: center;
                    gap: 8px;
                    font-size: 13px;
                }
                .wtai-action-text {
                    font-size: 13px;
                }
                .wtai-action-note {
                    margin-top: 8px;
                    font-size: 12px;
                    font-style: italic;
                    color: #6c7a89;
                }
                .wtai-action-note-bold {
                    font-weight: 600;
                    font-size: 13px;
                    font-style: italic;
                }
                @media (max-width: 767px) {
                    .wtai-actions-box {
                        max-width: 100%;
                        width: 100%;
                        border-radius: 0;
                        padding: 16px 8px 14px 8px;
                    }
                }
                .wtai-form-fields {
                    .wtai-tabs {
                        .item.title.wtai-tab-title {
                            float: unset;
                            margin: 0;
                            
                            @media screen and (min-width: @screen__m) {
                                margin-right: 10px;
                                float: left;
                            }

                            .wtai-sub-title {
                                display: block;
                                font-size: 11px;
                                font-weight: 400;
                                color: #1D232799;
                                margin-top: 2px;

                                &.wtai-sub-title-changed {
                                    font-style: italic;
                                }
                            }

                            &[aria-expanded="true"] {
                                @media screen and (min-width: @screen__m) {
                                    padding-bottom: 5px;
                                    border-bottom: 2px solid #ffffff;
                                }

                                .switch {
                                    background-color: #ffffff;
                                    height: auto;
                                    color: #1D2327;
                                    opacity: 1;
                                    font-weight: 600;
                                    @media screen and (min-width: @screen__m) {
                                        border: 1px solid #d1d1d1;
                                        border-bottom: 3px solid #ffffff;
                                        padding-bottom: 8px;
                                    }

                                    &:hover {
                                        background-color: #ffffff;
                                    }
                                }
                            }

                            &.active {
                                > .switch:hover,
                                > .switch:focus {
                                    padding-bottom: 8px;
                                }
                            }
                            > .switch {
                                border: unset;
                            }
                            .switch {
                                color: #1D2327;
                                height: auto;
                                padding: 1rem;
                                font-size: 13px;
                                font-weight: 400;
                                -moz-border-radius: 0;
                                line-height: unset;
                                -webkit-border-radius: 3px 3px 0 0;
                                background-color: #EEEEEE;
                                border-bottom: 1px solid #d1d1d1;

                                &:hover {
                                    background: #EEEEEE;
                                }

                                &:active {
                                    background: #EEEEEE;
                                    color: rgba(29, 35, 39, 0.6);
                                    text-decoration: none;
                                }

                                @media screen and (min-width: @screen__m) {
                                    border-bottom: none;
                                    border-radius: 12px 12px 0 0;
                                }
                            }
                        }
                    }

                    .wtai-optimization-settings-container {
                        .wtai-tabs {
                            min-width: unset;
                            width: unset;
                            padding-right: 0;
                            .item.content.wtai-tab-content {
                                padding: 20px;
                                float: unset;
                                margin-left: 0;
                                margin-top: 0;
                                border-top: none;
                                height: auto;
                                min-height: unset;

                                @media screen and (min-width: @screen__m) {
                                    float: right;
                                    margin-left: -100%;
                                    margin-top: 55px;
                                    border-top: 1px solid #e3e3e3;
                                }
    
                            }
                        }
                        .wtai-tabs-container {
                            margin-bottom: 20px;
                    
                            .tabs-horiz {
                                li {
                                    &.ui-state-default {
                                        border-radius: 13px 13px 0 0;
                                        background: #EEEEEE;
                                        border: unset;
                                        border-bottom: unset;
                                    }
                                    &.ui-state-default.ui-state-active {
                                        background: #ffffff;
                                        border: 0.1rem solid #d1d1d1;
                                        border-bottom: unset;
                    
                                        .ui-tabs-anchor {
                                            border-top: unset;
                                            padding-top: 1rem;
                                        }
                                    }
                                    .ui-tabs-anchor {
                                        padding: 1rem 1rem 1rem;
                                        padding-left: 10px;
                                        padding-right: 10px;
                    
                                        span {
                                            font-size: 13px;
                                        }
                    
                                        span.wtai-sub-title {
                                            display: block;
                                            font-size: 11px;
                                            font-weight: 400;
                                            color: #1D232799;
                                        }
                                    }
                                }
                            }
                    
                            .wtai-tab-content {
                                border: 1px solid #d1d1d1;
                    
                                .wtai-fieldset-subtitle {
                                    margin-top: 5px;
                                    margin-bottom: 10px;
                                    font-style: italic;
                                    font-size: 11px;
                                }
                    
                                .wtai-field-column {
                                    .wtai-label-with-input {
                                        display: flex;
                                        gap: 10px;
                    
                                        .wtai-control {
                                            position: relative;
                                            bottom: 7px;
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }

        .modal-footer {
            .action-primary {
                background-color: #eb5202;
                border-color: #eb5202;
                color: #ffffff;
            }
        }
    }

    .wtai-field-product-texts {
        .wtai-fieldset-row {
            padding: 5px 0;
        }
        .wtai-field-columns {
            -webkit-column-count: 2;
            -moz-column-count: 2;
            column-count: 2;
            column-gap: 0;

            .wtai-field-column {
                padding: 5px 0;
            }
        }
    }
}