/**
 * @author 1902 Software
 * @copyright Copyright © 2023 1902 Software (https://1902software.com/magento/)
 * @package WriteTextAI_WriteTextAI
 */
    
.wtai-keyword-pool {
    background: #EFEFEF;
    padding: 20px;
    border-radius: 4px;
    width: 100%;
    margin-top: 20px;

    .wtai-keyword-pool-header-wrapper {
        display: flex;
        justify-content: space-between;
        gap: 14px;
        flex-wrap: wrap;

        .wtai-keyword-pool-title {
            font-size: 14px;
            font-weight: 600;
            line-height: 18px;
            color: #303030;
        }

        .wtai-keyword-pool-subtitle {
            font-size: 14px;
            font-style: italic;
            font-weight: 400;
            line-height: 18px;
            color: #303030;
            margin-top: 5px;
        }

        .wtai-keyword-pool-actions {
            display: flex;
            gap: 6px;
            align-items: center;

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

            .wtai-search-volume-filter,
            .wtai-difficulty-filter {
                position: relative;
                &.active {
                    .wtai-field-columns {
                        display: block;
                    }
                }

                .wtai-field-columns {
                    display: none;
                    position: absolute;
                    width: auto;
                    min-width: 175px;
                    border: 1px solid #767676;
                    z-index: 2;
                    right: 0;
                    margin-top: 6px;
                    bottom: 35px;
                    padding: 20px;
                    background-color: #fff;

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

                        &:last-child {
                            margin-bottom: 0;
                        }

                        label::before {
                            margin-right: 7px;
                            position: relative;
                            top: 1px;
                        }
                    }
                }
            }

            .wtai-pool-action-btn {
                padding: 10px 8px 11px 8px;
                border-radius: 3px;
                display: flex;
                gap: 10px;
                font-weight: 400;
                border: solid 1px #8c8f94;
                height: 32px;
                align-items: center;
                background-color: #FFFFFF;

                &::after {
                    content: '\e628';
                    font-family: 'Admin Icons';
                    font-size: 13px;
                    position: relative;
                    margin-right: 4px;
                    top: 1px;
                }

                &.active {
                    &::after {
                        content: '\e62b';
                    }
                }
            }
        }
    }

    .wtai-keyword-pool-container {
        border: 1px solid #8C8F94;
        background: #FFFFFF;
        border-radius: 3px;
        padding: 0;
        margin-top: 10px;
        display: flex;
        flex-wrap: wrap;
        max-height: 173px;
        height: 173px;

        &.wtai-no-data {
            height: 92px;
            max-height: 92px;
        }

        .tooltip-content {
            display: none;
        }

        &.wtai-show-tooltip {
            .lib-tooltip(
                @_tooltip-border-color: transparent,
                @_tooltip-color: #303030,
                @_tooltip-position: top
            );

            .tooltip-content {
                display: block;
                box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.3);
                font-size: 13px;
                font-weight: 400;
                left: 50%;
                transform: translateX(-50%);
                &::before {
                    left: 50%;
                }
                &::after {
                    left: 50%;
                }
            }
            ul li {
                color: #757575;
            }
        }

        &.wtai-two-lines {
            height: auto;
            ul {
                overflow-y: unset;
                li.wtai-above-the-center {
                    .wtai-hovered {
                        bottom: 0;
                        top: unset;
                    }
                }
            }
        }

        ul {
            margin-bottom: 0;
            display: flex;
            flex-wrap: wrap;
            grid-gap: 10px;
            align-items: flex-start;
            align-content: flex-start;
            height: 100%;
            overflow-y: auto;
            padding: 10px;

            &.mage-sortable-disabled {
                li {
                    cursor: default;
                }
            }

            li {
                padding: 5px 10px;
                border-radius: 4px;
                background: #DDDDDD;
                box-shadow: 0px 2px 4px 0px #0000004D;
                position: relative;
                cursor: move;
                cursor: grab;
                cursor: -moz-grab;
                cursor: -webkit-grab;
                height: 29px;

                &:active {
                    cursor: grabbing;
                    cursor: -moz-grabbing;
                    cursor: -webkit-grabbing;
                    
                    &.wtai-not-allowed {
                        cursor: not-allowed;
                        cursor: -moz-not-allowed;
                        cursor: -webkit-not-allowed;
                    }
                }

                &:not(.wtai-selected):not(.ui-sortable-helper):hover,
                &.wtai-selected-with-data:not(.ui-sortable-helper):hover {
                    box-shadow: none;
                    
                    .wtai-hovered {
                        display: grid;
                    }
                }

                &.wtai-keyword-pool-placeholder {
                    background-color: #FFFFFF;
                    background-image: url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' stroke='%23B0B0B0FF' stroke-width='1' stroke-dasharray='6%2c6' stroke-dashoffset='0' stroke-linecap='square'/%3e%3c/svg%3e");
                    box-shadow: none;
                    min-width: 100px;
                }

                &.wtai-selected,
                &.wtai-selected-with-data {
                    background: #ffd5bf;

                    .wtai-hovered {
                        background: #ffd5bf;
                    }
                }

                .wtai-not-hovered {
                    font-weight: 600;
                    max-width: 200px;
                                
                    .wtai-star-badge {
                        background-image: url('../WriteTextAI_WriteTextAI/images/star_badge.svg');
                        background-size: 100%;
                        background-position: center;
                        background-repeat: no-repeat;
                        display: inline-block;
                        width: 14px;
                        height: 14px;
                    }
                    .wtai-keyword-text {
                        display: block;
                        overflow: hidden;
                        text-overflow: ellipsis;
                        white-space: nowrap;
                        max-width: 100%;
                    }
                }
                &.wtai-above-the-center {
                    .wtai-hovered {
                        bottom: unset;
                        top: 0;
                    }
                }
                &.wtai-right-positioned {
                    .wtai-hovered {
                        left: unset;
                        right: 0;
                    }
                }
                .wtai-hovered {
                    display: none;
                    position: absolute;
                    z-index: 10;
                    bottom: 0;
                    width: 220px;
                    background: #DDDDDD;
                    padding: 5px 10px;
                    left: 0;
                    border-radius: 4px;
                    box-shadow: 0px 2px 4px 0px #0000004D;
                    grid-gap: 5px;

                    .wtai-keyword {
                        font-weight: 600;
                        font-size: 13px;
                        word-break: break-word;
                    }

                    .wtai-keyword-data {
                        display: flex;
                        font-size: 12px;

                        .wtai-data-label {
                            width: 50%;
                            font-weight: 600;
                        }

                        .wtai-data-value {
                            width: 50%;
                        }
                    }
                }
            }

            .wtai-load-more {
                padding: 5px 0;
            }
        }
    }
}