@import '../../../../node_modules/choices.js/public/assets/styles/choices.min.css';

@keyframes loading-rotation {
    0% {
        transform: translate( -50%, -50% ) rotate( 0deg );
    }

    100% {
        transform: translate( -50%, -50% ) rotate( 360deg );
    }
}

#classifai-post-preview-controls,
#classifai-post-preview-wrapper {
    background-color: #fff;
    padding: 1.5rem 1rem;
    border-left: 1px solid #c3c4c7;
    border-bottom: 1px solid #c3c4c7;
    border-right: 1px solid #c3c4c7;
}

#classifai-post-preview-controls {
    display: flex;
    border: 1px solid #c3c4c7;

    .choices {
        margin-bottom: 0;
        margin-right: 1rem;
        width: 100%;
        border: 1px solid #ddd;
    }

    .choices__inner {
        border: 0;
        width: auto;
    }

    #get-classifier-preview-data-btn {
        position: relative;
    }

    .get-classifier-preview-data-btn {
        &--loading {
            span {
                opacity: 0;
            }

            &:after {
                opacity: 0;
                content: "\f463";
                animation: loading-rotation 2s infinite linear;
                font-family: dashicons;
                font-size: 1.5rem;
                position: absolute;
                top: 50%;
                left: 50%;
                width: 1.5rem;
                height: 1.5rem;
                line-height: 1.5rem;
                transform: translate(-50%, -50%) rotate(0deg);
            }

            &:after {
                opacity: 1;
            }
        }
    }
}

#classifai-post-preview-wrapper {
    .tax-row {
        margin-bottom: 1rem;
        border: 1px solid #ccc;
        padding: 0.5rem;

        &--hide {
            display: none;
        }
    }

    .tax-type {
        font-weight: bold;
        font-size: 14px;
        margin-bottom: 0.75rem;
        text-transform: capitalize;
    }

    .tax-cell {
        margin-bottom: 8px;
        padding: 2px 8px;
        border-radius: 15px;
        text-transform: capitalize;
        background-color: #46b450ba;
    }

    .tax-score {
        display: inline-block;
        color: #fff;
        font-weight: bold;
    }

    .tax-label {
        text-transform: capitalize;
        font-size: 14px;
        margin-left: 8px;
    }
}

.classifai-nlu-sections {
    display: flex;

    form {
        min-width: 550px;
    }
}

.wrap--nlu {
    position: relative;

    #classifai-post-preview-app {
        flex: 1;
        margin-top: 250px;
        align-self: flex-start;
        position: sticky;
        top: 3rem;

        .choices__inner {
            display: block;
            min-height: auto;
        }
    }
}

#classifai-text-to-speech-meta-box {
	.description {
		display: block;
		margin-top: 8px;
		font-size: 12px;
		color: rgb(117, 117, 117);
	}
}

.form-table {
    td {
        p.threshold_wrapper {
            margin: 10px 0 40px;

            &:last-of-type {
                margin-bottom: 20px;
            }

            label {
                display: inline-block;
                margin: 0 0 10px;
            }
        }
    }
}

.classifai-panel {
	#classify-post-component {
		margin-bottom: 12px;
	}

	div:last-of-type {
		margin-bottom: 0!important;
	}
}
