.root {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 6px;
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.title {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 700;
}

.required {
    color: var(--danger);
}

.actions {
    display: inline-flex;
    gap: 8px;
}

.editor {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: linear-gradient(90deg, var(--bg-card-strong) 0 44px, transparent 44px), var(--bg-card);
    transition:
        border-color var(--motion-fast) var(--ease-standard),
        box-shadow var(--motion-fast) var(--ease-standard);
}

.editor:focus-within {
    border-color: var(--primary-border-strong);
    box-shadow: 0 0 0 3px var(--primary-surface);
}

.editorInvalid {
    border-color: var(--danger-border-strong);
    box-shadow: 0 0 0 3px var(--danger-surface);
}

.gutter {
    min-height: 100%;
    margin: 0;
    padding: 14px 10px 14px 0;
    border-right: 1px solid var(--border-soft);
    color: var(--text-tertiary);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    line-height: 20px;
    text-align: right;
    user-select: none;
}

.editorField {
    min-width: 0;
}

.editorField :global(.MuiInputBase-root) {
    align-items: stretch;
    padding: 0;
    background: transparent;
}

.editorField :global(textarea) {
    box-sizing: border-box;
    padding: 14px 14px 14px 12px;
    color: var(--text-primary);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 13px;
    line-height: 20px;
    tab-size: 2;
}

.editorField :global(textarea::placeholder) {
    color: var(--text-tertiary);
}

.helper {
    min-height: 18px;
    color: var(--text-tertiary);
    font-size: 12px;
}

.helperInvalid {
    color: var(--danger);
}

.helperValid {
    color: var(--success);
}
