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

.wtai-trigger-settings-wrapper {
    display: flex;
    justify-content: center;

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

    .wtai-trigger-settings {
        position: relative;
    
        .wtai-dropdown-trigger {
            border-radius: 900px;
            border: 0;
            background-color: #FFFFFF;
            box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.2);
            padding: 8px 10px;
            font-size: 12px;
    
            &::after {
                content: '\e628';
                font-family: 'Admin Icons';
                font-size: 10px;
                position: relative;
                margin-left: 4px;
                top: 1px;
            }
    
            &.active {
                &::after {
                    content: '\e62b';
                }
            }
        }
        .wtai-dropdown-content {
            display: none;
        }
    
        &.active {
            .wtai-dropdown-content{
                height: auto;
                opacity: 1;
                visibility: unset;
                position: absolute;
                right: 0px;
                min-width: 441px;
                display: block;
                left: 0px;
                top: 100%;
                /*min-width: unset;*/
                transform: unset;
                z-index: 1;
                box-shadow: 0 0 6px 0px rgba(0, 0, 0, 0.35);
                margin-top: 4px;
                border-radius: 8px;
                padding: 10px;
                overflow: unset;
                background-color: #fff;

                &.wtai-left-middle {
                    left: unset;
                    right: 105%;
                    top: unset;
                    bottom: 50%;
                    transform: translateY(50%);
                }
                &.wtai-right-middle {
                    left: 105%;
                    right: unset;
                    top: unset;
                    bottom: 50%;
                    transform: translateY(50%);
                }

                &.wtai-right-middle,
                &.wtai-left-middle {
                    &.wtai-adjust-top {
                        bottom: 70%;
                        transform: translateY(70%);
                    }
                    &.wtai-adjust-bottom {
                        bottom: 30%;
                        transform: translateY(30%);
                    }
                }

                &.wtai-top-right {
                    top: unset;
                    bottom: 105%;
                }

                &.wtai-top-left {
                    top: unset;
                    bottom: 105%;
                    left: unset;
                }

                &.wtai-bottom-left {
                    left: unset;
                }

                &.wtai-bottom-right,
                &.wtai-bottom-left {
                    .wtai-dropdown-actions {
                        .wtai-dropdown-action-container {
                            .wtai-dropdown-more-actions {
                                margin-top: 0px;
                                bottom: 100%;
                                margin-bottom: 6px;
                                border-radius: 5px 5px 0px 0px;
                                box-shadow: rgba(0, 0, 0, 0.2) 0px -1px 8px 0px;
                                right: 0px;
                                left: unset;
                            }
                        }
                    }
                }
                
                    
                &.wtai-hide-initially {
                    display: none;
                }
    
                .wtai-dropdown-block {
                    margin-bottom: 10px;
    
                    .wtai-fields-container {
                        text-align: left;
                        font-size: 13px;
                        font-weight: 400;
                        line-height: 17px;
    
                        fieldset.wtai-fieldset {
                            border: none;
                            border-bottom: solid 1px #E3E3E3;
                            padding: 0;
                            padding-bottom: 10px;

                            .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);
                                font-size: 13px;
                                font-weight: 400;
                                right: unset;
                                left: 25px;
                                bottom: 50%;
                                &::before {
                                    left: 50%
                                }
                                &::after {
                                    left: 50%
                                }
                            }
    
                            .wtai-fieldset-title {
                                font-weight: 600;
                                margin-bottom: 10px;
                                margin-top: 10px;

                                &.wtai-ato-title {
                                    margin-bottom: 0;
                                }
                            }

                            .wtai-fieldset-subtitle {
                                margin-bottom: 10px;
                                font-style: italic;
                                font-size: 11px;
                                margin-top: 5px;
                            }
    
                            .wtai-field-columns {
                                -webkit-column-count: 2;
                                -moz-column-count: 2;
                                column-count: 2;
                                column-gap: 0;
                            }
    
                            .wtai-fieldset-row,
                            .wtai-field-column {
                                padding: 5px 0;
                            }
                        }

                        fieldset.wtai-fieldset {
                            &.wtai-disabled {
                                cursor: not-allowed;
                                .wtai-field-column,
                                .wtai-fieldset-row {
                                    opacity: 0.5;
                                    cursor: not-allowed;
                                }
                                
                                .admin__control-radio,
                                .wtai-label.admin__field-label {
                                    cursor: not-allowed;
                                }
                            }
                        }
                    }
    
                    .wtai-label-with-input {
                        display: flex;
                        column-gap: 5px;
                        flex-wrap: wrap;
                        
                        .wtai-control {
                            margin-top: -9px;
    
                            .ui-button {
                                padding: 0;
                                border: 0;
                            }
                        }
                    }
    
                    .wtai-label.admin__field-label {
                        text-align: left;
                    }
                }
    
                .wtai-row {
                    display: flex;
                    justify-content: flex-end;
                }
    
                .wtai-dropdown-actions {
                    display: flex;
                    font-size: 13px;
                    font-weight: 400;
                    line-height: 17px;
                    position: relative;
    
                    .wtai-pipeline-setting-btn {
                        background-color: #eb5202;
                        color: #fff;
                        font-size: 13px;
                        font-weight: 400;
                        border: 0;
    
                        &.wtai-apply-settings {
                            border-radius: 3px 0 0 3px;
                        }
    
                        &.wtai-apply-more-settings {
                            border-radius: 0 3px 3px 0;
                            height: 100%;
                            margin-left: 2px;
                            position: relative;
                        }
                    }
    
                    .wtai-dropdown-action-container {
                        .wtai-apply-more-settings {
                            &:after {
                                border-color: #ffffff transparent transparent transparent;
                                border-style: solid;
                                border-width: .5rem 0.4rem 0 0.4rem;
                                content: '';
                                height: 0;
                                margin-top: -0.2rem;
                                position: absolute;
                                top: 50%;
                                transition: all .2s linear;
                                width: 0;
                                left: 50%;
                                transform: translate(-43%);
                            }
    
                            &.active {
                                &:after {
                                    transform: translate(-43%) rotate(180deg);
                                }
                            }
                        }
    
                        .wtai-dropdown-more-actions {
                            position: absolute;
                            z-index: 2;
                            display: none;
                            left: 0;
                            margin-top: 13px;
                            background-color: #fff;
                            box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.2);
                            border-radius: 0 0 5px 5px;
    
                            &.active {
                                display: block;
                            }
    
                            li {
                                background-color: unset;
                                border-radius: unset;
                                width: 200px;
                                text-align: left;
                                
                                .wtai-dropdown-action {
                                    color: #303030;
                                    text-decoration: none;
                                    
                                    &:hover {
                                        color: #303030;
                                        text-decoration: none;
                                        background-color: #ffd5bf;
                                        display: block;
                                    }
                                    
                                    span {
                                        width: 100%;
                                        display: block;
                                        padding: 5px;
                                    }
                                }
                            }
                        }
                    }
                }
        
                .ui-dialog-buttonpane {
                    padding: 0;
                    display: none;
                }
            }
        }
    }
}