/**
 * VDK AI Autofill — Styles
 *
 * @package VDK_Learning_Objectives
 * @since   2.5.0
 */

/* ====================================
   AI Autofill Section
   ==================================== */

.ai-autofill-section {
	margin-bottom: 30px;
}

.ai-autofill-section .pf-head {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #fff;
}

.ai-autofill-section .pf-head i {
	color: #fff;
}

.ai-autofill-content {
	padding: 20px;
}

.ai-autofill-content .description {
	font-size: 14px;
	color: #666;
	margin-bottom: 20px;
	line-height: 1.6;
}

/* URL Input */
.url-input-wrapper {
	display: flex;
	gap: 10px;
	margin-bottom: 10px;
}

.url-input-wrapper #ai-website-url {
	flex: 1;
	padding: 12px 15px;
	border: 2px solid #e0e0e0;
	border-radius: 4px;
	font-size: 14px;
	transition: border-color 0.3s;
}

.url-input-wrapper #ai-website-url:focus {
	border-color: #667eea;
	outline: none;
}

.url-input-wrapper #ai-analyze-btn {
	padding: 12px 24px;
	background: #667eea;
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s;
	display: flex;
	align-items: center;
	gap: 8px;
	white-space: nowrap;
}

.url-input-wrapper #ai-analyze-btn:hover:not(:disabled) {
	background: #5568d3;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.url-input-wrapper #ai-analyze-btn:disabled {
	background: #ccc;
	cursor: not-allowed;
	opacity: 0.6;
}

.url-validation-message {
	font-size: 13px;
	font-weight: 500;
	margin-top: 5px;
	display: block;
}

/* Progress Indicator */
.ai-progress {
	margin-top: 20px;
	padding: 20px;
	background: #f5f5f5;
	border-radius: 8px;
	border-left: 4px solid #667eea;
}

.progress-bar {
	width: 100%;
	height: 8px;
	background: #e0e0e0;
	border-radius: 4px;
	overflow: hidden;
	margin-bottom: 12px;
}

.progress-fill {
	height: 100%;
	background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
	width: 0;
	transition: width 0.3s ease-in-out;
	border-radius: 4px;
}

.progress-message {
	font-size: 14px;
	color: #666;
	margin: 0;
	font-weight: 500;
	display: flex;
	align-items: center;
	gap: 8px;
}

.progress-message::before {
	content: "";
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 2px solid #667eea;
	border-top-color: transparent;
	border-radius: 50%;
	animation: vdk-ai-spinner 0.8s linear infinite;
}

@keyframes vdk-ai-spinner {
	to { transform: rotate(360deg); }
}

/* Results Summary */
.ai-results {
	margin-top: 20px;
	padding: 20px;
	background: #f1f8f4;
	border-radius: 8px;
	border-left: 4px solid #4CAF50;
}

.results-summary h6 {
	margin: 0 0 15px 0;
	color: #2e7d32;
	font-size: 16px;
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 8px;
}

.results-summary h6 i {
	font-size: 20px;
}

.populated-fields-list {
	list-style: none;
	padding: 0;
	margin: 0 0 15px 0;
}

.populated-fields-list li {
	padding: 8px 0;
	border-bottom: 1px solid #e0e0e0;
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
}

.populated-fields-list li:last-child {
	border-bottom: none;
}

.populated-fields-list li.empty-fields-header {
	margin-top: 15px;
	font-weight: 600;
	color: #f57c00;
	border-top: 1px solid #e0e0e0;
	padding-top: 15px;
}

.populated-fields-list li.empty-field {
	color: #666;
	padding-left: 26px;
}

.ai-notice {
	margin: 15px 0 0 0;
	padding: 12px;
	background: #fff;
	border-radius: 4px;
	font-size: 13px;
	color: #666;
	display: flex;
	align-items: flex-start;
	gap: 8px;
}

.ai-notice i {
	color: #2196F3;
	font-size: 18px;
	flex-shrink: 0;
	margin-top: 2px;
}

/* Confidence Score */
.confidence-score {
	margin: 0 0 15px 0;
	padding: 10px;
	background: rgba(255,255,255,0.6);
	border-radius: 4px;
	font-size: 14px;
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 8px;
}

.confidence-score.confidence-high   { color: #2e7d32; }
.confidence-score.confidence-medium { color: #f57c00; }
.confidence-score.confidence-low    { color: #d32f2f; }

/* Pipeline Warnings */
.ai-warnings {
	list-style: none;
	margin: 0 0 12px;
	padding: 0;
}

.ai-warning {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	padding: 10px 14px;
	background: #fff8e1;
	border-left: 4px solid #f9a825;
	border-radius: 6px;
	color: #5d4037;
	font-size: 13px;
	line-height: 1.5;
	margin-bottom: 6px;
}

.ai-warning i {
	font-size: 18px;
	flex-shrink: 0;
	color: #f9a825;
	margin-top: 1px;
}

/* Error Message */
.error-message {
	padding: 15px;
	background: #ffebee;
	border-left: 4px solid #f44336;
	border-radius: 8px;
	color: #c62828;
	font-size: 14px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.error-message i {
	font-size: 20px;
	flex-shrink: 0;
}

/* ====================================
   AI Populated Fields Styling
   ==================================== */

.field.ai-populated,
.form-group.ai-populated,
.element.ai-populated {
	position: relative;
	border-left: 3px solid #4CAF50;
	padding-left: 15px;
	background: linear-gradient(90deg, rgba(76,175,80,0.05) 0%, transparent 100%);
	animation: vdk-ai-highlight-fade 0.6s ease-out;
}

@keyframes vdk-ai-highlight-fade {
	from { background: rgba(76,175,80,0.15); }
	to   { background: linear-gradient(90deg, rgba(76,175,80,0.05) 0%, transparent 100%); }
}

.ai-populated-badge {
	position: absolute;
	top: -8px;
	right: 10px;
	background: #4CAF50;
	color: #fff;
	padding: 3px 10px;
	border-radius: 3px;
	font-size: 11px;
	font-weight: 600;
	z-index: 10;
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ====================================
   Responsive
   ==================================== */

@media (max-width: 768px) {
	.url-input-wrapper {
		flex-direction: column;
	}

	.url-input-wrapper #ai-analyze-btn {
		width: 100%;
		justify-content: center;
	}
}
