/**
 * AI Assistant — one-click Quick summarize on the submissions LIST.
 *
 * Styles only the additive elements (row button + inline summary row); it does
 * not restyle the existing list table.
 */

.afb-ai-list-btn {
	cursor: pointer;
}

.afb-ai-list-btn .dashicons {
	color: #6d4aff;
}

.afb-ai-list-btn.is-loading {
	opacity: 0.6;
	cursor: progress;
}

.afb-ai-list-summary-row > td {
	padding: 0 !important;
	background: transparent;
}

.afb-ai-list-summary {
	margin: 6px 8px 14px;
	padding: 14px 16px;
	background: #fff;
	border: 1px solid #e2e4e9;
	border-left: 4px solid #6d4aff;
	border-radius: 8px;
	box-shadow: 0 1px 2px rgba( 0, 0, 0, 0.04 );
}

.afb-ai-list-summary.afb-ai-list-error {
	border-left-color: #b32d2e;
}

.afb-ai-list-summary-head {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
	font-size: 13px;
	font-weight: 600;
	color: #1d2327;
}

.afb-ai-list-summary-head .dashicons {
	color: #6d4aff;
}

.afb-ai-list-summary.afb-ai-list-error .afb-ai-list-summary-head .dashicons {
	color: #b32d2e;
}

.afb-ai-list-summary-title {
	flex: 1 1 auto;
}

.afb-ai-list-close {
	border: 0;
	background: transparent;
	padding: 0;
	cursor: pointer;
	color: #646970;
	line-height: 1;
}

.afb-ai-list-close:hover {
	color: #1d2327;
}

.afb-ai-list-summary-body {
	white-space: pre-wrap;
	line-height: 1.6;
	color: #2c3338;
}

.afb-ai-list-summary-meta {
	margin-top: 10px;
	padding-top: 8px;
	border-top: 1px solid #f0f0f1;
	font-size: 12px;
	color: #646970;
}

.afb-ai-list-summary-foot {
	margin-top: 8px;
}

/* Ask across submissions */
.afb-ai-ask-box {
	margin: 12px 0 16px;
	padding: 16px 18px;
	background: #fff;
	border: 1px solid #e2e4e9;
	border-left: 4px solid #6d4aff;
	border-radius: 10px;
	box-shadow: 0 1px 2px rgba( 0, 0, 0, 0.04 );
}

.afb-ai-ask-head {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 600;
	color: #1d2327;
}

.afb-ai-ask-head .dashicons {
	color: #6d4aff;
}

.afb-ai-ask-hint {
	margin: 4px 0 8px;
	font-size: 12px;
	color: #646970;
}

.afb-ai-ask-input {
	width: 100%;
	box-sizing: border-box;
	font-family: inherit;
}

.afb-ai-ask-actions {
	margin-top: 8px;
}

.afb-ai-ask-answer {
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid #f0f0f1;
}

.afb-ai-ask-answer-head {
	font-size: 13px;
	font-weight: 600;
	color: #1d2327;
	margin-bottom: 6px;
}

.afb-ai-ask-answer-body {
	white-space: pre-wrap;
	line-height: 1.6;
	color: #2c3338;
}

.afb-ai-ask-answer.afb-ai-ask-error .afb-ai-ask-answer-body {
	color: #b32d2e;
}

.afb-ai-ask-answer-meta {
	margin-top: 10px;
	font-size: 12px;
	color: #646970;
}

.afb-ai-spinner {
	display: inline-block;
	width: 14px;
	height: 14px;
	margin-right: 4px;
	border: 2px solid rgba( 109, 74, 255, 0.3 );
	border-top-color: #6d4aff;
	border-radius: 50%;
	vertical-align: text-bottom;
	animation: afb-ai-list-spin 0.7s linear infinite;
}

@keyframes afb-ai-list-spin {
	to {
		transform: rotate( 360deg );
	}
}
