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

.wtai-edit-keyword-analysis {
    .modal-header {
        border-bottom: 1px solid #C3C4C7;
    }

    .modal-content {
        padding-bottom: 20px;

        .wtai-go-to-bottom {
            width: 40px;
            height: 40px;
            border: none;
            background-color: transparent;
            background-image: url("../WriteTextAI_WriteTextAI/images/go_to_bottom.png");
            background-position: center;
            background-repeat: no-repeat;
            background-size: contain;
            position: absolute;
            bottom: 20px;
            right: 20px;
        }

        .wtai-keyword-analysis-header {
            border-bottom: 1px solid #C3C4C7;
            padding-right: 29px;
            display: flex;
            justify-content: flex-end;
            margin: 0 -26px 10px -26px;
            font-size: 13px;
            font-weight: 400;
            line-height: 17px;
            color: #888888;
            grid-gap: 10px;
            align-items: center;
            position: sticky;
            top: 0;
            z-index: 5;
            background: #fff;
            min-height: 40px;
    
            .wtai-language,
            .wtai-country {
                border-left: 1px solid #cccccc;
                padding-left: 10px;
                font-weight: 600;
                color: #303030;

                span {
                    font-weight: 400;
                    color: #888888;
                }
            }
            
            .wtai-help-container {
                .admin__field-tooltip {
                    margin-top: 0;
                }
            }
            .wtai-close {
                margin-left: 19px;
                border-left: 1px solid #cccccc;
                padding-left: 10px;
                position: absolute;
                right: 6px;
                height: 40px;
                display: none; /* hide custom close button*/
                align-items: center;
                .wtai-close-icon {
                    cursor: pointer;
                    &::before {
                        font-family: 'Admin Icons';
                        content: '\e62f';
                        display: block;
                        width: 15px;
                        height: 15px;
                    }
                }
            }
        }

        .wtai-keyword-analysis-loading {
            position: absolute;
            width: 100%;
            height: 100%;
            background-color: #ffffff;
            z-index: 2;
            display: flex;
            align-items: center;
            justify-content: space-around;
            left: 0;

            .wtai-loading-container {
                display: flex;
                gap: 10px;
            }
    
            .wtai-spinner {
                background-color: #ffffff;
                background-image: url("../WriteTextAI_WriteTextAI/images/mage-loader.gif");
                background-position: center;
                margin: 0;
                top: 0;
                left: 0;
                background-repeat: no-repeat;
                z-index: 5;
                background-size: 20px 20px;
                width: 20px;
                height: 20px;

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

            progress[value] {
                width: 510px;
                height: 7px;
                -webkit-appearance: none;
                appearance: none;

                &::-webkit-progress-bar {
                    background-color: #F0F0F0;
                    border-radius: 10px;
                }

                &::-webkit-progress-value {
                    border-radius: 10px;
                    background-color: #eb5202;
                }

                &::-moz-progress-bar {
                    border-radius: 10px;
                    background: #EB5202;
                }
            }
        }

        .wtai-keyword-analysis-failed {
            position: absolute;
            width: 100%;
            height: 100%;
            background-color: #ffffff;
            z-index: 2;
            display: flex;
            align-items: center;
            left: 0;
            justify-content: center;
            flex-direction: column;
            top: 0;
            color: #DC3232;

            .wtai-failed-text::before {
                background-color: transparent;
                background-image: url("../WriteTextAI_WriteTextAI/images/generate-error.png");
                background-position: center center;
                background-repeat: no-repeat;
                background-size: contain;
                content: "";
                display: block;
                height: 21px;
                min-width: 21px;
                margin-bottom: 10px;
            }

            .wtai-actions {
                margin-top: 40px;
            }
        }

        .wtai-pipelines-container {
            display: flex;
            flex-wrap: wrap;
            margin-top: 20px;
            position: relative;

            &.wtai-history-mode {
                .wtai-pipelines-header {
                    background-color: #ffd5bf;
                    
                    .wtai-actions {
                        justify-content: space-between;
                    }

                    .wtai-history-mode-elements {
                        display: flex;
                        align-items: center;

                        .wtai-history-mode-label {
                            font-size: 14px;
                            font-weight: 600;
                        }
                    }
                }
                
                .wtai-custom-pipeline {
                    .wtai-custom-pipeline-empty {
                        .wtai-custom-pipeline-empty-history{
                            .wtai-custom-pipeline-empty-btn {
                                display: none;
                            }
                        }
                    }
                }
            }

            .wtai-error-messages {
                flex-grow: 1;
                margin-top: 8px;
                position: sticky;
                top: 40px;
                z-index: 501;
            }

            .wtai-pipelines-header {
                padding: 10px;
                background: #F7F7F7;
                width: 100%;
                z-index: 1;
                position: sticky;
                display: block;
                z-index: 3;
        
                .wtai-actions {
                    display: flex;
                    justify-content: space-between;
                    justify-content: flex-end;
                }

                .wtai-history-mode-elements {
                    display: none;
                }
            }

            .wtai-keyword-analysis-loader {
                background: url("../WriteTextAI_WriteTextAI/images/mage-loader.gif") no-repeat center;
                background-color: #ffffff;
                bottom: 0;
                left: 0;
                position: absolute;
                right: 0;
                top: 0;
                z-index: 3;
            }
        }

        .wtai-refresh-loading {
            font-size: 13px;
            font-weight: 400;
            line-height: 17px;
            color: #888888;
            display: flex;
            align-items: center;
            gap: 2px;
            height: 34px;
            
        
            &::before {
                background-color: transparent;
                background-image: url("../WriteTextAI_WriteTextAI/images/spinner-1s-20px-bgwhite.gif");
                background-position: center center;
                background-repeat: no-repeat;
                background-size: contain;
                content: "";
                display: inline-block;
                height: 19px;
                margin-right: 4px;
                vertical-align: middle;
                width: 19px;
                mix-blend-mode: multiply;
            }
        }

        .wtai-link-style-button {
            font-size: 14px;
            font-weight: 400;
            background-color: transparent;
            border-color: transparent;
            text-shadow: none;
            color: #007bdb;
            display: flex;
            align-items: center;
            z-index: 1;
            text-decoration: none;

            &:hover {
                text-decoration: underline;
            }
    
            &:hover,
            &:focus,
            &:active {
                box-shadow: none;
            }

            &.wtai-refresh {
                font-size: 13px;
        
                &::before {
                    content: url('../WriteTextAI_WriteTextAI/images/ic_refresh.png');
                    display: inline-block;
                    margin-right: 5px;
                    width: 20px;
                    height: 20px;
                }
            }
        }

        .wtai-refresh-mask {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(255, 255, 255, 0.4);
            z-index: 4;
        }
    }
}