.gcoai-loading {
	display: block;
	background-color: #e0e0e0;
	position: relative;
	text-indent: -9999px;
	overflow: hidden;
	cursor: wait;
}

.gcoai-loading::before {
	content: '';
	display: block;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-image: linear-gradient(90deg, #e0e0e0 0%, #f0f0f0 50%, #e0e0e0 100%);
	animation: gcoai-skeleton-pulse 1.5s infinite;
}

.gcoai-output {
	max-width: none;
}

.gcoai-output img {
	max-width: none;
	height: auto;
	display: block;
}

/* Responsive behavior for smaller screens */
@media (max-width: 768px) {
	.gcoai-output img {
		max-width: 100%;
	}
}

.gcoai-regenerate {
	margin-top: 15px;
}

.gcoai-output ol, .gcoai-output ul {
	list-style: auto;
	max-width: 100%;
}

/*
 * The waiting state for a streamed response, shown until the first token arrives.
 */
.gcoai-placeholder--shimmer {
	/* Every visual knob lives here, so a site can retune the effect from one override block. */
	--gcoai-shimmer-base: currentColor;
	--gcoai-shimmer-highlight: #fff;
	--gcoai-shimmer-duration: 2.2s;

	display: inline-block;
	line-height: 1.2;
	background-color: var(--gcoai-shimmer-base);
	background-image: linear-gradient(
		to left,
		var(--gcoai-shimmer-base),
		var(--gcoai-shimmer-highlight) 50%,
		var(--gcoai-shimmer-base)
	);
	background-repeat: no-repeat;
	background-size: 4rem 100%;
	background-position: -4rem top;
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	animation: gcoai-text-shimmer var(--gcoai-shimmer-duration) infinite;
}

@keyframes gcoai-text-shimmer {
	0% {
		background-position: -4rem top;
	}
	70%,
	100% {
		background-position: calc(100% + 4rem) top;
	}
}

@media (prefers-reduced-motion: reduce) {
	.gcoai-placeholder--shimmer {
		animation: none;
		background-image: none;
		-webkit-text-fill-color: var(--gcoai-shimmer-base);
	}
}

@keyframes gcoai-skeleton-pulse {
	0% {
		transform: translateX(-100%);
	}
	50% {
		transform: translateX(100%);
	}
	100% {
		transform: translateX(-100%);
	}
}
