/**
 * BuddyPress Group AI Auto-Reply - Frontend Live Styles
 */

/* Container for AI Typing Indicator */
.bp-ai-typing-indicator {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	margin: 10px 0;
	background: linear-gradient(135deg, #f0f7ff 0%, #e6f0fa 100%);
	border: 1px solid #bcd7f5;
	border-left: 4px solid #0284c7;
	border-radius: 8px;
	font-size: 13px;
	color: #1e3a8a;
	box-shadow: 0 2px 6px rgba(2, 132, 199, 0.08);
	transition: all 0.3s ease;
	animation: bpAiPulseGlow 2.5s infinite ease-in-out;
	list-style: none !important;
}

@keyframes bpAiPulseGlow {
	0% {
		box-shadow: 0 2px 6px rgba(2, 132, 199, 0.08);
		border-color: #bcd7f5;
	}
	50% {
		box-shadow: 0 4px 12px rgba(2, 132, 199, 0.18);
		border-color: #7dd3fc;
	}
	100% {
		box-shadow: 0 2px 6px rgba(2, 132, 199, 0.08);
		border-color: #bcd7f5;
	}
}

/* Avatar inside indicator */
.bp-ai-typing-indicator .bp-ai-avatar {
	width: 28px;
	height: 28px;
	min-width: 28px;
	border-radius: 50%;
	overflow: hidden;
	background: #0284c7;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.bp-ai-typing-indicator .bp-ai-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.bp-ai-typing-indicator .bp-ai-avatar .bp-ai-icon {
	font-size: 14px;
	line-height: 1;
}

/* Text and Bot Name */
.bp-ai-typing-indicator .bp-ai-text {
	display: flex;
	align-items: center;
	gap: 6px;
	font-weight: 500;
	color: #0369a1;
}

.bp-ai-typing-indicator .bp-ai-bot-name {
	font-weight: 600;
	color: #0c4a6e;
}

/* Animated 3 Dots */
.bp-ai-dots {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	margin-left: 2px;
}

.bp-ai-dots span {
	display: inline-block;
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background-color: #0284c7;
	animation: bpAiDotBounce 1.4s infinite ease-in-out both;
}

.bp-ai-dots span:nth-child(1) {
	animation-delay: -0.32s;
}

.bp-ai-dots span:nth-child(2) {
	animation-delay: -0.16s;
}

.bp-ai-dots span:nth-child(3) {
	animation-delay: 0s;
}

@keyframes bpAiDotBounce {
	0%, 80%, 100% {
		transform: scale(0.6);
		opacity: 0.4;
	}
	40% {
		transform: scale(1.2);
		opacity: 1;
	}
}

/* Moderation Notice */
.bp-ai-moderation-notice {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	margin: 8px 0;
	background: #fefce8;
	border: 1px solid #fef08a;
	border-left: 3px solid #eab308;
	border-radius: 6px;
	font-size: 12px;
	color: #854d0e;
	list-style: none !important;
}

/* Subtle animation when new AI comment appears */
.bp-ai-new-comment-highlight {
	animation: bpAiHighlightIn 1.5s ease-out;
}

@keyframes bpAiHighlightIn {
	0% {
		background-color: rgba(2, 132, 199, 0.12);
	}
	100% {
		background-color: transparent;
	}
}

/* Post Update Submit Button Loading State */
#whats-new-submit {
	display: inline-flex;
	align-items: center;
	position: relative;
	gap: 6px;
}

#aw-whats-new-submit.bp-btn-loading,
#aw-whats-new-submit.loading {
	opacity: 0.8 !important;
	cursor: not-allowed !important;
	pointer-events: none;
	position: relative;
	transition: all 0.2s ease;
}

/* Rotating CSS spinner next to the Post Update button */
.bp-post-button-spinner {
	display: inline-block;
	width: 18px;
	height: 18px;
	margin-left: 6px;
	vertical-align: middle;
	border: 2.5px solid rgba(2, 132, 199, 0.25);
	border-top-color: #0284c7;
	border-radius: 50%;
	box-sizing: border-box;
	animation: bpBtnSpin 0.7s linear infinite;
}

/* Comment Reply Submit Button Spinner */
.bp-comment-button-spinner {
	display: inline-block;
	width: 14px;
	height: 14px;
	margin-left: 6px;
	vertical-align: middle;
	border: 2px solid rgba(2, 132, 199, 0.25);
	border-top-color: #0284c7;
	border-radius: 50%;
	box-sizing: border-box;
	animation: bpBtnSpin 0.7s linear infinite;
}

@keyframes bpBtnSpin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}
