/**
 * 前台样式表
 *
 * @package    Loveful_Sketch_AI
 * @subpackage Loveful_Sketch_AI/public/css
 */

.loveful-sketch-ai-container {
	max-width: 1400px;
	margin: 0 auto;
	padding: 20px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.loveful-sketch-ai-header {
	text-align: center;
	margin-bottom: 30px;
}

.loveful-sketch-ai-header h1 {
	font-size: 2.5em;
	margin-bottom: 10px;
	color: #333;
}

.loveful-sketch-ai-header p {
	font-size: 1.1em;
	color: #666;
}

.loveful-sketch-ai-content {
	display: flex;
	gap: 30px;
	flex-wrap: wrap;
	justify-content: center;
}

.loveful-sketch-ai-left,
.loveful-sketch-ai-right {
	flex: 1;
	min-width: 300px;
	max-width: 650px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	padding: 20px;
}

.loveful-sketch-ai-toolbar {
	display: flex;
	align-items: center;
	gap: 15px;
	margin-bottom: 20px;
	flex-wrap: wrap;
	padding-bottom: 15px;
	border-bottom: 2px solid #f0f0f0;
}

.loveful-btn {
	padding: 12px 24px;
	border: none;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	position: relative;
	overflow: hidden;
}

.loveful-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	pointer-events: none;
}

.loveful-btn-primary {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.loveful-btn-primary:hover:not(:disabled) {
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}

.loveful-btn-primary:active:not(:disabled) {
	transform: translateY(0);
	box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.loveful-btn-secondary {
	background: #f8f9fa;
	color: #333;
	border: 1px solid #e0e0e0;
}

.loveful-btn-secondary:hover:not(:disabled) {
	background: #e9ecef;
	border-color: #d0d0d0;
	transform: translateY(-1px);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.loveful-icon {
	font-size: 16px;
	line-height: 1;
}

.loveful-tool-group {
	display: flex;
	align-items: center;
	gap: 8px;
}

.loveful-prompt-group {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	flex: 1;
}

.loveful-prompt-input {
	flex: 1;
	min-width: 200px;
	padding: 8px 12px;
	border: 1px solid #ddd;
	border-radius: 6px;
	font-size: 13px;
	font-family: inherit;
	transition: border-color 0.3s ease;
}

.loveful-prompt-input:focus {
	outline: none;
	border-color: #667eea;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.loveful-label {
	font-size: 14px;
	color: #666;
	white-space: nowrap;
}

.loveful-value {
	font-size: 14px;
	font-weight: 600;
	color: #667eea;
	min-width: 24px;
	text-align: center;
}

.loveful-range {
	width: 100px;
	height: 5px;
	border-radius: 5px;
	background: #ddd;
	outline: none;
	-webkit-appearance: none;
}

.loveful-range::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #667eea;
	cursor: pointer;
}

.loveful-range::-moz-range-thumb {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #667eea;
	cursor: pointer;
	border: none;
}

.loveful-color {
	width: 40px;
	height: 40px;
	border: 2px solid #ddd;
	border-radius: 6px;
	cursor: pointer;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
}

.loveful-color::-webkit-color-swatch-wrapper {
	padding: 0;
}

.loveful-color::-webkit-color-swatch {
	border: none;
	border-radius: 4px;
}

.loveful-sketch-ai-canvas-wrapper,
.loveful-sketch-ai-result-wrapper {
	position: relative;
	width: 100%;
	background: #fafafa;
	border-radius: 8px;
	border: 2px dashed #ddd;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 600px;
}

#sketch-canvas,
#enhanced-canvas {
	border-radius: 8px;
	cursor: crosshair;
	background: white;
	display: block;
	max-width: 100%;
	height: auto;
}

#enhanced-canvas {
	cursor: default;
}

.loveful-placeholder {
	text-align: center;
	color: #999;
	font-size: 16px;
	padding: 40px;
}

.loveful-loading {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	text-align: center;
	z-index: 10;
	background: rgba(255, 255, 255, 0.95);
	padding: 30px;
	border-radius: 12px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.loveful-spinner {
	border: 4px solid #f3f3f3;
	border-top: 4px solid #667eea;
	border-radius: 50%;
	width: 50px;
	height: 50px;
	animation: spin 1s linear infinite;
	margin: 0 auto 15px;
}

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

.loveful-loading p {
	margin: 0;
	color: #666;
	font-size: 14px;
}

/* 消息提示 */
.loveful-message {
	position: fixed;
	top: 20px;
	right: 20px;
	padding: 14px 20px;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	z-index: 10000;
	opacity: 0;
	transform: translateX(100%);
	transition: all 0.3s ease;
	max-width: 300px;
	font-size: 14px;
	font-weight: 500;
}

.loveful-message-show {
	opacity: 1;
	transform: translateX(0);
}

.loveful-message-success {
	background: #10b981;
	color: white;
}

.loveful-message-error {
	background: #ef4444;
	color: white;
}

.loveful-message-warning {
	background: #f59e0b;
	color: white;
}

.loveful-message-info {
	background: #3b82f6;
	color: white;
}

/* 工具按钮组优化 */
.loveful-sketch-ai-toolbar {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 20px;
	flex-wrap: wrap;
	padding-bottom: 15px;
	border-bottom: 2px solid #f0f0f0;
}

.loveful-sketch-ai-toolbar .loveful-btn {
	padding: 10px 18px;
	font-size: 13px;
}

/* 画布区域优化 */
.loveful-sketch-ai-canvas-wrapper,
.loveful-sketch-ai-result-wrapper {
	position: relative;
	width: 100%;
	background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
	border-radius: 12px;
	border: 2px solid #e0e6ed;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 600px;
	box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

#sketch-canvas,
#enhanced-canvas {
	border-radius: 8px;
	cursor: crosshair;
	background: white;
	display: block;
	max-width: 100%;
	height: auto;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#enhanced-canvas {
	cursor: default;
}

/* 加载动画优化 */
.loveful-loading {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	text-align: center;
	z-index: 10;
	background: rgba(255, 255, 255, 0.98);
	padding: 40px;
	border-radius: 16px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
	backdrop-filter: blur(10px);
}

.loveful-spinner {
	border: 4px solid #f3f3f3;
	border-top: 4px solid #667eea;
	border-radius: 50%;
	width: 50px;
	height: 50px;
	animation: spin 1s linear infinite;
	margin: 0 auto 20px;
}

.loveful-loading p {
	margin: 0;
	color: #666;
	font-size: 15px;
	font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 768px) {
	.loveful-sketch-ai-content {
		flex-direction: column;
		gap: 20px;
	}
	
	.loveful-sketch-ai-left,
	.loveful-sketch-ai-right {
		max-width: 100%;
		padding: 15px;
	}
	
	#sketch-canvas,
	#enhanced-canvas {
		width: 100%;
		height: auto;
	}
	
	.loveful-sketch-ai-toolbar {
		flex-direction: column;
		align-items: stretch;
		gap: 10px;
	}
	
	.loveful-btn {
		width: 100%;
		justify-content: center;
	}
	
	.loveful-prompt-group {
		flex-direction: column;
		align-items: stretch;
	}
	
	.loveful-prompt-input {
		width: 100%;
		min-width: auto;
	}
	
	.loveful-message {
		right: 10px;
		left: 10px;
		max-width: none;
		transform: translateY(-100%);
	}
	
	.loveful-message-show {
		transform: translateY(0);
	}
}

