.json-element-editor {
    display: none;
}

body.edit-mode .json-element-editor:has(+.json-element[editable]) {
    display: flex;
}

.json-element-editor {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #f9f9f9;
    margin-bottom: 16px;
    box-sizing: border-box;
}

.json-element-editor>* {
    width: 100%;
}

.json-element-editor h5 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 16px;
}

.json-element-editor .editor-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

.json-element-editor .editor-actions button {
    width: 24px;
    height: 24px;
    font-size: 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.json-element-editor .editor-actions button svg {
    width: 20px;
    height: 20px;
}

.json-element-editor .editor-actions button svg path {
    fill: #fff;
}

.json-element-editor .editor-actions button.cancel {
    background-color: #939393;
}

.json-element-editor .editor-actions button.save {
    background-color: #4CAF50;
}

.json-element-editor .editor-actions button.delete {
    background-color: #f44336;
}

.json-element-editor .editor-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.json-element-editor label {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
    font-size: 14px;
    color: #333;
}