#titlewrap {
	display: flex;

	#classifai-title-generation__title-generate-btn {
		position: relative;
		margin-left: 0.5rem;
		height: 2.348rem;
		line-height: 2.348rem;

		& > .classifai-title-generation__title-generate-btn--spinner {
			display: none;
			position: absolute;
			top: 50%;
			left: 50%;
			transform: translate( -50%, -50% );
			line-height: 29px;
		}
	}
}

#classifai-title-generation {
	&__overlay {
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		background: rgba(0,0,0,.35);
		z-index: 99998;
		transition: opacity 0.3s ease !important;
	}

	&__modal {
		position: fixed;
		top: 100px;
		left: 50%;
		transform: translate(-50%, -10%);
		z-index: 99999;
		background: #fff;
		width: 100%;
		max-width: 900px;
		border: 1px solid;
		margin: 0 1rem;
		transition: opacity 0.3s ease !important;
		box-shadow: 0 0.7px 1px rgba(0,0,0,.15), 0 2.7px 3.8px -0.2px rgba(0,0,0,.15), 0 5.5px 7.8px -0.3px rgba(0,0,0,.15), 0.1px 11.5px 16.4px -0.5px rgba(0,0,0,.15);
	}

	&__results-title {
		font-size: 1.5rem !important;
		padding-top: 1.5rem !important;
	}

	&__results-content {
		display: flex;
		flex-flow: row wrap;
		padding: 1rem;
		padding-bottom: 1.5rem;
		gap: 1rem;

		& .error {
			color: #dc3232;
			font-size: 1rem;
		}
	}

	&__close-modal-button {
		position: fixed;
		top: 0.5rem;
		right: 0.5rem;
		width: 40px;
		height: 40px;
		cursor: pointer;

		&:before {
			content: "\f335";
			display: block;
			font-family: dashicons;
			font-size: 3rem;
			top: 0.5rem;
			right: 0;
			position: relative;
		}
	}
}

.classifai-title-generation {
	&__result-item {
		flex-grow: 1;
		flex-basis: 0;
		min-width: 25%;

		textarea {
			display: block;
			width: 100%;
			height: 80px;
		}
	}

	&__select-title {
		margin-top: 1rem !important;
	}

	&--fade-in {
		#classifai-title-generation__overlay {
			opacity: 1 !important;
			transition: opacity 0.3s ease !important;
		}

		#classifai-title-generation__modal {
			opacity: 1 !important;
			transform: translate(-50%, 0) !important;
			transition: opacity 0.3s ease, transform 0.3s ease !important;
		}
	}

	&__title-generate-btn--spinner,
	&__excerpt-generate-btn--spinner {
		&:before {
			display: block;
			animation: rotation 2s infinite linear;
			content: "\f463";
			font-family: dashicons;
			font-size: 1.75rem;

			width: 1.75rem;
			height: 1.75rem;
		}
	}
}

@keyframes rotation {
	from {
		transform: rotate(0deg);
	}

	to {
		transform: rotate(360deg);
	}
}
