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

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

@border-light: #c3c4c7;

.admin__data-grid-header-row .wtai-status-filter.action-select-wrap {
    display: flex;

    .admin__field-tooltip {
        left: 5px;
    }

    .wtai-filter-by {
        display: flex;
        grid-gap: 20px;
        padding: 10px 20px;
        border-bottom: solid 1px @border-light;

        .admin__field-label {
            cursor: pointer;
        }
    }

    .action-menu {
        z-index: 1;
        width: 562px;
        max-width: 562px;
        left: unset;

        @media screen and (min-width: @screen__l) {
            left: 0;
        }


        &.wtai-filter-by-keyword,
        &.wtai-filter-by-template {
            width: auto;
            min-width: 400px;

            .wtai-top {
                grid-template-columns: 1fr;

                .wtai-col-right {
                    width: unset;
                }
            }
        }
        
        &.wtai-filter-by-template {
            min-width: 490px;
            
            .wtai-template-fields {
                display: flex;
                flex-direction: column;
                gap: 13px;

                .wtai-templates-filter-group {
                    display: flex;
                    justify-content: space-between;
                    align-items: center;

                    .wtai-select-template-filter {
                        width: 215px;
                        &[disabled] {
                            cursor: not-allowed;
                        }
                    }
                }
            }
            
        }

        .wtai-top .wtai-col-right {
            .wtai-template-fields {
                .wtai-templates-filter-group {
                    .wtai-field.admin__scope-old {
                        margin-bottom: 0;
                    }
                }
            }
        }
    }

    .wtai-top {
        display: grid;
        grid-template-columns: 223px auto;
        
        .admin__field-label {
            text-align: left;
            cursor: pointer;
            
            .wtai-review-status-addtl-text {
                font-style: italic;
            }
        }

        .wtai-col-left {
            padding: 20px;

            .wtai-field {
                margin: 10px 0;

                &:first-child {
                    margin-top: 0;
                }
            }
        }

        .wtai-col-middle {
            border-left: solid 1px @border-light;
            border-right: solid 1px @border-light;
            padding: 20px;

            .wtai-field {
                margin: 10px 0;
                
                &:first-child {
                    margin-top: 0;
                }
            }

            .wtai-ai-status {
                .wtai-field {
                    margin-left: 20px;
                }
            }

            .wtai-keyword-status {
                .wtai-field {
                    display: flex;
                    align-items: center;

                    .input-radio {
                        min-width: 16px;
                    }
                }
            }
        }
        
        .wtai-col-right {
            padding: 20px;
            width: 488px;

            .wtai-field.admin__scope-old {
                display: flex;
                margin-bottom: 10px;
                gap: 5px;

                input.input-radio {
                    margin-top: 3px;
                    flex-shrink: 0;
                }

                label.admin__field-label {
                    width: 90%;
                    line-height: 20px;
                    cursor: pointer;
                }
            }

            .wtai-ai-status {
                .wtai-field {
                    margin-left: 20px;
                }
            }
        }

    }

    .wtai-bottom {
        align-items: center;
        border-top: solid 1px @border-light;
        display: flex;
        padding: 20px;

        ._disabled {
            opacity: .5;
            pointer-events: none;
        }

        .ui-spinner {
            margin: 0 10px;
            max-width: 67px;
        }
    }

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