/**
 * Code Block Elements - Frontend Styles
 */

/* WooCommerce AJAX Cart button states */
.cbe-code-block a.cbe-wc-cart-loading {
	pointer-events: none;
	opacity: 0.75;
	position: relative;
}

.cbe-code-block a.cbe-wc-cart-added {
	filter: saturate(1.15);
}

.cbe-code-block a.cbe-wc-cart-error {
	outline: 2px solid #ef4444;
	outline-offset: 3px;
}

/* View Cart forward link */
.cbe-code-block a.cbe-wc-view-cart-link.added_to_cart.wc-forward {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 6px !important;
	margin: 0 0 0 16px !important;
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
	color: inherit !important;
	text-decoration: none !important;
	font-weight: 600 !important;
	font-size: 0.95em !important;
	line-height: 1 !important;
	vertical-align: middle !important;
	white-space: nowrap !important;
	box-shadow: none !important;
	transition: opacity 0.2s ease, transform 0.2s ease !important;
}

.cbe-code-block a.cbe-wc-view-cart-link.added_to_cart.wc-forward:after {
	content: '→';
	font-weight: 800;
	margin-left: 3px;
}

.cbe-code-block a.cbe-wc-view-cart-link.added_to_cart.wc-forward:hover {
	opacity: 0.8 !important;
	text-decoration: underline !important;
	transform: translateX(2px);
}

/* Interactive Product Gallery */
.cbe-code-block .cbe-wc-product-gallery {
	display: block;
	width: 100%;
}

.cbe-code-block .cbe-wc-product-gallery-main {
	display: block;
	width: 100%;
	height: auto;
	object-fit: cover;
	border-radius: inherit;
	transition: opacity 0.25s ease;
}

.cbe-code-block .cbe-wc-product-gallery-thumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 14px;
}

.cbe-code-block .cbe-wc-product-gallery-thumb {
	width: 68px;
	height: 68px;
	display: block;
	padding: 0;
	margin: 0;
	border: 1px solid rgba(15, 23, 42, 0.18);
	border-radius: 8px;
	background: transparent;
	overflow: hidden;
	cursor: pointer;
	line-height: 0;
	box-shadow: none;
	transition: border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.cbe-code-block .cbe-wc-product-gallery-thumb:hover {
	transform: translateY(-2px);
	border-color: rgba(37, 99, 235, 0.6);
}

.cbe-code-block .cbe-wc-product-gallery-thumb img {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
}

.cbe-code-block .cbe-wc-product-gallery-thumb.is-active {
	border-color: #2563eb;
	box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
}

/* Empty State Placeholder in Editor */
.cbe-empty-state {
	padding: 40px 24px;
	border: 2px dashed #94a3b8;
	border-radius: 16px;
	text-align: center;
	background: #f8fafc;
	color: #64748b;
	margin: 10px 0;
	box-sizing: border-box;
}

.cbe-empty-icon {
	font-size: 32px;
	margin-bottom: 8px;
	line-height: 1;
}

.cbe-empty-title {
	font-size: 16px;
	font-weight: 700;
	color: #0f172a;
	margin-bottom: 6px;
}

.cbe-empty-desc {
	font-size: 13px;
	color: #64748b;
	max-width: 360px;
	margin: 0 auto;
	line-height: 1.5;
}
