.afv-product-editor-debug {
	box-sizing: border-box;
	width: 100%;
	margin: 18px 0;
	padding: 16px;
	border: 1px solid #d5d8dc;
	border-radius: 8px;
	background: #ffffff;
	color: #1f2933;
	font-size: 14px;
}

.afv-product-editor-debug *,
.afv-product-editor-debug *::before,
.afv-product-editor-debug *::after {
	box-sizing: border-box;
}

.afv-product-editor-debug__head,
.afv-product-editor-debug__module-head,
.afv-product-editor-debug__actions,
.afv-product-editor-debug__links {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.afv-product-editor-debug__head {
	justify-content: space-between;
	margin-bottom: 14px;
}

.afv-product-editor-debug__module-head {
	justify-content: space-between;
	width: 100%;
}

.afv-product-editor-debug__title,
.afv-product-editor-debug__module-title {
	margin: 0;
	line-height: 1.2;
	letter-spacing: 0;
}

.afv-product-editor-debug__title {
	font-size: 18px;
	font-weight: 700;
}

.afv-product-editor-debug__module-title {
	font-size: 14px;
	font-weight: 700;
}

.afv-product-editor-debug__badges {
	display: inline-flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 6px;
}

.afv-product-editor-debug__badge {
	display: inline-flex;
	align-items: center;
	min-height: 24px;
	padding: 3px 8px;
	border-radius: 999px;
	background: #e8f0fe;
	color: #174ea6;
	font-size: 12px;
	font-weight: 700;
}

.afv-product-editor-debug__badge--import {
	background: #fef3c7;
	color: #92400e;
}

.afv-product-editor-debug__badge--framework {
	background: #ffedd5;
	color: #9a3412;
}

.afv-product-editor-debug__badge--js {
	background: #e8f5e9;
	color: #166534;
}

.afv-product-editor-debug__version-warning.is-warning {
	background: #fee2e2;
	color: #b42318;
	font-size: 13px;
	font-weight: 800;
	animation: afv-debug-version-warning-pulse 1s steps(2, start) infinite;
}

.afv-product-editor-debug__version-warning[hidden] {
	display: none;
}

@keyframes afv-debug-version-warning-pulse {
	0%,
	100% {
		background: #fee2e2;
		color: #b42318;
		text-shadow: none;
	}

	50% {
		background: #fecaca;
		color: #ff0000;
		text-shadow: 0 0 1px rgba(255, 0, 0, 0.65);
	}
}

@media (prefers-reduced-motion: reduce) {
	.afv-product-editor-debug__version-warning.is-warning {
		animation: none;
	}
}

.afv-product-editor-debug__module {
	padding: 12px 0;
	border-top: 1px solid #edf0f2;
}

.afv-product-editor-debug__actions {
	margin-top: 10px;
}

.afv-product-editor-debug__module-tools {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-left: auto;
}

.afv-product-editor-debug__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 36px;
	padding: 7px 12px;
	border: 1px solid #1f2933;
	border-radius: 6px;
	background: #1f2933;
	color: #ffffff;
	font: inherit;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
}

.afv-product-editor-debug__icon-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 1px solid #cfd6dd;
	border-radius: 6px;
	background: #ffffff;
	color: #1f2933;
	cursor: pointer;
}

.afv-product-editor-debug__icon {
	display: block;
	width: 17px;
	height: 17px;
	background: currentColor;
	pointer-events: none;
	-webkit-mask-position: center;
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-size: contain;
	mask-position: center;
	mask-repeat: no-repeat;
	mask-size: contain;
}

.afv-product-editor-debug__icon--cut {
	-webkit-mask-image: url("../icons/editor/debug-cut.svg");
	mask-image: url("../icons/editor/debug-cut.svg");
}

.afv-product-editor-debug__icon--paste {
	-webkit-mask-image: url("../icons/editor/debug-paste.svg");
	mask-image: url("../icons/editor/debug-paste.svg");
}

.afv-product-editor-debug__button:hover,
.afv-product-editor-debug__button:focus,
.afv-product-editor-debug__icon-button:hover,
.afv-product-editor-debug__icon-button:focus {
	background: #111827;
	color: #ffffff;
}

.afv-product-editor-debug__button:disabled,
.afv-product-editor-debug__icon-button:disabled {
	border-color: #b8c0cc;
	background: #eef1f5;
	color: #6b7280;
	cursor: wait;
}

.afv-product-editor-debug__json {
	display: block;
	width: 100%;
	min-height: 220px;
	margin-top: 10px;
	padding: 10px;
	border: 1px solid #cfd6dd;
	border-radius: 6px;
	background: #fbfcfd;
	color: #111827;
	font-family: Consolas, Monaco, monospace;
	font-size: 12px;
	line-height: 1.5;
	resize: vertical;
}

.afv-product-editor-debug.is-drag-over .afv-product-editor-debug__json {
	border-color: #f59e0b;
	background: #fffbeb;
	box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}

.afv-product-editor-debug__result {
	margin-top: 12px;
}

.afv-product-editor-debug__links {
	margin: 0;
	padding: 0;
	list-style: none;
}

.afv-product-editor-debug__links > li {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	max-width: min(100%, 380px);
}

.afv-product-editor-debug__link {
	display: inline-flex;
	align-items: center;
	min-height: 32px;
	padding: 5px 9px;
	border: 1px solid #c7d2fe;
	border-radius: 6px;
	background: #eef2ff;
	color: #1d4ed8;
	text-decoration: none;
	font-weight: 700;
}

.afv-product-editor-debug__preview-image {
	display: block;
	width: 100%;
	max-height: 260px;
	object-fit: contain;
	border: 1px solid #d5d8dc;
	border-radius: 6px;
	background: #ffffff;
}

.afv-product-editor-debug__asset-meta {
	color: #4b5563;
	font-size: 12px;
	line-height: 1.3;
}

.afv-product-editor-debug__status {
	min-height: 20px;
	margin-top: 10px;
	color: #3b4552;
	font-size: 13px;
}

.afv-product-editor-debug__status.is-error {
	color: #b42318;
}

@media (max-width: 640px) {
	.afv-product-editor-debug {
		padding: 12px;
	}

	.afv-product-editor-debug__badges {
		align-items: flex-start;
	}

	.afv-product-editor-debug__button,
	.afv-product-editor-debug__link {
		width: 100%;
	}
}
