/**
 * ProdStyle Frontend Editor Stylesheet.
 */
.prodstyle-editor-wrap {
	font-family: 'Inter', sans-serif;
	color: #0f172a;
	max-width: 1200px;
	margin: 30px auto;
	padding: 0 15px;
	box-sizing: border-box;
}

.prodstyle-editor-wrap * {
	box-sizing: border-box;
}

/* 1. Glassmorphic HUD Credit Bar */
.prodstyle-credits-hud {
	background: rgba(255, 255, 255, 0.85);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid rgba(226, 232, 240, 0.8);
	padding: 16px 24px;
	border-radius: 16px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	box-shadow: 0 10px 25px rgba(15, 23, 42, 0.05);
	margin-bottom: 25px;
	gap: 15px;
}

.hud-left {
	display: flex;
	align-items: center;
	gap: 12px;
}

.hud-user-icon {
	color: #6366f1;
	font-size: 20px;
	width: 20px;
	height: 20px;
}

.hud-status-text {
	font-size: 14px;
	color: #334155;
}

.hud-guest-warning {
	color: #e11d48;
	font-weight: 600;
	background: rgba(225, 29, 72, 0.08);
	padding: 4px 10px;
	border-radius: 20px;
	font-size: 12px;
}

.hud-right {
	display: flex;
	align-items: center;
	gap: 15px;
}

.hud-credits {
	background: #f1f5f9;
	padding: 8px 16px;
	border-radius: 10px;
	display: flex;
	align-items: center;
	gap: 10px;
	border: 1px solid #e2e8f0;
}

.credits-count-label {
	font-size: 13px;
	color: #64748b;
	font-weight: 500;
}

.credits-count-value {
	font-family: 'Outfit', sans-serif;
	font-size: 14px;
	font-weight: 700;
	color: #0f172a;
}

/* Buttons */
.hud-upgrade-btn {
	background: linear-gradient(90deg, #a855f7 0%, #ec4899 100%);
	color: #ffffff;
	border: none;
	padding: 10px 20px;
	border-radius: 10px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	box-shadow: 0 4px 12px rgba(168, 85, 247, 0.35);
	transition: all 0.2s ease;
	cursor: pointer;
}

.hud-upgrade-btn span.dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

.hud-upgrade-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(168, 85, 247, 0.45);
}

.hud-login-btn {
	background: #0f172a;
	color: #ffffff;
	border: none;
	padding: 10px 20px;
	border-radius: 10px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	transition: all 0.2s ease;
}

.hud-login-btn span.dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

.hud-login-btn:hover {
	background: #1e293b;
}

/* 2. Workspace Grid Layout */
.prodstyle-workspace-grid {
	display: grid;
	grid-template-columns: 1fr 340px;
	gap: 25px;
	align-items: start;
	margin-bottom: 25px;
}

@media (max-width: 900px) {
	.prodstyle-workspace-grid {
		grid-template-columns: 1fr;
	}
}

.workspace-card {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 20px;
	padding: 24px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.01);
	margin-bottom: 25px;
}

.workspace-card:last-child {
	margin-bottom: 0;
}

/* Upload zone dropzone */
.prodstyle-dropzone {
	display: block;
	border: 2px dashed #cbd5e1;
	background: #fafafa;
	border-radius: 16px;
	padding: 60px 40px;
	text-align: center;
	cursor: pointer;
	transition: all 0.2s ease;
	position: relative;
}

.prodstyle-dropzone:hover, .prodstyle-dropzone.dragover {
	border-color: #6366f1;
	background: rgba(99, 102, 241, 0.02);
}

.dropzone-icon-circle {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: rgba(99, 102, 241, 0.08);
	color: #6366f1;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 20px auto;
}

.dropzone-icon-circle span.dashicons {
	font-size: 32px;
	width: 32px;
	height: 32px;
}

.prodstyle-dropzone h3 {
	font-family: 'Outfit', sans-serif;
	font-size: 18px;
	font-weight: 700;
	margin: 0 0 8px 0;
	color: #0f172a;
}

.prodstyle-dropzone p {
	color: #475569;
	font-size: 14px;
	margin: 0 0 16px 0;
}

.dropzone-subtext {
	font-size: 12px;
	color: #94a3b8;
	display: block;
}

/* Canvas Viewport */
.prodstyle-canvas-viewport {
	display: flex;
	justify-content: center;
	align-items: center;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 16px;
	overflow: hidden;
	position: relative;
	width: 100%;
}

.canvas-wrapper {
	position: relative;
	width: 100%;
	aspect-ratio: 1/1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 10px;
}

#prodstyle-preview-image {
	width: 100%;
	height: 100%;
	max-width: 100%;
	max-height: 100%;
	aspect-ratio: 1/1;
	object-fit: contain;
	border-radius: 12px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
	transition: opacity 0.3s ease, transform 0.3s ease;
	image-rendering: -webkit-optimize-contrast;
	image-rendering: crisp-edges;
	image-rendering: auto;
	transform: translateZ(0);
	backface-visibility: hidden;
}

.canvas-instruction-overlay {
	position: absolute;
	bottom: 12px;
	left: 50%;
	transform: translateX(-50%);
	background: rgba(15, 23, 42, 0.75);
	backdrop-filter: blur(4px);
	color: #ffffff;
	padding: 6px 14px;
	border-radius: 20px;
	font-size: 11px;
	pointer-events: none;
	display: flex;
	align-items: center;
	gap: 6px;
	white-space: nowrap;
	z-index: 10;
}

.canvas-instruction-overlay span.dashicons {
	font-size: 14px;
	width: 14px;
	height: 14px;
}



/* 4. Gemini AI SEO Sidebar Styles */
.seo-trigger-panel {
	text-align: center;
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.seo-intro-info {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
}

.ai-stars-icon {
	width: 48px;
	height: 48px;
	border-radius: 12px;
	background: rgba(168, 85, 247, 0.1);
	color: #a855f7;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ai-stars-icon span.dashicons {
	font-size: 24px;
	width: 24px;
	height: 24px;
}

.seo-intro-info h3 {
	font-family: 'Outfit', sans-serif;
	font-size: 16px;
	font-weight: 700;
	margin: 0;
	color: #0f172a;
}

.seo-intro-info p {
	font-size: 12px;
	color: #64748b;
	line-height: 1.5;
	margin: 0;
}

.seo-generate-btn {
	background: linear-gradient(90deg, #6366f1 0%, #a855f7 100%);
	color: #ffffff;
	border: none;
	padding: 12px 20px;
	border-radius: 12px;
	font-size: 14px;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
	cursor: pointer;
	transition: all 0.2s ease;
	width: 100%;
}

.seo-generate-btn span.dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

.seo-generate-btn:hover:not(.disabled):not(:disabled) {
	box-shadow: 0 6px 16px rgba(168, 85, 247, 0.4);
	transform: translateY(-1px);
}

.seo-generate-btn.disabled, .seo-generate-btn:disabled {
	background: #e2e8f0;
	color: #94a3b8;
	cursor: not-allowed;
	box-shadow: none;
}

.btn-subtext {
	font-size: 10px;
	color: #94a3b8;
}

/* AI loading and skeleton states */
.seo-loading-panel {
	text-align: center;
	padding: 30px 20px;
}

.loader-pulse-container {
	position: relative;
	width: 50px;
	height: 50px;
	margin: 0 auto 15px auto;
}

.pulsing-ai-icon {
	font-size: 28px;
	width: 28px;
	height: 28px;
	color: #a855f7;
	position: absolute;
	top: 11px;
	left: 11px;
	z-index: 2;
}

.pulse-ring {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background: rgba(168, 85, 247, 0.15);
	animation: ripple 1.2s infinite ease-in-out;
}

@keyframes ripple {
	0% { transform: scale(0.6); opacity: 1; }
	100% { transform: scale(1.3); opacity: 0; }
}

.seo-loading-panel h4 {
	font-size: 13px;
	font-weight: 600;
	color: #475569;
	margin: 0 0 20px 0;
}

/* Skeleton Screens */
.skeleton-container {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.skeleton-bar {
	height: 12px;
	background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
	background-size: 200% 100%;
	animation: skeleton-loading 1.5s infinite linear;
	border-radius: 6px;
}

.title-bar {
	width: 60%;
	height: 16px;
	margin-bottom: 8px;
}

.body-bar-1 { width: 100%; }
.body-bar-2 { width: 90%; }
.body-bar-3 { width: 45%; }

@keyframes skeleton-loading {
	0% { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

/* AI Generated Cards */
.seo-results-panel {
	animation: fadeIn 0.3s ease;
}

.results-header {
	border-bottom: 1px solid #f1f5f9;
	padding-bottom: 15px;
	margin-bottom: 15px;
}

.ai-badge-success {
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #16a34a;
	background: rgba(22, 163, 74, 0.08);
	padding: 4px 10px;
	border-radius: 20px;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-bottom: 8px;
}

.ai-badge-success span.dashicons {
	font-size: 12px;
	width: 12px;
	height: 12px;
}

.results-header h3 {
	font-family: 'Outfit', sans-serif;
	font-size: 16px;
	font-weight: 700;
	margin: 0;
	color: #0f172a;
}

.seo-output-card {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 14px;
	margin-bottom: 15px;
}

.seo-output-card:last-child {
	margin-bottom: 0;
}

.card-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 8px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #64748b;
}

.copy-field-btn {
	background: #ffffff;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	color: #475569;
	font-size: 10px;
	font-weight: 500;
	padding: 4px 8px;
	display: flex;
	align-items: center;
	gap: 4px;
	cursor: pointer;
	transition: all 0.15s ease;
}

.copy-field-btn span.dashicons {
	font-size: 12px;
	width: 12px;
	height: 12px;
}

.copy-field-btn:hover {
	color: #6366f1;
	border-color: #6366f1;
	background: rgba(99, 102, 241, 0.02);
}

.card-body-text {
	font-size: 13px;
	color: #334155;
	line-height: 1.5;
	white-space: pre-wrap;
	word-break: break-word;
}

.card-body-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.hashtag-pill {
	background: rgba(99, 102, 241, 0.08);
	color: #6366f1;
	border: 1px solid rgba(99, 102, 241, 0.15);
	border-radius: 20px;
	padding: 3px 10px;
	font-size: 11px;
	font-weight: 500;
}

/* 5. Bottom: Background Templates Carousel */
.prodstyle-templates-carousel-panel {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 20px;
	padding: 24px;
	margin-bottom: 25px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.01);
}

.carousel-header {
	margin-bottom: 15px;
}

.carousel-header h3 {
	font-family: 'Outfit', sans-serif;
	font-size: 16px;
	font-weight: 700;
	margin: 0 0 5px 0;
	color: #0f172a;
}

.carousel-header p {
	font-size: 12px;
	color: #64748b;
	margin: 0;
}

.templates-scroll-row {
	display: flex;
	gap: 15px;
	overflow-x: auto;
	padding-bottom: 10px;
	scrollbar-width: thin;
	scrollbar-color: #cbd5e1 transparent;
}

.templates-scroll-row::-webkit-scrollbar {
	height: 6px;
}

.templates-scroll-row::-webkit-scrollbar-thumb {
	background: #cbd5e1;
	border-radius: 10px;
}

.template-card {
	flex: 0 0 130px;
	border: 2px solid #e2e8f0;
	border-radius: 12px;
	overflow: hidden;
	background: #ffffff;
	cursor: pointer;
	text-align: center;
	transition: all 0.2s ease;
	position: relative;
}

.template-card:hover {
	transform: translateY(-2px);
	border-color: #cbd5e1;
}

.template-card.active {
	border-color: #6366f1;
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.card-thumb {
	height: 80px;
	background: #f1f5f9;
	overflow: hidden;
	position: relative;
}

.card-thumb-sim {
	width: 100%;
	height: 100%;
	transition: all 0.3s ease;
}

.thumb-marble {
	background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
}

.thumb-wood {
	background: linear-gradient(135deg, #78350f 0%, #451a03 100%);
}

.thumb-spotlight {
	background: radial-gradient(circle at center, #94a3b8 0%, #334155 100%);
}

.thumb-silk {
	background: linear-gradient(135deg, #fbcfe8 0%, #db2777 100%);
}

.thumb-tropical {
	background: linear-gradient(135deg, #bbf7d0 0%, #15803d 100%);
}

.thumb-neon {
	background: linear-gradient(135deg, #06b6d4 0%, #d946ef 100%);
}

.card-title {
	padding: 8px 6px;
	font-size: 11px;
	font-weight: 600;
	color: #334155;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.active-check {
	position: absolute;
	top: 5px;
	right: 5px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #6366f1;
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
	z-index: 2;
}

.active-check span.dashicons {
	font-size: 12px;
	width: 12px;
	height: 12px;
}

/* 6. Editor Footer Buttons Controls */
.prodstyle-editor-footer {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 20px;
	padding: 20px 24px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 15px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.01);
}

@media (max-width: 600px) {
	.prodstyle-editor-footer {
		flex-direction: column;
		align-items: stretch;
	}
	.footer-right {
		flex-direction: column;
	}
}

.footer-right {
	display: flex;
	gap: 12px;
}

.prodstyle-btn {
	border: none;
	padding: 12px 24px;
	border-radius: 10px;
	font-family: 'Outfit', sans-serif;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	transition: all 0.2s ease;
}

.prodstyle-btn span.dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

.secondary-btn {
	background: #f1f5f9;
	color: #475569;
	border: 1px solid #e2e8f0;
}

.secondary-btn:hover {
	background: #e2e8f0;
	color: #0f172a;
}

.primary-btn {
	background: #0f172a;
	color: #ffffff;
}

.primary-btn:hover {
	background: #1e293b;
}

.primary-btn.btn-save:hover {
	background: #16a34a;
	color: #ffffff;
}

.glowing-purple {
	background: linear-gradient(90deg, #6366f1 0%, #4f46e5 100%);
	color: #ffffff;
	box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.glowing-purple:hover {
	box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35);
	transform: translateY(-1px);
}

/* 7. Modal overlay warning */
.prodstyle-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(15, 23, 42, 0.6);
	backdrop-filter: blur(4px);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 99999;
	animation: fadeIn 0.2s ease;
}

.prodstyle-modal-box {
	background: #ffffff;
	border-radius: 20px;
	padding: 40px;
	max-width: 480px;
	width: 90%;
	text-align: center;
	box-shadow: 0 20px 50px rgba(15, 23, 42, 0.15);
	border: 1px solid #e2e8f0;
	animation: scaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleUp {
	from { transform: scale(0.9); opacity: 0; }
	to { transform: scale(1); opacity: 1; }
}

.modal-stars-icon {
	font-size: 48px;
	width: 48px;
	height: 48px;
	color: #a855f7;
	margin-bottom: 20px;
	filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.3));
}

.prodstyle-modal-box h2 {
	font-family: 'Outfit', sans-serif;
	font-size: 22px;
	font-weight: 800;
	margin: 0 0 12px 0;
	color: #0f172a;
}

.prodstyle-modal-box p {
	font-size: 14px;
	line-height: 1.6;
	color: #475569;
	margin: 0 0 30px 0;
}

.modal-buttons {
	display: flex;
	gap: 12px;
}

@media (max-width: 500px) {
	.modal-buttons {
		flex-direction: column;
	}
}

.modal-buttons * {
	flex: 1;
}

.modal-close-btn {
	background: #f1f5f9;
	color: #475569;
	border: 1px solid #e2e8f0;
	padding: 12px 20px;
	border-radius: 10px;
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.modal-close-btn:hover {
	background: #e2e8f0;
}

.modal-upgrade-btn {
	padding: 12px 20px;
	border-radius: 10px;
	font-weight: 600;
	font-size: 14px;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

/* 8. Dynamic Pulse Animation for Regenerate Guide */
@keyframes pulseGlow {
	0% {
		box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
		transform: scale(1);
	}
	100% {
		box-shadow: 0 8px 24px rgba(168, 85, 247, 0.55);
		transform: scale(1.02);
	}
}

/* 9. Mobile Sizing Sinks & Fluid Grid Adaptations */
@media (max-width: 600px) {
	.prodstyle-editor-wrap {
		margin: 15px auto;
		padding: 0 10px;
	}

	.prodstyle-credits-hud {
		flex-direction: column;
		align-items: center;
		text-align: center;
		padding: 16px;
		gap: 12px;
	}

	.hud-left {
		flex-direction: column;
		align-items: center;
		gap: 6px;
	}

	.hud-right {
		flex-direction: column;
		width: 100%;
		gap: 10px;
		align-items: stretch;
	}

	.hud-credits {
		width: 100%;
		justify-content: center;
	}

	.hud-upgrade-btn, 
	.hud-login-btn {
		width: 100%;
		justify-content: center;
		padding: 12px 20px;
	}

	.workspace-card {
		padding: 16px;
		margin-bottom: 15px;
	}

	.prodstyle-dropzone {
		padding: 30px 15px;
	}

	.prodstyle-dropzone h3 {
		font-size: 16px;
	}

	.prodstyle-dropzone p {
		font-size: 13px;
		margin-bottom: 12px;
	}

	.prodstyle-templates-carousel-panel {
		padding: 16px;
		margin-bottom: 15px;
	}

	.carousel-header h3 {
		font-size: 14px;
	}

	.templates-scroll-row {
		gap: 10px;
	}

	.template-card {
		flex: 0 0 110px;
	}

	.card-thumb {
		height: 70px;
	}

	.prodstyle-editor-footer {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
		padding: 16px;
	}

	.footer-left, 
	.footer-right {
		width: 100%;
		display: flex;
		flex-direction: column;
		gap: 10px;
	}

	.footer-left .prodstyle-btn,
	.footer-right .prodstyle-btn {
		width: 100%;
		justify-content: center;
	}

	.prodstyle-modal-box {
		padding: 24px;
	}

	.prodstyle-modal-box h2 {
		font-size: 18px;
	}

	.prodstyle-modal-box p {
		font-size: 13px;
		margin-bottom: 20px;
	}
}

