.product-code-editor {
    min-width: 0;
    width: 100%;
}

.product-code-editor .product-code-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 16px;
    margin-block: 5px;
}

.product-code-editor .product-code-field {
    display: grid;
    grid-template-columns: var(--nb-field-label-width, 166px) minmax(0, 1fr) auto;
    align-items: start;
}

.s-Form .product-code-editor .product-code-field > .caption {
    width: auto;
    margin: 0;
    padding: 6px 8px 0 0;
    text-align: start;
    color: var(--nb-ink, inherit);
    font-weight: 600;
    text-shadow: none;
}

.s-Form .product-code-editor input[type="text"] {
    width: 100%;
    min-width: 0;
    min-height: 30px;
}

.product-code-editor .product-code-remove {
    min-height: 30px;
    margin-inline-start: 4px;
}

.product-code-editor .product-code-field > .vx { grid-column: 2 / -1; }
.product-code-editor .product-code-field > .vx:has(> label.checked),
.product-code-editor .product-code-field > .vx:not(:has(> label.error)) { display: none; }

@media (max-width: 900px) {
    .product-code-editor .product-code-pair { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 600px) {
    .product-code-editor .product-code-field { grid-template-columns: minmax(0, 1fr) auto; }
    .s-Form .product-code-editor .product-code-field > .caption,
    .product-code-editor .product-code-field > .vx { grid-column: 1 / -1; }
    .s-Form .product-code-editor .product-code-field > .caption { padding: 0 0 4px; }
}
