/**
 * AI Guide Block - Frontend Styles
 *
 * @package AIWorkflowBlocks
 * @author Mika Wenell
 * @copyright 2025 uniwaves Oy
 */

.ai-guide-block-wrapper {
	position: relative;
	padding: 20px;
	border: 1px solid #ddd;
	border-radius: 8px;
	background: #fff;
}

.ai-guide-block-wrapper.status-processing {
	border-color: #0073aa;
	background: #f0f8ff;
}

.ai-guide-block-wrapper.status-error {
	border-color: #dc3232;
	background: #ffeaea;
}

.ai-guide-block-wrapper.status-ready {
	border-color: #46b450;
	background: #eafaea;
}

/* Step Content */
.ai-guide-step-start,
.ai-guide-step-photos,
.ai-guide-step-workflow {
	margin: 20px 0;
}

.ai-guide-step-header h3 {
	margin: 0 0 10px 0;
	font-size: 1.5em;
}

.ai-guide-step-content {
	margin: 20px 0;
}

/* Buttons */
.ai-guide-button {
	padding: 10px 20px;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 16px;
	transition: background-color 0.3s;
}

.ai-guide-button-primary {
	background: #0073aa;
	color: #fff;
}

.ai-guide-button-primary:hover:not(:disabled) {
	background: #005a87;
}

.ai-guide-button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Photo Upload */
.ai-guide-photo-upload-area {
	border: 2px dashed #ddd;
	border-radius: 8px;
	padding: 40px;
	text-align: center;
	margin: 20px 0;
}

.ai-guide-photo-placeholder {
	color: #999;
}

.ai-guide-photo-icon {
	font-size: 48px;
	display: block;
	margin-bottom: 10px;
}

/* Status Messages */
.ai-guide-status-message {
	padding: 15px;
	margin: 20px 0;
	border-radius: 4px;
	display: flex;
	align-items: center;
	gap: 10px;
}

/* Image Error Message */
.ai-guide-image-error-message {
	margin: 20px 0;
}

.ai-guide-error-box {
	background: #fff3cd;
	border: 2px solid #ffc107;
	border-radius: 8px;
	padding: 20px;
}

.ai-guide-error-title {
	font-weight: bold;
	font-size: 1.1em;
	color: #856404;
	margin: 0 0 10px 0;
}

.ai-guide-error-text {
	color: #856404;
	margin: 0 0 15px 0;
}

.ai-guide-error-steps {
	color: #856404;
	margin: 0 0 15px 0;
	padding-left: 25px;
}

.ai-guide-error-steps li {
	margin: 8px 0;
}

.ai-guide-button-secondary {
	background: #6c757d;
	color: #fff;
}

.ai-guide-button-secondary:hover {
	background: #5a6268;
}

.ai-guide-status-identifying {
	background: #e3f2fd;
	color: #1976d2;
}

.ai-guide-status-planning {
	background: #f3e5f5;
	color: #7b1fa2;
}

.ai-guide-status-generating {
	background: #fff3e0;
	color: #f57c00;
}

.ai-guide-status-collecting {
	background: #e8f5e9;
	color: #388e3c;
}

.ai-guide-status-ready {
	background: #e8f5e9;
	color: #2e7d32;
}

.ai-guide-status-published {
	background: #c8e6c9;
	color: #1b5e20;
}

.ai-guide-status-icon {
	font-size: 24px;
}

/* Machine Info */
.ai-guide-machine-info {
	margin: 10px 0;
	color: #666;
}

.ai-guide-machine-model {
	color: #999;
	font-style: italic;
}

/* Step Progress */
.ai-guide-step-progress {
	margin: 20px 0;
}

.ai-guide-step-loading {
	text-align: center;
	padding: 40px;
	color: #999;
}

.ai-guide-loading-icon {
	font-size: 48px;
	display: block;
	margin-bottom: 10px;
	animation: pulse 2s infinite;
}

@keyframes pulse {
	0%, 100% {
		opacity: 1;
	}
	50% {
		opacity: 0.5;
	}
}

/* Section Content */
.ai-guide-section {
	margin: 30px 0;
	padding: 20px;
	border: 1px solid #eee;
	border-radius: 4px;
}

.ai-guide-section-header {
	margin-bottom: 20px;
}

.ai-guide-section-title {
	margin: 0 0 10px 0;
	font-size: 1.8em;
}

.ai-guide-section-goal {
	margin: 0;
	color: #666;
	font-style: italic;
}

/* Step Content */
.ai-guide-step {
	margin: 20px 0;
	padding: 15px;
	border-left: 3px solid #0073aa;
	background: #f9f9f9;
}

.ai-guide-step-header {
	display: flex;
	align-items: center;
	gap: 15px;
	margin-bottom: 10px;
}

.ai-guide-step-number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	background: #0073aa;
	color: #fff;
	border-radius: 50%;
	font-weight: bold;
}

.ai-guide-step-text {
	margin: 0;
	flex: 1;
}

.ai-guide-step-image-requirement {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 10px 0;
	padding: 10px;
	background: #fff3cd;
	border-radius: 4px;
}

.ai-guide-image-icon {
	font-size: 20px;
}

.ai-guide-image-description {
	margin: 0;
	color: #856404;
}

/* List Items */
.ai-guide-list-item {
	margin: 10px 0;
	padding: 10px;
	background: #fff;
	border-radius: 4px;
}

.ai-guide-list-item-text {
	margin: 0;
}

/* Images */
.ai-guide-list-images {
	margin: 20px 0;
}

.ai-guide-images-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 15px;
	margin: 20px 0;
}

.ai-guide-image-item {
	position: relative;
	border: 1px solid #ddd;
	border-radius: 4px;
	overflow: hidden;
}

.ai-guide-image-wrapper {
	position: relative;
}

.ai-guide-image {
	width: 100%;
	height: auto;
	display: block;
}

.ai-guide-image-version-badge {
	position: absolute;
	top: 5px;
	right: 5px;
	background: #0073aa;
	color: #fff;
	padding: 2px 6px;
	border-radius: 3px;
	font-size: 12px;
	font-weight: bold;
}

.ai-guide-image-actions {
	padding: 10px;
	background: #f9f9f9;
	display: flex;
	gap: 10px;
}

.ai-guide-image-toggle,
.ai-guide-image-delete {
	padding: 5px 10px;
	border: 1px solid #ddd;
	border-radius: 3px;
	background: #fff;
	cursor: pointer;
	font-size: 14px;
}

.ai-guide-image-toggle:hover {
	background: #f0f0f0;
}

.ai-guide-image-delete {
	color: #dc3232;
	border-color: #dc3232;
}

.ai-guide-image-delete:hover {
	background: #ffeaea;
}

.ai-guide-images-placeholder {
	text-align: center;
	padding: 40px;
	color: #999;
	border: 2px dashed #ddd;
	border-radius: 4px;
}

.ai-guide-images-icon {
	font-size: 48px;
	display: block;
	margin-bottom: 10px;
}

/* Instructions */
.ai-guide-instructions-content {
	padding: 20px;
}

.ai-guide-instructions-content h3 {
	margin: 0 0 15px 0;
}

.ai-guide-instructions-list {
	margin: 15px 0;
	padding-left: 20px;
}

.ai-guide-instructions-list li {
	margin: 10px 0;
}

.ai-guide-instructions-tip {
	margin: 15px 0 0 0;
	padding: 10px;
	background: #e3f2fd;
	border-left: 3px solid #2196f3;
	border-radius: 4px;
}

