/* style for placeholder */
.place-holder {
	position: absolute;
	z-index: -1;
	opacity: 0;
	transition-duration: 0.2s;
	transition-property: opacity;
	transition-timing-function: ease-in, ease-out;
	margin: 0;
}

@media (prefers-reduced-motion: reduce) {
	.place-holder {
		transition: none;
	}
}

.show-place-holder {
	opacity: 0.75;
	transition-duration: 1s;
	z-index: 100;
}

/* style for response loader */
.gpt-loader {
	position: absolute;
	width: 5px;
	height: 5px;
	aspect-ratio: 1;
	border-radius: 50%;
	background: hsl(0, 0%, 0%);
	box-shadow: 0 0 0 0 hsla(224, 100%, 3%, 0.377);
	animation: l2 1.5s infinite linear;
	opacity: 0;
}

.show-gpt-loader {
	opacity: 1;
}

.gpt-loader:before,
.gpt-loader:after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	box-shadow: 0 0 0 0 hsla(224, 100%, 3%, 0.377);
	animation: inherit;
	animation-delay: -0.5s;
}

.gpt-loader:after {
	animation-delay: -1s;
}

@keyframes l2 {
	100% {
		box-shadow: 0 0 0 40px hsla(224, 100%, 3%, 0)
	}
}

/* style for response error */

.response-error {
	position: fixed;
	z-index: 9999;
	color: hsl(0, 0%, 100%);
	background: hsl(0, 39%, 60%);
	width: clamp(280px, 85vw, 400px);
	padding: 12px 16px;
	border-radius: 5px;
	transition-duration: 1s;
	transition-property: opacity;
	opacity: 0;
	pointer-events: none;
	right: 10px;
	top: 10px;
	font-size: 14px;
	line-height: 1.4;
	word-break: break-word;
	overflow-wrap: break-word;
	box-shadow: 0 4px 12px hsla(0, 0%, 0%, 0.15);
}

.response-error--warning {
	background: hsl(45, 100%, 40%);
	color: hsl(0, 0%, 10%);
}

.response-error--warning a {
	color: hsl(220, 80%, 30%);
	text-decoration: underline;
}

.response-error strong {
	display: block;
	font-size: 16px;
	margin-bottom: 4px;
}

.response-error .blocked-urls-list {
	margin: 8px 0 0 0;
	padding-left: 20px;
	font-size: 12px;
	opacity: 0.9;
}

.response-error .blocked-urls-list li {
	margin-bottom: 2px;
	word-break: break-all;
}

.show-response-error {
	opacity: 1;
	pointer-events: auto;
}

/* style for slash animation */
.ck-slash {
	font-size: 18px;
	opacity: 0;
	animation: ck-fade-in-pulse 750ms ease-out forwards;
	background: hsla(60, 88%, 87%, 1);
	padding: 0px 5px;
	text-shadow:
		0 0 10px var(--ck-color-widget-hover-border),
		0 0 20px var(--ck-color-widget-hover-border),
		0 0 30px var(--ck-color-widget-hover-border),
		0 0 40px var(--ck-color-widget-hover-border);
	display: inline-block;
	color: hsl(235.71deg 17.07% 16.08%);
}

@keyframes ck-fade-in-pulse {
	0% {
		opacity: 0;
		transform: scale(1);
		color: hsl(9, 72%, 100%);
	}

	50% {
		opacity: 1;
		transform: scale(1.1);
		color: hsl(0, 0%, 100%);
		text-shadow:
			0 0 10px var(--ck-color-widget-hover-border),
			0 0 20px var(--ck-color-widget-hover-border),
			0 0 30px var(--ck-color-widget-hover-border),
			0 0 40px var(--ck-color-widget-hover-border);
	}

	100% {
		opacity: 1;
		transform: scale(1);
		text-shadow: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ck-slash {
		animation: none;
		opacity: 1;
		text-shadow: none;
	}
}

.ck.ck-button.ck-cancel-request-button {
	cursor: pointer;
	position: absolute;
	left: 50%;
	top: 2.8125rem;
	width: fit-content;
	box-shadow: 0px 2px 6px var(--ck-color-shadow-drop);
	z-index: 1;
	transform: translateX(-50%) scale(1.1);
	background: var(--ck-color-input-background);
	opacity: 0;
	transition: opacity 300ms ease-in;
	pointer-events: none;
	border: 6px solid var(--ck-color-widget-hover-border);
	padding: 0.625rem 0.625rem !important;
}

.ck.ck-button.ck-cancel-request-button::before {
	content: "";
	display: block;
	position: absolute;
	width: 100%;
	height: 100%;
	left: 0;
	background: var(--ck-color-toolbar-background);
	z-index: -1;
}
.ck.ck-button.ck-cancel-request-button:hover {
	background: var(--ck-color-button-default-hover-background);
	border-color: var(--ck-color-focus-border);
}

.ck.ck-button.ck-cancel-request-button.visible {
	opacity: 1;
	pointer-events: auto;
	/* Enable interactions */
}

.ck.ck-button.ck-cancel-request-button .ck-button__label {
	font-weight: 100;
	font-size: 1em;
	color: var(--ck-color-text);
	line-height: 1;
}

/* Disable animation for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
	#cancel-button {
		transition: none;
		/* Disable all transitions */
	}
}

.ck-ai-commands-list .ck.ck-button.ck-list-item-button.ck-menu-group-title,
.ck-ai-tone-list .ck.ck-button.ck-list-item-button.ck-menu-group-title {
	/* padding-left: 0.6em; */
	font-weight: bold !important;
}

.ck-ai-commands-list .ck.ck-button.ck-list-item-button.ck-menu-group-title .ck-button__label,
.ck-ai-tone-list .ck.ck-button.ck-list-item-button.ck-menu-group-title .ck-button__label {
	opacity: 1;
}

.ck-ai-commands-list .ck.ck-reset.ck-list li:first-child {
	padding: 1.2em;
	display: flex;
	gap: 8px;
	flex-direction: row;
	min-width: 300px;
	align-items: flex-start;
}

.ck-ai-commands-list .ck.ck-reset.ck-list li:first-child .ck-ask-ai-to-edit-button {
	padding: 6px 12px;
	align-self: flex-end;
}

.ck-ai-commands-list .ck.ck-labeled-field-view {
	flex: 1;
}

.ck-ai-commands-list .ck.ck-labeled-field-view .ck.ck-textarea {
	min-height: 4em;
	font-size: calc(var(--ck-font-size-base) * 1.15);
	line-height: 1.5;
	padding: 8px;
	resize: vertical;
}

.ck [id^="ai-"].ck-widget,
.ck [id^="ai-"].ck-widget:hover,
.ck [id^="ai-"].ck-widget.ck-widget_selected,
.ck [id^="ai-"].ck-widget.ck-widget_selected:hover,
.ck .ck-loading-shimmer.ck-widget,
.ck .ck-loading-shimmer.ck-widget:hover{
	outline: none;
	outline-color: unset;
	/* display: block; */
}

.ck-loading-shimmer {
	-webkit-text-fill-color: transparent;
	animation-delay: .5s;
	animation-duration: 3s;
	animation-iteration-count: infinite;
	animation-name: loading-shimmer;
	background: var(--ck-color-text) -webkit-gradient(
		linear, 
		100% 0, 
		0 0, 
		from(var(--ck-color-text)),
		color-stop(.5, var(--ck-color-base-background)), /* Fallback */
		to(var(--ck-color-text))
	);
	background: var(--ck-color-text) -webkit-gradient(
		linear, 
		100% 0, 
		0 0, 
		from(var(--ck-color-text)),
		color-stop(.5, color-mix(in srgb, var(--ck-color-base-background) 75%, hsl(0, 0%, 50%) 25%)),
		to(var(--ck-color-text))
	);
	background-clip: text;
	-webkit-background-clip: text;
	background-repeat: no-repeat;
	background-size: 50% 200%;
	display: inline-block;
	margin-top: var(--ck-spacing-small);
	margin-bottom: var(--ck-spacing-small);
	font-style: italic;
}

/* Animation */
@keyframes loading-shimmer {
	from {
		background-position: -200% 0;
	}
	to {
		background-position: 200% 0;
	}
}

/* Update loader animation */
@media (prefers-reduced-motion: reduce) {
	.gpt-loader,
	.gpt-loader:before,
	.gpt-loader:after {
		animation: none;
		box-shadow: 0 0 0 2px hsla(224, 100%, 3%, 0.377);
	}
}

/* Update response error transitions */
@media (prefers-reduced-motion: reduce) {
	.response-error {
		transition: none;
	}
}

/* Update cancel button transitions */
@media (prefers-reduced-motion: reduce) {
	.ck.ck-button.ck-cancel-request-button {
		transition: none;
		transform: none;
	}
}

/* Update loading shimmer animation */
@media (prefers-reduced-motion: reduce) {
	.ck-loading-shimmer {
		animation: none;
		background: hsl(0deg 0% 80.39%);
		-webkit-text-fill-color: initial;
		font-style: italic;
	}
}

.ck-ai-commands-list .ck.ck-button.ck-ask-ai-to-edit-button {
	margin-top: 1.5em;
}

.ck-ai-commands-list .ck.ck-button.ck-ask-ai-to-edit-button:not(.ck-disabled):hover {
	background: var(--ck-color-button-action-hover-background);
	cursor: pointer;
}

.ck.ck-list-item-button .ck-tone-of-voice {
	height: 100%;
}
